0

I recently have this strange issue with IIS. We have an ASP.NET website and recently it fails after an application pool recycle. When I stop the applicationpool, clear the "ASP.NET Temporary Files" and restart the applicationpool. It works again. When i manually recycle it, it breaks again. I can reproduce this every time. The big problem is that our web application recycles every night.

Can I in some way prevent the usage of these ASP.NET Temporary Files? Or how could i fix this issue.

[Edit] this is a screenshot of the error: Screenshot

[Edit 2:Full error page] Server Error in 'WebSite' Application.

Could not load type from string value 'MyOwnClass'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Could not load type from string value 'MyOwnClass'.

Source Error: 


Line 120:    private static void InitalizeApplicationContext()
Line 121:    {
Line 122:        Spring.Context.Support.ContextRegistry.GetContext();
Line 123:    }
Line 124:    

Source File: path-to-website\Global.asax    Line: 122 

Stack Trace: 


[TypeLoadException: Could not load type from string value 'MyOwnClass'.]
   Spring.Core.TypeResolution.TypeResolver.Resolve(String typeName) +240
   Spring.Core.TypeResolution.GenericTypeResolver.Resolve(String typeName) +530
   Spring.Core.TypeResolution.CachedTypeResolver.Resolve(String typeName) +411
   Spring.Core.TypeResolution.TypeResolutionUtils.ResolveType(String typeName) +85
   Spring.Objects.Factory.Support.AbstractObjectDefinition.ResolveObjectType() +39
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) +74

[CannotLoadObjectTypeException: Cannot resolve type [MyOwnClass] for object with name 'AuthenticationUtil' defined in file [path-to-website\spring\Utils.xml] line 5]
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) +180
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.PredictObjectType(String objectName, RootObjectDefinition mod) +108
   Spring.Objects.Factory.Support.DefaultListableObjectFactory.DoGetObjectNamesForType(Type type, Boolean includeNonSingletons, Boolean allowEagerInit) +879
   Spring.Objects.Factory.Support.DefaultListableObjectFactory.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects) +99
   Spring.Context.Support.AbstractApplicationContext.GetObjectsOfType(Type type) +51
   Spring.Messaging.Core.MessageQueueMetadataCache.Initialize() +78
   Spring.Messaging.Core.MessageQueueTemplate.CreateDefaultMetadataCache() +253
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) +250
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) +740
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) +637

[ObjectCreationException: Error thrown by a dependency of object 'AddExamSessionToQueueCommand' defined in 'file [path-to-website\spring\Commands.xml] line 22' : Initialization of object failed : Cannot resolve type [MyOwnClass] for object with name 'AuthenticationUtil' defined in file [path-to-website\spring\Utils.xml] line 5
 while resolving 'constructor argument with index 0' to 'MsmqExamSessionAccessCodeService' defined in 'file [path-to-website\spring\Services.xml] line 23'
 while resolving 'MessageQueueTemplate' to 'ExamSessionAccessCodeMessageQueueTemplate' defined in 'file [path-to-website\spring\MsmqMessageQueueTemplates.xml] line 18']
   Spring.Objects.Factory.Support.ObjectDefinitionValueResolver.ResolveReference(IObjectDefinition definition, String name, String argumentName, RuntimeObjectReference reference) +585
   Spring.Objects.Factory.Support.ObjectDefinitionValueResolver.ResolvePropertyValue(String name, IObjectDefinition definition, String argumentName, Object argumentValue) +429
   Spring.Objects.Factory.Support.ObjectDefinitionValueResolver.ResolveValueIfNecessary(String name, IObjectDefinition definition, String argumentName, Object argumentValue) +19
   Spring.Objects.Factory.Support.ConstructorResolver.ResolveConstructorArguments(String objectName, RootObjectDefinition definition, ObjectWrapper wrapper, ConstructorArgumentValues cargs, ConstructorArgumentValues resolvedValues) +327
   Spring.Objects.Factory.Support.ConstructorResolver.GetConstructorInstantiationInfo(String objectName, RootObjectDefinition rod, ConstructorInfo[] chosenCtors, Object[] explicitArgs) +263
   Spring.Objects.Factory.Support.ConstructorResolver.AutowireConstructor(String objectName, RootObjectDefinition rod, ConstructorInfo[] chosenCtors, Object[] explicitArgs) +80
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.CreateObjectInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +216
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) +863
   Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +379
   Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure) +1744
   Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() +722
   Spring.Context.Support.AbstractApplicationContext.Refresh() +1009
   Spring.Context.Support.XmlApplicationContext..ctor(XmlApplicationContextArgs args) +206
   _dynamic_Spring.Context.Support.XmlApplicationContext..ctor(Object[] ) +320
   Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) +169
   Spring.Context.Support.ContextInstantiator.InstantiateContext() +55
   Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +174
   Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) +476

[ConfigurationErrorsException: Error creating context 'spring.root': Could not load type from string value 'MyOwnClass'.]
   System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +278
   System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +2095
   System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +2023
   System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +79
   System.Configuration.ConfigurationManager.GetSection(String sectionName) +91
   Spring.Util.ConfigurationUtils.GetSection(String sectionName) +100
   Spring.Context.Support.ContextRegistry.InitializeContextIfNeeded() +68
   Spring.Context.Support.ContextRegistry.GetContext() +83
   ASP.global_asax.InitalizeApplicationContext() in path-to-website\Global.asax:122
   ASP.global_asax.Application_Start(Object sender, EventArgs e) in path-to-website\Global.asax:20

[HttpException (0x80004005): Error creating context 'spring.root': Could not load type from string value 'MyOwnClass'.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +540
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Error creating context 'spring.root': Could not load type from string value 'MyOwnClass'.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0
Brechtvsk
  • 11
  • 4
  • how exactly does it fail? What's the error? – ADyson Mar 22 '17 at 13:06
  • It's a configuration error. It fails to load some (home made) assembly with spring. But I think it's a general error. – Brechtvsk Mar 23 '17 at 10:03
  • Really I meant post the full details of the error. No-one can help fix it if you don't give more detail. "It's a configuration error" could mean anything, we can only guess. – ADyson Mar 23 '17 at 14:02
  • I attached a screenshot with the error. But I will add the full error page (with fake object names) – Brechtvsk Mar 23 '17 at 14:18

0 Answers0