TargetInvocationException: Exception has been thrown by the target of an invocation

Vote:
 

I am getting this exception on all sites I have installed, and new sites I install. Anybody know why I am getting this?

Exception details: TargetInvocationException: Exception has been thrown by the target of an invocation.

Stack trace:

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
  at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
  at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
  at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
  at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
  at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
  at EPiServer.Web.Hosting.VirtualPathHandler.CreateVirtualPathProviderInstance(ProviderSettings providerSettings)
  at EPiServer.Web.Hosting.VirtualPathHandler.InitializeProviders(ProviderSettingsCollection providers)
  at EPiServer.Web.InitializationModule.InitializeVirtualPathProviders(VirtualPathElement vpElement)
  at EPiServer.Web.InitializationModule.Initialize(EPiServerSection config, Settings settings, ConnectionStringSettingsCollection connectionStringSettings)
  at EPiServer.Web.InitializationModule.StaticInitialization()
  at EPiServer.Web.InitializationModule.Application_BeginRequest(Object sender, EventArgs e)
  at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

[Inner exception ObjectStoreException: Failed to load named object /filesystem/PageFiles.]
  at EPiServer.Implementation.SqlObjectStore.LoadOrCreatePath(String path, Boolean create, IItem current)
  at EPiServer.Implementation.SqlObjectStore.LoadPath(String path, IItem current)
  at EPiServer.Implementation.DefaultSession.LoadPath(String path)
  at EPiServer.Web.Hosting.Versioning.Store.DirectoryOperations.CreateRoot(String rootName)
  at EPiServer.Web.Hosting.Versioning.VersioningFileSystem.Init(NameValueCollection config)
  at EPiServer.Web.Hosting.VirtualPathVersioningProvider..ctor(String name, NameValueCollection configParameters)

Thanks
Magne 

#25993
Nov 16, 2008 20:38
Vote:
 

Hi,

I've received similar error messages, and in those cases it's been problems with the database-connection.

My problem was that the database account created during installation wasn't allowed to log on (the sql server was set to windows auth. only).

Just a thought,

Peter

#26002
Nov 17, 2008 12:01
Vote:
 
The stacktrace mentions that it fails to load the virtual path "PageFiles". Make sure that the account running asp.net has modify rights on the pagefiles folder. (ASPNET on win xp machines)

--
Lars Øyvind Bodahl
www.epinova.no

#26013
Nov 18, 2008 8:46
Vote:
 
Thanks for the replies! It was the db connection! 
#26021
Nov 18, 2008 11:13
Vote:
 
Can also confirm that it was the db connection
#26030
Nov 18, 2008 13:23
Vote:
 
Unfortunately in some cases if something goes wrong during initialization the "original" error is not seen in the stack trace (as above). Will will try to address this in the next SP. However if you turn on log4net logging on level ERROR you should be able to see the actual error (in the case above the db connection problem)
#26083
Nov 19, 2008 17:01
Vote:
 

pretty frightening error message just because you foregotten to start the sql server

yes I allso confirm that it was the db connection

#26713
Dec 17, 2008 8:00
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.