您的位置:首页 > 其它

WCF First Sample 遇到问题

2011-05-26 22:24 375 查看
问题1:

使用wcftestclient 测试 发生错误, 错误信息如下:

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.

Details:

Error: Cannot obtain Metadata from http://localhost/WCFService/Service.svc

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.

WS-Metadata Exchange Error
URI: http://localhost/WCFService/Service.svc

Metadata contains a reference that cannot be resolved: 'http://localhost/WCFService/Service.svc'.

The remote server returned an unexpected response: (405) Method Not Allowed.

The remote server returned an error: (405) Method Not Allowed.

HTTP GET Error
URI: http://localhost/WCFService/Service.svc

There was an error downloading 'http://localhost/WCFService/Service.svc'.

The request failed with HTTP status 404: Not Found.

解决方法: 进入 c:/windows/Microsoft.Net/Framework/v3.0/Windows Communication Foundation/

执行 ServiceModelReg.exe -i

问题二:

无法打开登录所请求的数据库 "AutoLot"。登录失败。
用户 'IIS APPPOOL/DefaultAppPool' 登录失败。


windows-> inetmgr (打开IIS) -> Application Pools -> DefaultAppPool(或其他)-> Advance Setting -> 设置Identify为NetWorkService
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: