Wednesday, 17 June 2015

Web Config for WCF

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>

    <system.web>
      <compilation debug="true" targetFramework="4.0" />
    </system.web>
  <connectionStrings>
    <add name="connetDis2" connectionString="Data Source=MANI-PC\SQLEXPRESS;Initial Catalog=tesing;Integrated Security=True" />
  </connectionStrings>
 
    <system.serviceModel>

      <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

      <services>
       
          <!--Add this line-->
        <service name="Service" behaviorConfiguration="ServiceBehavior">
          <endpoint address="http://localhost:4904/Service.svc" binding="webHttpBinding" contract="IService" behaviorConfiguration="EndPointBehavior"/>
        </service>
      <!--Add this line-->
     
      </services>
     
      <behaviors>
            <serviceBehaviors>
                <behavior name="ServiceBehavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
       
<!--Add this line-->
        <endpointBehaviors>
          <behavior name="EndPointBehavior">
            <enableWebScript/>
          </behavior>
        </endpointBehaviors>
        <!--Add this line-->
     
        </behaviors>
     
    </system.serviceModel>
</configuration>

No comments:

Post a Comment