首页 新闻 会员 周边

wcf webget相关

0
悬赏园豆:5 [已解决问题] 解决于 2015-11-18 12:58
    [ServiceContract(Namespace="www.waha.com")]
    public interface IEmployees
    {
        [WebGet(UriTemplate="getall",RequestFormat=WebMessageFormat.Json,ResponseFormat=WebMessageFormat.Json)]
        string GetAll();
    }

    public string GetAll()
    {
        return "wcf rest test!";
    }

我用控制的台应用程序自托管时,调用是对的!

http://127.0.0.1:8756/MyService/getall

但托管为was

http://localhost/wcftest5/WCFTest6.Classs.EmployeesService.svc/getall/

调用的时候却提示说404,是为什么?

问题补充:

简单的说就是WCF使用IIS寄宿,如何实现WebGet!!!!求大神!!

wa3ha的主页 wa3ha | 初学一级 | 园豆:151
提问于:2015-09-08 13:37
< >
分享
最佳答案
0

我擦,其实试试iis的中功能没有启用!

wa3ha | 初学一级 |园豆:151 | 2015-11-18 12:58
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册