将WCF服务发布到IIS错误 [英] Publishing WCF Service to IIS Errors
问题描述
我正在使用VS2010框架v4.0并将其发布到Windows 2003 IIS 6.0.该服务可以在我的本地计算机上正常运行.但是当我发布到服务器并尝试添加引用时,出现以下错误:
I am using VS2010 Framework v4.0 and publishing to Windows 2003 IIS 6.0. The service works fine on my local machine. But when I publish to the server and try to add a reference I get these errors:
下载"https://www.trustmarkonlinesolutions.com/wcferroremail/service1.svc"时出错.
请求失败,HTTP状态为404:找不到.
元数据包含无法解析的参考:"https://www.trustmarkonlinesolutions.com/wcferroremail/service1.svc".
远程服务器返回了意外的响应:(405)不允许使用方法.
远程服务器返回错误:(405)不允许使用方法.
如果服务是在当前解决方案中定义的,请尝试构建解决方案并再次添加服务引用.
There was an error downloading 'https://www.trustmarkonlinesolutions.com/wcferroremail/service1.svc'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'https://www.trustmarkonlinesolutions.com/wcferroremail/service1.svc'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
If the service is defined in the current solution, try building the solution and adding the service reference again.
我尝试使用创建新项目(GetData)时遇到的默认WCF并遇到相同的问题.
I tried with just the default WCF that you get when you create a new project (GetData) and have the same issue.
感谢您的帮助.
推荐答案
您好,请确保已在IIS上配置了WCF. IIS 6要求您手动运行ServiceModelReg.exe. http://msdn.microsoft.com/en-us/library/aa751792.aspx 以获取更多详细信息.
Hello, please make sure you've configured WCF on IIS. IIS 6 requires you to manually run ServiceModelReg.exe. Refer to http://msdn.microsoft.com/en-us/library/aa751792.aspx for more details.
这篇关于将WCF服务发布到IIS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!