Salient Solutions

wrasslin ones and nones for fun and profit - Sky Sanders' Blog
Get your own ranked flair here
posts - 92, comments - 102, trackbacks - 0

Adding a ajax/json endpoint to an existing WCF service

Mixing and matching security to get something like this locked down and providing the desired exposure might be challenging but I didn't offer to solve that in the title, did I?

 

 <system.serviceModel>

    <behaviors>

      <endpointBehaviors>

        <behavior name="webScriptBehavior">

          <enableWebScript />

        </behavior>

      </endpointBehaviors>

      <serviceBehaviors>

        <behavior name="Salient.ScriptModel.Services.DualServiceBehavior">

          <serviceMetadata httpGetEnabled="true" />

          <serviceDebug includeExceptionDetailInFaults="false" />

        </behavior>

      </serviceBehaviors>

    </behaviors>

 

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

    <services>

      <service behaviorConfiguration="Salient.ScriptModel.Services.DualServiceBehavior" name="Salient.ScriptModel.Services.DualService">

        <endpoint address="" binding="wsHttpBinding" contract="Salient.ScriptModel.Services.IDualService"/>

        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

        <endpoint address="json" behaviorConfiguration="webScriptBehavior" binding="webHttpBinding" contract="Salient.ScriptModel.Services.IDualService"/>

      </service>

    </services>

  </system.serviceModel>

 

Technorati tags: , ,

Print | posted on Friday, February 26, 2010 7:04 PM | Filed Under [ CodeProject-Tip ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 5 and 5 and type the answer here:

Powered by: