属性“XmlSerializerFormatAttribute”时出错
2012-07-10 09:49
302 查看
异常信息:
System.InvalidOperationException: 在类型“JxtServiceSoap”中方法“Send”上加载属性“XmlSerializerFormatAttribute”时出错。有关详细信息,请参阅 InnerException。 ---> System.NullReferenceException: 未将对象引用设置到对象的实例。
在 System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Description.ServiceReflector.GetCustomAttributes(ICustomAttributeProvider attrProvider, Type attrType, Boolean inherit)
在 System.ServiceModel.Description.ServiceReflector.GetSingleAttribute[T](ICustomAttributeProvider attrProvider)
在 System.ServiceModel.Description.ServiceReflector.GetSingleAttribute[T](ICustomAttributeProvider attrProvider, Type[] attrTypeGroup)
在 System.ServiceModel.Description.TypeLoader.GetFormattingAttribute(ICustomAttributeProvider attrProvider, Attribute defaultFormatAttribute)
在 System.ServiceModel.Description.TypeLoader.AddBehaviors(ContractDescription contractDesc, Type implType, Boolean implIsCallback, ContractReflectionInfo reflectionInfo)
在 System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
在 System.ServiceModel.ChannelFactory`1.CreateDescription()
在 System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
在 System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
在 System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
在 System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
在 System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
在 System.ServiceModel.ClientBase`1..ctor()
解决办法:
安装.net framework 3.5 sp1 即可
官方下载地址:http://www.microsoft.com/zh-cn/download/details.aspx?id=22
System.InvalidOperationException: 在类型“JxtServiceSoap”中方法“Send”上加载属性“XmlSerializerFormatAttribute”时出错。有关详细信息,请参阅 InnerException。 ---> System.NullReferenceException: 未将对象引用设置到对象的实例。
在 System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Description.ServiceReflector.GetCustomAttributes(ICustomAttributeProvider attrProvider, Type attrType, Boolean inherit)
在 System.ServiceModel.Description.ServiceReflector.GetSingleAttribute[T](ICustomAttributeProvider attrProvider)
在 System.ServiceModel.Description.ServiceReflector.GetSingleAttribute[T](ICustomAttributeProvider attrProvider, Type[] attrTypeGroup)
在 System.ServiceModel.Description.TypeLoader.GetFormattingAttribute(ICustomAttributeProvider attrProvider, Attribute defaultFormatAttribute)
在 System.ServiceModel.Description.TypeLoader.AddBehaviors(ContractDescription contractDesc, Type implType, Boolean implIsCallback, ContractReflectionInfo reflectionInfo)
在 System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
在 System.ServiceModel.ChannelFactory`1.CreateDescription()
在 System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
在 System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
在 System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
在 System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
在 System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
在 System.ServiceModel.ClientBase`1..ctor()
解决办法:
安装.net framework 3.5 sp1 即可
官方下载地址:http://www.microsoft.com/zh-cn/download/details.aspx?id=22
相关文章推荐
- .net程序员的盲点(二):两个“属性”引起的歧异-property和attribute的区别
- attrs.xml文件中属性类型format值的格式
- eclipse下由于修改了项目名称web.xml出错 Attribute "xmlns" was already specified for element "web-app"
- WebService生成XML文档时出错。不应是类型XXXX。使用XmlInclude或SoapInclude属性静态指定非已知的类型。
- Xml/Binary SerializerHelper and XmlReader read xml node/attribute on foward-only sequential
- attrs.xml文件中属性类型format值的格式
- 尝试向 URI“ ”发出请求时出错。这可能是由于试图以跨域方式访问服务而又没有正确的跨域策略,或策略不适用于 SOAP 服务...。出现此错误也可能是由于使用的是 Web 服务代理中的内部类型而没有使用 InternalsVisibleToAttribute 属性。
- 使用 JSON JavaScriptSerializer 进行序列化或反序列化时出错。字符串的长度超过了为 maxJsonLength 属性设置的值
- 本地连接属性“出现意外错误”的解决办法
- [Android]attrs.xml文件中属性类型format值的格式
- WebService生成XML文档时出错。不应是类型XXXX。使用XmlInclude或SoapInclude属性静态指定非已知的类型。
- Android attrs.xml文件中属性类型format值的格式
- Android出错问题:AndroidManifest.xml:2: error: No resource identifier found for attribute 'installLocatio
- DotNetNuke出错:“Runat 属性必须具有值 Server(The Runat attribute must have the value Server Error)"
- 更新XML的Attribute(属性)
- [Android]attrs.xml文件中属性类型format值的格式
- c# .net core System.Xml.Serialization 需使用包 System.Xml.XmlSerializer补齐属性
- [Android]attrs.xml文件中属性类型format值的格式
- Fields marked with ObsoleteAttribute will be ignored by XmlSerializer
- XML元素(element)与属性(attribute)