webHttpbinding在wcf休息服务中 [英] webHttpbinding in wcf rest service

查看:62
本文介绍了webHttpbinding在wcf休息服务中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个wcf休息服务。



服务运行正常。



但是在web.config页面 -

I have created a wcf rest service.

service is working properly.

but in web.config page -

<services>
      <service name="WcfServiceStudent.Service1" behaviorConfiguration="WcfServiceStudent.Service1Behavior">
        <!-- Service Endpoints -->
        <endpoint address="" binding="wsHttpBinding" contract="WcfServiceStudent.Istudent">
          <!-- 
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.
          -->
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfServiceStudent.Service1Behavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>



在此有使用wshttpbinding但我想使用webHttpBinding

推荐答案

检查这个

WCF - 使用WebHttpBinding进行REST服务 [ ^ ]


参考这个...

初学者关于创建WCF REST服务的教程 [ ^ ]







创建RESTful WCF服务API:循序渐进指南 [ ^ ]







WCF RESTful服务并在HTML页面中使用它们[ ^ ]
Refer This...
A Beginner's Tutorial on Creating WCF REST Services[^]

And

Create RESTful WCF Service API: Step By Step Guide[^]

And

WCF RESTful services and consuming them in an HTML page[^]


这篇关于webHttpbinding在wcf休息服务中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆