1

我在 Windows 7 Ultimate x64 IIS 7.5 上
我已将服务部署到 Web 服务器,当我在 IE 中像这样尝试它们时:MyService.svc?wsdl我得到了400 "Bad Request" page

我应该得到网络服务的描述,有人知道如何解决这个问题吗?

4

2 回答 2

2

您可能需要在服务器上执行以下操作:

cd c:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\

其次是

ServiceModelReg -i

这应该将 .SVC 扩展注册为 WCF 服务(如果尚未注册)。

于 2010-05-04T14:53:15.167 回答
0

Just an update: When using v4.0 on a 64-bit machine, you need to run go to

c:\windows\microsoft.net\framework64\v4.0.30319\

before running

ServiceModelReg.exe -r

If you go to

c:\windows\microsoft.net\framework\v4.0.30319\

and do the same thing, we found that it doesn't work correctly and we keep getting:

Unhandled Exception: System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/Elephant/Tiger.svc' is unavailable for the protocol of the address.

于 2011-09-01T00:39:04.930 回答