Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Service and Behaviour in WCF

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 44
    Comment on it

     

    Service Behavior
     

    The [Service Behavior] attribute is used to apply behavior at the service level. It allows you to control things such as: 

    • Concurrency
    • Throttling
    • Transaction
    • Session Management
    • Thread Behavior

     

    <services>
          <service behaviorConfiguration="DemoAPI.ServiceBehavior"
            name="DemoAPI.Service">
            <endpoint behaviorConfiguration="webBehavior" binding="webHttpBinding"
              contract="DemoAPI.INudgeService" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
          </service>
        </services>

     

    This contains the service section where we define the service name the endpoint section what kind of communication we will provide while transfering data from client to server

     

    <behaviors>
          <serviceBehaviors>
            <behavior name="DemoAPI.ServiceBehavior">
              <!-- To avoid disclosing metadata information, 
              set the value below to false 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="True" />
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="webBehavior">
              <webHttp defaultOutgoingResponseFormat="Json" />
            </behavior>
          </endpointBehaviors>
        </behaviors>

    This is the behaviour section that includes metadata settings which needs to be defined for accessing and viewing properties associated with this service

    .net

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: