WCF First Sample 遇到问题

问题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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值