Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I typed up a summary since many were facing the same situation regarding subfolder authentication.</p> <p>Subfolder Authorization</p> <ul> <li>ASP.NET can only have a single authentication mode for one application. </li> <li>The different applications CANNOT share resource among them.</li> </ul> <p>Scenario</p> <p>Let's say the home page should not prompt login dialog. It should let users pass through without whatever login is. However, in the same applicatiopn, in a different folder presumably, another page needs to check user permission against database table using user network login ID. By default IE treats all web site with only hostname a Intranet. By its default intranet setting, it will not prompt the login dialog and pass user login and password to the application if Windows Authentication is used. However, the tricky party is, if the application has an actual domain, IE will think it is an Internet site, and it will prompt the login and password if Windows Authentication is used.</p> <hr> <p><strong>The only way to not to promopt login dialog for Internet site using Windows Authentication, is to also turn on the anonymous authentication in IIS.</strong> However, you will lose the ability to capture the login info because the Anonymous has precedence over the Windows Authentication. The good news is there is a way to resolve that issue. If an application subfolder needs to capture the login information, you will need to overwrite the parent authorization in Location element in web.config.</p> <p>1 In IIS, configure Authentication as follows:</p> <ol> <li>Enable Anonymous Authentication,</li> <li>Enable Windows Authentication</li> </ol> <p>2 Add the followings in Web.Config.</p> <pre><code>&lt;authentication mode="Windows" /&gt; &lt;authorization&gt; &lt;allow users="*" /&gt; &lt;/authorization&gt; &lt;!-- secured is the relative subfolder name. deny anonymous user, so only the authenticated login will pass through --&gt; &lt;location path="secured" allowOverride="true"&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;deny users="?" /&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/location&gt; </code></pre>
    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