[英]Unable to add a Service Reference to a WCF service that is hosted locally
I have successfully created my service, I have modified it ever so slightly so that it does a little more than the bog standard "Hello World". 我已经成功创建了我的服务,我对其进行了微小的修改,以使其比沼泽标准“ Hello World”具有更多的功能。
The service compiles and runs and give me the following address to add into my client application: 该服务会编译并运行,并提供以下地址以添加到我的客户端应用程序中:
127.0.0.1:81/Appointments.svc 127.0.0.1:81/Appointments.svc
When I follow the next tutorial in the series: https://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-ssl-certificate/ 当我按照该系列的下一个教程进行学习时: https : //azure.microsoft.com/zh-cn/documentation/articles/cloud-services-configure-ssl-certificate/
During step 5, when I add the reference to the service, it gives me the following error message: 在第5步中,当我将引用添加到服务时,它会给我以下错误消息:
An error (Details below) occurred while attempting to find services at '127.0.0.1:81/Appointments.svc' 尝试在“ 127.0.0.1:81/Appointments.svc”处查找服务时发生错误(下面的详细信息)
Metadata contains a reference that cannot be resolved: '127.0.0.1:81/Appointments.svc?wsdl'. 元数据包含无法解析的引用:'127.0.0.1:81/Appointments.svc?wsdl'。
The WSDL document contains links that could not be resolved. WSDL文档包含无法解析的链接。
There was an error downloading '127.0.0.1:81/Appointments.svc?xsd=xsd0'. 下载'127.0.0.1:81/Appointments.svc?xsd=xsd0'时出错。
The underlying connection was closed: The connection was closed unexpectedly. 基础连接已关闭:连接意外关闭。
Metadata contains a reference that cannot be resolved: '127.0.0.1:81/Appointments.svc'. 元数据包含无法解析的引用:“ 127.0.0.1:81/Appointments.svc”。
Content Type application/soap+xml; 内容类型application / soap + xml; charset=utf-8 was not supported by service 127.0.0.1:81/Appointments.svc.
服务127.0.0.1:81/Appointments.svc不支持charset = utf-8。 The client and service bindings may be mismatched.
客户端和服务绑定可能不匹配。
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; 远程服务器返回错误:(415)由于内容类型为'application / soap + xml,因此无法处理该消息; charset=utf-8' was not the expected type 'text/xml;
charset = utf-8'不是预期的类型'text / xml; charset=utf-8'..
charset = utf-8'。
If the service is defined in the current solution, try building the solution and adding the service reference again. 如果服务是在当前解决方案中定义的,请尝试构建解决方案并再次添加服务引用。
I guess it might be some permission issues. 我想可能是一些权限问题。 Can you try to grant permissions on C:\\Windows\\Temp and see if that resolves your problem.
您可以尝试授予对C:\\ Windows \\ Temp的权限,看看是否可以解决您的问题。 The account that is associated with your apppool under which the service is running needs to have permissions on this folder.
与您的服务运行所在的apppool关联的帐户需要对此文件夹具有权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.