I am trying to use form authentication for two different virtual directories under the same domain. One directory is for my application called /MyApp/. The other virtual directory contains static .pdf files called /PDF/.
Below is my web.config for /MyApp/. This works as expected, the first time a user hits any webform here, the user is redirected to login.aspx and asked for a UID and password before being allowed into any page.
<authentication mode="Forms">
<forms name="mycookie" loginUrl="login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
For the /PDF/ virtual ...
Go to the complete details ...