Advertisement
Guest User

RESTFul Web.config

a guest
May 28th, 2013
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.47 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <configuration>
  3.     <system.web>
  4.       <compilation debug="true" targetFramework="4.5" />
  5.       <httpRuntime targetFramework="4.5" />
  6.     </system.web>
  7.     <system.serviceModel>
  8.       <services>
  9.         <service name="<YOUR_NAMESPACE>.<SERVICENAME>">
  10.           <endpoint address="" binding="webHttpBinding" contract="<YOUR_NAMESPACE>.<INTERFACE_SERVICENAME>" bindingConfiguration="RestServiceBindingConfig" behaviorConfiguration="RestServiceEndpointBehavior" />
  11.         </service>
  12.       </services>
  13.       <bindings>
  14.         <webHttpBinding>
  15.           <binding name="RestServiceBindingConfig">
  16.             <security mode="None"></security>
  17.           </binding>
  18.         </webHttpBinding>
  19.       </bindings>
  20.         <behaviors>
  21.           <endpointBehaviors>
  22.             <behavior name="RestServiceEndpointBehavior">
  23.               <webHttp helpEnabled="true" defaultOutgoingResponseFormat="Xml" automaticFormatSelectionEnabled="false"  />
  24.             </behavior>
  25.           </endpointBehaviors>
  26.             <serviceBehaviors>
  27.                 <behavior name="">
  28.                     <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
  29.                     <serviceDebug includeExceptionDetailInFaults="false" />
  30.                 </behavior>
  31.             </serviceBehaviors>
  32.         </behaviors>
  33.         <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  34.     </system.serviceModel>
  35. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement