IIS Breaks application after recycle - asp.net

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

Related

Error Trying to Load DefaultNLP Model in Stanford.NLP.CoreNLP .Net in WebAPI C# Project

I have been attempting to load the default models I pulled from the suggested ZIP file. Generally, I am loading the annotation into a singleton at the application level so the resources can be shared across all sessions. (in WebAPI OWIN Startup, this is being called from startup.cs).
Trying other methods with relative path references, I was getting this error:
unable to resolve
"edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger"
as either class path, filename or URL
I am not sure if I am getting closer to or further from a solution. This is at the root directory of my ASP.NET WebAPI Project:
However, I am getting the error:
Unhandled Execution Error
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: java.lang.reflect.InvocationTargetException:
Source Error:
Line 43: // We should change current directory, so
StanfordCoreNLP could find all the model files automatically Line 44:
Directory.SetCurrentDirectory(HostingEnvironment.MapPath(ModelLocation));
Line 45: pipeline = new StanfordCoreNLP(props); Line
46: } Line 47: finally
Source File: D:\xxx\xxx\xxx\NLP.cs Line: 45
Stack Trace:
[InvocationTargetException] __(Object[] ) +444
FastConstructorAccessorImpl.newInstance(Object[] args) +28
java.lang.reflect.Constructor.newInstance(Object[] initargs, CallerID
) +133 edu.stanford.nlp.util.ClassFactory.createInstance(Object[]
params) +108
[ClassCreationException: MetaClass couldn't create public
edu.stanford.nlp.time.TimeExpressionExtractorImpl(java.lang.String,java.util.Properties)
with args [sutime, {}]]
edu.stanford.nlp.util.ClassFactory.createInstance(Object[] params)
+372 edu.stanford.nlp.util.MetaClass.createInstance(Object[] objects) +34
edu.stanford.nlp.util.ReflectionLoading.loadByReflection(String
className, Object[] arguments) +71
[ReflectionLoadingException: Error creating
edu.stanford.nlp.time.TimeExpressionExtractorImpl]
edu.stanford.nlp.util.ReflectionLoading.loadByReflection(String
className, Object[] arguments) +232
edu.stanford.nlp.time.TimeExpressionExtractorFactory.create(String
className, String name, Properties props) +80
edu.stanford.nlp.time.TimeExpressionExtractorFactory.createExtractor(String
name, Properties props) +34
edu.stanford.nlp.ie.regexp.NumberSequenceClassifier..ctor(Properties
props, Boolean useSUTime, Properties sutimeProps) +57
edu.stanford.nlp.ie.NERClassifierCombiner..ctor(Boolean
applyNumericClassifiers, Boolean useSUTime, Properties nscProps,
String[] loadPaths) +129
edu.stanford.nlp.pipeline.AnnotatorImplementations.ner(Properties
properties) +454 edu.stanford.nlp.pipeline.6.create() +46
edu.stanford.nlp.pipeline.AnnotatorPool.get(String name) +163
edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(Properties ,
Boolean , AnnotatorImplementations ) +555
edu.stanford.nlp.pipeline.StanfordCoreNLP..ctor(Properties props,
Boolean enforceRequirements) +55
edu.stanford.nlp.pipeline.StanfordCoreNLP..ctor(Properties props) +76
XXX.XXX.NLP.Start(String modelLocation) in
D:\xxx\xxx\xxx\NLP.cs:45
XXX.XXX.Startup.Configuration(IAppBuilder app) in
D:\xxx\xxx\xxx\Startup.cs:16
[TargetInvocationException: Exception has been thrown by the target of
aninvocation.] System.RuntimeMethodHandle.InvokeMethod(Object
target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) +128
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
+146 Owin.Loader.<>c__DisplayClass12.b__b(IAppBuilder builder) +93
Owin.Loader.<>c__DisplayClass1.b__0(IAppBuilder
builder) +209
Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action 1
startup) +843
Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action 1 startup) +51
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
+101 System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func 1 valueFactory)
+141 Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication
context) +172
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +618
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +419
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +343
[HttpException (0x80004005): Exception has been thrown by the target
of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+120 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +712
Here is the code I have (NLP.Start() is called in startup.cs):
public static class NLP
{
private static string _modelLocation = #"~\NLPModels";
public static string ModelLocation
{
set
{
NLP.Start(value);
}
get
{
return _modelLocation;
}
}
private static StanfordCoreNLP pipeline;
public static void Start(string modelLocation = null)
{
var curDir = Environment.CurrentDirectory;
if (!string.IsNullOrEmpty(modelLocation))
{
_modelLocation = modelLocation;
}
try
{
// Annotation pipeline configuration
var props = new Properties();
props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref");
props.setProperty("sutime.binders", "0");
// We should change current directory, so StanfordCoreNLP could find all the model files automatically
Directory.SetCurrentDirectory(HostingEnvironment.MapPath(ModelLocation));
pipeline = new StanfordCoreNLP(props);
}
finally
{
Directory.SetCurrentDirectory(curDir);
}
}
public static JObject ProcessText(string text)
{
var annotation = new Annotation(text);
using (java.io.StringWriter writer = new java.io.StringWriter())
{
pipeline.jsonPrint(annotation, writer);
return JObject.Parse(writer.toString());
}
}
}
After poking around a bit, I found the solution of the same problem.
https://github.com/sergey-tihon/Stanford.NLP.NET/issues/11
If you aren't willing to read through the thread, here was the basic answer. Amend this line of code
props.setProperty("sutime.binders", "0");
to
props.setProperty("ner.useSUTime", "0");

asp.net URL Rewriting error

Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
we installed the url rewriting
tried it on a website
tried it on a virtual directory
same error :/
any ideas?
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.IO.FileNotFoundException: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'UrlRewritingNet.UrlRewriter' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +153
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +63
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +124
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +76
[ConfigurationErrorsException: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +12773840
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +69
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +66
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +300
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12966756
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12806561
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Just copy the UrlRewritingNet.UrlRewriter.dll and paste it in both parent and child's bin folder .. it might be not present in the child bin folder
Kindly change you application pool setting of sub web site.
to different app. pool framework.

Could not load file or assembly 'EPiServer.Framework'

Im getting this exception when configuring EPi CMS 5 to run under IIS7.5.
Exception Details: System.IO.FileNotFoundException: Could not load
file or assembly 'EPiServer.Framework' or one of its dependencies.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'EPiServer.Framework' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'EPiServer.Framework' or one of its dependencies. Det går inte att
hitta filen.] System.RuntimeTypeHandle.GetTypeByName(String name,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName,
ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +95
System.RuntimeType.GetType(String typeName, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
+54 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase) +69
System.Web.Configuration.ConfigUtil.GetType(String typeName, String
propertyName, ConfigurationElement configElement, XmlNode node,
Boolean checkAptcaBit, Boolean ignoreCase) +52
[ConfigurationErrorsException: Could not load file or assembly 'EPiServer.Framework' or one of its dependencies. Det går inte att
hitta filen.] System.Web.Configuration.ConfigUtil.GetType(String
typeName, String propertyName, ConfigurationElement configElement,
XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +360
System.Web.Configuration.ConfigUtil.GetType(String typeName, String
propertyName, ConfigurationElement configElement, Boolean
checkAptcaBit) +27
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String
typeName, String propertyName, ConfigurationElement configElement) +44
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String
typeName, String propertyName, ConfigurationElement configElement) +52
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1
moduleList) +200
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
+1365 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +95
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +253
[HttpException (0x80004005): Could not load file or assembly 'EPiServer.Framework' or one of its dependencies. Det går inte att
hitta filen.] System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +9080108
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +256
Check the /Bin folder of your application and see if the EPiServer.Framework DLL is there. If it isn't you can set the DLL to "Copy Local" by right clicking on it in the References folder within Solution Explorer and selecting Properties, then set Copy Local to "true". Now when you build the solution, the DLL will be copied from it's reference location into the Bin folder. You may need to do this for all the EPiServer DLLs.
I've experienced this in the past and even when "Specific Version" is enabled there are still issue loading the correct DLLs. One way we solved it was to copy all the EPiServer DLLs into a Lib folder in our solution directory and add the references to those DLLs, keeping Specific Version and Copy Local set to true.

Instance validation error calling web service

I'm getting an instance validation error in my proxy class i use to call a web service. This proxy class was auto-generated by XSD2Code. To me the error doesn't match the code it's pointing to.
Exception Details:
System.InvalidOperationException:
Instance validation error:
'LessThanOrEqualTo' is not a valid
value for ComparisonOperatorType.
Source Error:
Line 12866: cswgetCapabilitiesResponse csw.cswgetCapabilities(cswgetCapabilitiesRequest request)
Line 12867: {
Line 12868: return base.Channel.cswgetCapabilities(request);
Line 12869: }
Line 12870:
Source File:
d:\webapp\App_Code\ogc.csw.proxy.cs
Line: 12868
Stack Trace:
[InvalidOperationException: Instance validation error: 'LessThanOrEqualTo' is not a valid value for ComparisonOperatorType.]
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read156_ComparisonOperatorType(String s) +582
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read157_ComparisonOperatorsType(Boolean isNullable, Boolean checkType) +742
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read162_Scalar_CapabilitiesType(Boolean isNullable, Boolean checkType) +746
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read165_Filter_Capabilities(Boolean isNullable, Boolean checkType) +746
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read166_CapabilitiesType(Boolean isNullable, Boolean checkType) +1430
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReadercsw.Read280_Item() +281
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer11.Deserialize(XmlSerializationReader reader) +43
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +579
[InvalidOperationException: There is an error in XML document (284, 13).]
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +1375
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) +163
System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest) +606
[CommunicationException: Error in deserializing body of reply message for operation 'cswgetCapabilities'.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +4767763
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +1725
csw.cswgetCapabilities(cswgetCapabilitiesRequest request) +0
cswClient.csw.cswgetCapabilities(cswgetCapabilitiesRequest request) in d:\webapp\App_Code\ogc.csw.proxy.cs:12868
cswClient.cswgetCapabilities(GetCapabilitiesType1 GetCapabilities) in d:\webapp\App_Code\ogc.csw.proxy.cs:12875
tests_csw.Unnamed1_Click(Object sender, EventArgs e) in d:\webapp\tests\csw.aspx.cs:22
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
Is "LessThanOrEqualTo" meant to be a valid value? I think this message is saying that it tried to deserialize "LessThanOrEqualTo" as a value for the ComparisonOperatorType element (or attribute), but that the string "LessThanOrEqualTo" is not valid for the type of the element.

NHibernate Configuration issue

I got following error whenever anything in project is going to be updated. I am unable to understand what this error message trying to tell. can any body help me in to this.
Server Error in '/' Application.
Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659.
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.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[XmlException: Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659.]
System.Xml.XmlTextReaderImpl.Throw(Exception e) +76
System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +126
System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) +18
System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() +254
System.Xml.XmlTextReaderImpl.ParseEndElement() +3975442
System.Xml.XmlTextReaderImpl.ParseElementContent() +243
System.Xml.XmlTextReaderImpl.Read() +45
System.Xml.XmlTextReader.Read() +15
System.Xml.XmlCharCheckingReader.Read() +39
System.Xml.XsdValidatingReader.Read() +37
System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space) +428
System.Xml.XPath.XPathDocument..ctor(XmlReader reader, XmlSpace space) +20
System.Xml.XPath.XPathDocument..ctor(XmlReader reader) +6
NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) +80
[HibernateConfigException: An exception occurred during configuration of persistence layer.]
NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) +127
NHibernate.Cfg.Configuration.Configure(XmlReader textReader) +118
Application.DataModel.NHibernateDataProviderFactory..ctor(DataProviderFactoryInfo factoryInfo) in C:\#Geeks.Coder\NHibernateDataProvider\NHibernateDataProviderFactory.cs:26
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) +0
System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) +15
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +249
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, Object[] args) +16
Application.DataModel.Database.RegisterDataProviderFactory(DataProviderFactoryInfo factoryInfo) in C:\#Geeks.Coder\Application.DataModel\DataAccessAPI\Database.ProviderManagement.cs:81
Application.DataModel.Database..cctor() in C:\#Geeks.Coder\Application.DataModel\DataAccessAPI\Database.ProviderManagement.cs:23
[TypeInitializationException: The type initializer for 'Application.DataModel.Database' threw an exception.]
Application.DataModel.Database.Save(Entity entity) in C:\#Geeks.Coder\Application.DataModel\DataAccessAPI\Database.Save.cs:26
Application.DataModel.ApplicationEventManager.RecordException(String description, Exception exception) in C:\#Geeks.Coder\Application.DataModel\Auditing\ApplicationEventManager.cs:183
There is an XML parsing error with the hibernate-configuration element in the config file.
You need to fix the XML so that it is valid and the hibernate-configuration tag is closed properly.

Resources