Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF REST breaking when authenticated
    primarykey
    data
    text
    <p>I have a very simple WCF REST Service</p> <pre><code>[ServiceContract] [AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class TestService { [Description("Test Description.")] [WebGet(UriTemplate = "go")] public string Test() { return "hi2u"; } } </code></pre> <p>It is configured in the web config like this:</p> <pre><code>&lt;system.webServer&gt; &lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;/system.webServer&gt; &lt;system.serviceModel&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/&gt; &lt;standardEndpoints&gt; &lt;webHttpEndpoint&gt; &lt;standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" defaultOutgoingResponseFormat="Json" crossDomainScriptAccessEnabled="true" /&gt; &lt;/webHttpEndpoint&gt; &lt;/standardEndpoints&gt;&lt;/system.serviceModel&gt; </code></pre> <p>The route is then bound with the global.asax</p> <p>The problem is that if I authenticate to the application using forms authentication then every time I rebuild the solution and try to go to the service the service breaks with the dreaded Request Error page. If I logout and re-run the application it works fine. I will be using the thread principal at some point so I was wondering how to allow my user to be authenticated via forms authentication while still hitting the service?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload