简体   繁体   English

获取'无法添加服务。 服务元数据可能无法访问。 测试 WCF 项目时出错

[英]Getting 'Failed to add a service. Service metadata may not be accessible.' error when testing a WCF project

I was trying to test the WCF service using the SOAP UI.我试图使用 SOAP UI 测试 WCF 服务。 I was able to successfully run the service and debug the service using the SOAP UI, then, out of the blue, just by itself, without any code or config change, the service behavior changed, and was no longer able to test it我能够使用 SOAP UI 成功运行该服务并调试该服务,然后,出乎意料的是,仅靠它自己,没有任何代码或配置更改,服务行为发生了变化,并且不再能够对其进行测试

All of a sudden, once I would run the service, the strange popup would come up突然之间,一旦我运行该服务,就会出现奇怪的弹出窗口

在此处输入图像描述

And then it would display a strange error然后它会显示一个奇怪的错误

Failed to add a service.添加服务失败。 Service metadata may not be accessible.服务元数据可能无法访问。 Make sure your service is running and exposing metadata确保您的服务正在运行并公开元数据

在此处输入图像描述

I am honestly not sure why this popup would start appearing.老实说,我不确定为什么这个弹出窗口会开始出现。 I tried various things, such as killing IIS Express, rebuilding the solution, and specifying a concrete start page for a concrete service.我尝试了各种方法,例如终止 IIS Express、重建解决方案以及为具体服务指定具体起始页。

Any idea would be appreciated, and once again, everything was working earlier任何想法都将不胜感激,再一次,一切都在早期工作

The solution to this issue was rather strange.这个问题的解决方案相当奇怪。 All that needs to be done is to highlight/select the cs file, NOT the svc.cs file like I was doing before需要做的就是突出/选择cs文件,而不是像我之前做的svc.cs文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 添加服务失败。 服务元数据可能无法访问。 确保您的服务正在运行并公开元数据。 WCF错误 - Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata. WCF Error WCF测试客户端:无法添加服务。可能无法访问服务元数据。确保您的服务正在运行并公开元数据 - WCF Test Client : Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata WCF无法添加服务。 可能无法访问服务元数据。 确保您的服务正在运行并公开元数据 - WCF Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata WCF:无法添加服务。 可能无法访问服务元数据。 确保您的服务正在运行并公开元数据 - WCF: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata 运行WCF服务获取错误添加服务失败。 服务元数据可能无法访问 - Run WCF service getting error Failed to add a service. Service metadata may not be accessible 添加服务失败。 服务元数据可能无法访问。 确保您的服务正在运行并公开元数据 - Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata WCF:无法添加服务。 服务元数据可能无法访问 - WCF:Failed to add a service. Service metadata may not be accessible 添加服务失败。 服务元数据可能无法访问 - Failed to add a service. Service metadata may not be accessible WcfTestClient:添加服务失败。 服务元数据可能无法访问 - WcfTestClient: Failed to add a service. Service metadata may not be accessible 服务元数据可能无法在WCF中访问 - Service metadata may not be accessible In WCF
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM