<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress="TestService.svc" service="Service.EmployeesService" />
</serviceActivations>
</serviceHostingEnvironment>
<behaviors>
<endpointBehaviors>
<behavior name="Web">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<!-- Add the following element to your service behavior configuration. -->
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Service.EmployeesService" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="" binding="webHttpBinding" contract="Service.Interface.IEmployees" behaviorConfiguration="Web" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension, LongDate" />
<modules runAllManagedModulesForAllRequests="true" >
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
</configuration>
web.config in WCF Rest
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.