none
How do I convert this to code RRS feed

  • Question

  • How do I add the standard endpoint stuff?

    <standardEndpoints> <webHttpEndpoint> <standardEndpoint crossDomainScriptAccessEnabled="true"></standardEndpoint> </webHttpEndpoint> <webScriptEndpoint> <standardEndpoint crossDomainScriptAccessEnabled="true"></standardEndpoint> </webScriptEndpoint> </standardEndpoints> <bindings> <webHttpBinding> <binding name="webHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" /> </webHttpBinding> </bindings>

    Friday, May 31, 2013 5:08 PM

Answers

All replies

  • <standardEndpoints>
        <webHttpEndpoint>
            <standardEndpoint crossDomainScriptAccessEnabled="true"></standardEndpoint>
        </webHttpEndpoint>
        <webScriptEndpoint>
             <standardEndpoint crossDomainScriptAccessEnabled="true"></standardEndpoint>
        </webScriptEndpoint>
    </standardEndpoints>
    
    <bindings>
        <webHttpBinding>
            <binding name="webHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" />
        </webHttpBinding>
    </bindings>
    Friday, May 31, 2013 5:09 PM
  • Hi,

    If you want to configure for cross domain calls, the configure like below.

    <system.serviceModel>
         <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
         <standardEndpoints>
           <webHttpEndpoint>
             <!-- 
                 Configure the WCF REST service base address via the global.asax.cs file and the default endpoint 
                 via the attributes on the <standardEndpoint> element below
             -->
             <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" 
                               crossDomainScriptAccessEnabled="true"/>
           </webHttpEndpoint>
         </standardEndpoints>
       </system.serviceModel>

    You can also refer a blog here for how to make cross domain calls using JSONP.

    http://devlicio.us/blogs/scott_seely/archive/2010/09/07/how-jsonp-works-and-some-bits-about-implementing-it-in-wcf.aspx

    More information on Standard Endpoints, check: http://msdn.microsoft.com/en-us/library/ee358762.aspx .

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, June 4, 2013 2:08 AM
    Moderator