我有一个我的ASP.NET应用程序使用的WCF Web服务。它已经工作很长时间了。
我刚刚添加了一个dev-express网格(和dev-express dll)和一个使用它们的新页面,现在我在WSDL上得到了解析错误。
但奇怪的是它起作用了
在我的机器上很好
但是
在Web服务器计算机上失败
. (两者都连接到同一个Web服务WSDL。)
以下是我收到的错误消息:
Server Error in '/MyWebAppWebDev' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Reference.svcmap: Failed to generate code for the service reference 'MyWebAppService'.
Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Referenced type 'WebClientApp.MyWebAppService.ReferenceUpdatesDataContract, WebClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' with data contract name 'ReferenceUpdatesDataContract' in namespace 'http://schemas.datacontract.org/2004/07/MyWebAppServiceLibrary.DataContracts' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IMyWebAppReferenceDataServiceLib']
Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IMyWebAppReferenceDataServiceLib']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='MyWebAppServicesDefaultEndpoint']
Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='MyWebAppServicesDefaultEndpoint']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='MyWebAppReferenceDataServiceLib']/wsdl:port[@name='MyWebAppServicesDefaultEndpoint']
Source Error:
[No relevant source lines]
Source File: /MyWebAppWebDev/App_WebReferences/MyWebAppService/ Line: 1
我在这件事上完全受不了。我已经检查了我的web.config端点地址,它是现场的(尤其是上面的错误消息中没有)。
任何想法都会受到欢迎。
我尝试过的事情:
-
授予C:\windows\temp对我的网站用户名的权限
-
授予C:\Windows\Temp对我的应用程序池用户名的权限
-
检查我的数据协定是否都不是通用的,并且其中isreference=true。