November Happy Hour will be moved to Thursday December 5th.

'configSource' in web.config

Vote:
 

I taken over an EPiServer solution. Its upgraded to version EPiServer 4.62 B. Its built for Framework 2.0.

When I try to set the appSettings section in web.config in a separate file I get an 'NullReferenceException' (se stacktrace further down). This is the line in web.config:
<appSettings configSource='appSettings.config' />
The appSettings.config file is in the root.

Can this be done? Has the problem to do with EPiServer or the customized solution itself?

[NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.]
   EPiServer.ApplicationConfiguration.Exists(String key) +29
   EPiServer.ApplicationConfiguration.ᐃ(String ) +32
   EPiServer.ApplicationConfiguration.get_UploadDir() +37
   EPiServer.ApplicationConfiguration.get_PhysicalUploadDir() +193
   EPiServer.ApplicationConfiguration..ctor(String configFileName) +1057
   EPiServer.ApplicationConfiguration..ctor(String configFileName, String rootVirtualPath) +29
   EPiServer.Global.get_EPConfig() +96
   EPiServer.Global.ᐁ() +144
   EPiServer.Global..ctor() +372
   LIT.Websites.Intra.Global..ctor() in C:\Data\Projects\Orebroll\EPiServer 4\intra.orebroll.se\LIT.Websites.Intra\Global.asax.cs:26
   ASP.global_asax..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\93d0310f\88a9fe0c\App_global.asax.gca3d5id.0.cs:0

[TargetInvocationException: Ett undantagsfel har inträffat i målet för en aktivering.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +197
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance() +27
   System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context) +3460678
   System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext context) +125
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +99
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350

#19543
Apr 16, 2008 11:12
Vote:
 

configSource is not supported in EPiServer CMS 4 (which is built on .NET 1.1 and configSource was introduced in .NET 2.0).

#19572
Apr 17, 2008 16:04
Vote:
 

Thank you Per!

 Then I know.

Regards Hans

#19634
Apr 22, 2008 13:42
* 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.