Try our conversational search powered by Generative AI!

Value cannot be null. Parameter name: type

Vote:
 

I'm trying to install a customer website on their production server, but get this suspicious error. Value cannot be null. Parameter name: type.

The spesification is Episerver CMS 6.2 installed on Windows 2008 R2. It works fine on my local machine, but not on the server.

Very often Pagetypebuilder is the problem. In my solution I use many versions of Pagetypebuilder (1.2, 1.3 and 1.3.1) I solve this using

      <dependentAssembly>
        <assemblyIdentity name="PageTypeBuilder" publicKeyToken="6fb8762af0e6dbed" culture="neutral" />
        <bindingRedirect oldVersion="1.4.0.0-2.0.0.0" newVersion="2.0.0.0" />
        <bindingRedirect oldVersion="1.0.0.0-1.2.1.0" newVersion="1.2.0.0" />
        <bindingRedirect oldVersion="1.2.9.0-1.3.0.9" newVersion="1.3.0.0" />
        <bindingRedirect oldVersion="1.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
        <codeBase version="1.2.0.0" href="bin\ptb12\PageTypeBuilder.dll" />
        <codeBase version="1.3.1.0" href="bin\ptb131\PageTypeBuilder.dll" />
        <codeBase version="1.3.0.0" href="bin\ptb13\PageTypeBuilder.dll" />
      </dependentAssembly>

 

I read somewhere that removing services and endpoints in System.ServiceModel in

web.config might reveal the real error, but that didn't change anything. I googled the

error and found similar errors, but couldn't figure out what was wrong:

http://www.dotnetnuke.com/Resources/Forums/forumid/77/threadid/341085/scope/posts.aspx

http://stackoverflow.com/questions/7987414/deserialization-error-value-cannot-be-null-parameter-name-type

http://www.velocityreviews.com/forums/t688837-value-cannot-be-null-parameter-name-type.html

The error is:

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

My stack trace is:

[ArgumentNullException: Value cannot be null.
Parameter name: type]
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +9641126
   EPiServer.Framework.FrameworkInitialization.InitVirtualRoles() +251
   EPiServer.Framework.FrameworkInitialization.Initialize(InitializationEngine context) +53
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +343
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +83
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +163
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +68
   EPiServer.Global..ctor() +54
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f6055ac7\72c3f8aa\App_global.asax.xtlxikgc.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +23
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090044
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256

 

Anyone have any ideas?

In advance, thanks for your support!!! It is most helpfull!! :)

Kind regards,

Jon Haakon

#61930
Oct 06, 2012 23:17
Vote:
 

Is you local machine also running the site on IIS7?

#61931
Oct 07, 2012 12:02
Vote:
 

yes it is

#61933
Oct 08, 2012 9:47
Vote:
 

Can you see if EPiServerFramework.config is modified on startup and linked into web.config correctly?

If you install a plain "public templates" site on the server... Does it run?

#61934
Oct 08, 2012 9:54
Vote:
 

Thank you so much for your support, Johan! I really appreciate it! ;)

After talking to some colleagues, I got a tip that some virtual roles was deprecated.

After removing the virtual roles, it worked.

 

#61941
Oct 08, 2012 12:55
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.