Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I know this is old but I'll reply anyway.</p> <p>It sounds like you have Forms Auth for the MVC website, and using Nancy as an API under say <code>/nancy</code></p> <p>To disable the authentication in that directory path you can add a <code>location</code> in your web.config, you most likely have one already to setup Nancy to run.</p> <p>Something like:</p> <pre><code>&lt;location path="nancy"&gt; &lt;system.web&gt; &lt;compilation debug="true" targetFramework="4.0" /&gt; &lt;httpHandlers&gt; &lt;add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/&gt; &lt;/httpHandlers&gt; &lt;/system.web&gt; &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;handlers&gt; &lt;add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;/location&gt; </code></pre> <p>All you need to do in here is allow anonymous access, this can be done by adding <code>authorization</code> into <code>system.web</code>. Update the <code>system.web</code> like so:</p> <pre><code>&lt;system.web&gt; &lt;compilation debug="true" targetFramework="4.0" /&gt; &lt;httpHandlers&gt; &lt;add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/&gt; &lt;/httpHandlers&gt; &lt;authorization&gt; &lt;allow users="*"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; </code></pre> <p>And this should ignore authentication for the folder now. </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.
    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