merlin2011
merlin2011

Reputation: 75545

Is it possible to disable forms authentication for specific subdirectories of an application?

I have an asp.net application for which I need to expose a particular subdirectory to the public internet. When I go into the subdirectory's IIS configuration's authentication section, I cannot disable the Forms Authentication.

The setting is marked as read-only.

Google offers many discussions when I search for the error message, but I haven't found a clear, working solution.

Upvotes: 1

Views: 4415

Answers (2)

doogle
doogle

Reputation: 3406

In the application's root web.config, open it up and find the "</system.web>" line. Then add something like the code below to enable unrestricted access to a directory:

<location path="MY FOLDER/PATH">
    <system.web>
        <authorization> 
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

Upvotes: 3

dotnetstep
dotnetstep

Reputation: 17485

You have to use location in root Web.config.

http://support.microsoft.com/kb/815174

 <location path="Your directory" allowOverride=”false”>
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>

Upvotes: 3

Related Questions