[英]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.