小编use*_*013的帖子

在web.config中配置wcf rest服务

web.config应该在以下哪个代码块中使用WCF RESTful服务?

<endpoint address="" binding="webHttpBinding"contract="Wcf_Test.IMyService"    
behaviorConfiguration="httpEndpointBehavour"> 
    <identity> 
        <dns value="localhost"/> 
    <Identity>  
</endpoint>
Run Code Online (Sandbox Code Playgroud)

<behaviors>
    <serviceBehaviors> 
        <behavior name="httpBehaviour"> <serviceMetadata httpGetEnabled="True"/>
            <serviceDebug includeExceptionDetailInFaults="False"/>
        </behavior>
    </serviceBehaviors>
Run Code Online (Sandbox Code Playgroud)

    <endpointBehaviors> 
        <behavior name="httpEndpointBehavour"> 
            <webHttp />
        </behavior> 
    </endpointBehaviors>
</behaviors>
Run Code Online (Sandbox Code Playgroud)

rest wcf web-config

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

rest ×1

wcf ×1

web-config ×1