System.InvalidOperationException error after installing .net framework 3.5 sp1

I just installed .net framework 3.5 sp1 after that, I get the following error.

:System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Type 'SL.CreateDocs' cannot be added to list of known types since another type 'SL.MyList' with the same data contract name 'http://schemas.datacontract.org/2004/07/SL.Object:DocList' is already present.

Server stack trace: 
   at System.Runtime.Serialization.DataContract.CheckAndAdd(Type type, Dictionary`2 typesChecked, Dictionary`2& nameToDataContractTable)
   at System.Runtime.Serialization.XmlObjectSerializerContext.GetDataContractsForKnownTypes(IList`1 knownTypeList)
   at System.Runtime.Serialization.DataContractSerializer.get_KnownDataContracts()
   at System.Runtime.Serialization.XmlObjectSerializerContext..ctor(DataContractSerializer serializer, DataContract rootTypeDataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.CreateContext(DataContractSerializer serializer, DataContract rootTypeDataContract)
   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader)
   at System.ServiceModel.Dispatcher.FaultFormatter.CreateFaultException(MessageFault messageFault, String action)
   at System.ServiceModel.Dispatcher.FaultFormatter.Deserialize(MessageFault messageFault, String action)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

do.net framework 3.5 sp1 has any problems.

thanks jagannath.

+3
source share
1 answer

I just updated the wcf proxy, the new proxy now contains a new section related to the error. he solved my problem.

This is a problem with the 3.5 sp1 framework

+2
source

Source: https://habr.com/ru/post/1793803/


All Articles