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.
Related
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
I have a web application that runs fine on a local dev server(the one that comes with ,net) but when uploaded to iis8 it comes up with a null exception. Not sure where to start.
The app is runing version 4 of the framework.
Value cannot be null.
Parameter name: type
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.ArgumentNullException: Value cannot be null.
Parameter name: type
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:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +10703382
System.Activator.CreateInstance(Type type) +6
System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated) +77
System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated) +256
System.Web.HttpContext.get_Profile() +113
MB.ASTechnology.UI.BasePage.InitializeCulture() +36
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) +91
ASP.default_aspx.FrameworkInitialize() +44
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48
System.Web.UI.Page.ProcessRequest() +72
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +58
ASP.default_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
I have an MVC application and it has essentially two stacktraces, im wondering why there are two of them though?..
[MissingMethodException: No parameterless constructor defined for this object.]
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.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67
[InvalidOperationException: An error occurred when trying to create a controller of type 'PteDotNet.Web.Controllers.BlogController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +182
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +232
System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +49
System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970356
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
One is a stacktrace of an inner exception.
It looks like you first got a MissingMethodException, with reason
No parameterless constructor defined for this object.
That caused an InvalidOperationException, with reason
An error occurred when trying to create a controller of type 'PteDotNet.Web.Controllers.BlogController'. Make sure that the controller has a parameterless public constructor.
So apparently your BlogController needs a parameterless constructor.
I'am not completely sure, but It looks like the Root Cause:
The MissingMethodException is fired first, then the InvalidOperationException gets fired, because of the first Exceptin
The InvalidOperationException is the exception thrown, but it is thrown as a result of a MissingMethodException and this exception is included as the InnerException of the InvalidOperationException. The InvalidOperationException explains what went wrong but looking at the InnerException you can see where the failure was triggered in the first place.
When you evaluate ToString() on an exception with an inner exception you get stack traces of all nested inner exceptions to help you understand the problem. A common mistake is to use ex.Message + ex.StackTrace for diagnostics purposes but you loose information about inner exceptions. Unless you want to hide this valuable information you should always use ex.ToString() when logging exceptions.
In the MVC framework there is code similar to this:
try {
// Will throw MissingMethodException if there is no parameterless constructor.
var controller = Activator.CreateInstance(type);
...
}
catch (MissingMethodException ex) {
var message = String.Format("An error occurred when trying to create a controller of type '{0}'. Make sure that the controller has a parameterless public constructor.", type);
throw new InvalidOperationException(message, ex);
}
So instead of getting a MissingMethodException which might confuse you, you get an InvalidOperationException with a nice explanation. This is an example of best practice when it comes to exception handling.
I've added a custom attribute ("custom_contacttype") to the Contact entity. This attribute is of type picklist which is comprised of seven values. I'm developing using Advanced Developer Extensions for Microsoft Dynamics CRM against CRM 4.0. After I set the value for this attribute and call SaveChanges() I get "Object reference not set to an instance of an object." error. I've been battling this one for a while. What am I doing wrong? Below is my code:
var crm = new CrmDataContext(context.Connection);
var saveContact = crm.GetEntities("contact").Where(p => p.GetPropertyValue<Guid> ("contactid") == contact.Id.Value).Single();
saveContact.SetPropertyValue("custom_contacttype", 2, typeof(Picklist));
crm.UpdateObject(saveContact);
crm.SaveChanges();
Trace Log from CRM Server:
[2011-07-01 16:39:33.7] Process: w3wp |Organization:f827deb3-c6cc-df11-bc07-005056887b79 |Thread: 8 |Category: Platform.Sdk |User: 822138f1-c574-e011-9dca-005056887b79 |Level: Error | PluginStep.Execute
at PluginStep.Execute(PipelineExecutionContext context)
at Pipeline.Execute(PipelineExecutionContext context)
at MessageProcessor.Execute(PipelineExecutionContext context)
at InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at CrmServiceInternal.Update(String namespaceName, BusinessEntityBase entity, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at CrmService.Update(BusinessEntity entity)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at WebServiceHandler.Invoke()
at WebServiceHandler.CoreProcessRequest()
at SyncSessionlessHandler.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
Web Service Plug-in failed in SdkMessageProcessingStepId: {27DF4121-19BC-DF11-A90E-005056887B79}; EntityName: contact; Stage: 10; MessageName: Update; AssemblyName: AccessCRM.ChangeLogContactData, AccessCRM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a030c130976783ab; ClassName: AccessCRM.ChangeLogContactData; Exception: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at AccessCRM.PluginUtilities.GetStringValueFromProperty(Property p)
at AccessCRM.ChangeLogContactData.Execute(IPluginExecutionContext context)
at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
.
[2011-07-01 16:39:33.7] Process: w3wp |Organization:f827deb3-c6cc-df11-bc07-005056887b79 |Thread: 8 |Category: Platform.Sdk |User: 822138f1-c574-e011-9dca-005056887b79 |Level: Error | PluginExecutionExceptionHandler.Handle
at PluginExecutionExceptionHandler.Handle(Stream from, Stream to, Exception exception)
at CompositeSoapExtensionExceptionHandler.Handle(Stream to, Stream from, Exception exception)
at CrmAuthenticationSoapExtensionBase.ProcessMessage(SoapMessage message)
at SoapMessage.RunExtensions(SoapExtension[] extensions, Boolean throwOnException)
at SoapServerProtocol.WriteException(Exception e, Stream outputStream)
at WebServiceHandler.WriteException(Exception e)
at WebServiceHandler.Invoke()
at WebServiceHandler.CoreProcessRequest()
at SyncSessionlessHandler.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
CrmSoapExtension detected InvalidPluginExecutionException:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Microsoft.Crm.Sdk.InvalidPluginExecutionException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at AccessCRM.PluginUtilities.GetStringValueFromProperty(Property p)
at AccessCRM.ChangeLogContactData.Execute(IPluginExecutionContext context)
at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.CrmServiceInternal.Update(String namespaceName, BusinessEntityBase entity, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.Crm2007.CrmService.Update(BusinessEntity entity)
--- End of inner exception stack trace ---
Looking at the stack trace, the error is actually being thrown in a plugin, not in the code you have pasted above. Look at this line in particular:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at AccessCRM.PluginUtilities.GetStringValueFromProperty(Property p)
at AccessCRM.ChangeLogContactData.Execute(IPluginExecutionContext context)
You'd need to post up the code for that plugin for us to have another look.
Alternatively use Remote Debugging to debug this yourself.
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.