安装.net framework 3.5 sp1后出现System.InvalidOperationException问题

时间:2011-02-22 08:41:26

标签: .net-3.5

我刚刚安装了.net framework 3.5 sp1后,我收到了以下错误。

: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)

做.net框架3.5 sp1有任何问题。

THX 贾格纳。

1 个答案:

答案 0 :(得分:2)

我刚刚重新生成了wcf代理,新代理现在包含一些与故障相关的新部分。它解决了我的问题。

这是与框架3.5 sp1相关的问题