Allow anonymous access to subdirectory



Okay, so I thought this would be easy, but it's not turning out that
way. Let's see how good you guys are! :)

I have a windows authentication-based Intranet application. An excerpt
from the web.config in the root of the application is as follows:

<authentication mode="Windows" />
<allow roles="mydomain\Domain Users" />
<deny users="*" />
<roleManager enabled="true"
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<add name="XmlSiteMapProvider" description="Default SiteMap provider."
type="System.Web.XmlSiteMapProvider" siteMapFile="Web.sitemap"

Then in the /admin subdirectory, I have this:
<allow roles="mydomain\Admins,mydomain\Developers,mydomain\Budget
Admins" />
<deny users="*" />
Then in the a subdirectory inside /admin I have /property which has no
web.config and then inside property I have a folder called /external.
I want to grant anonymous users access to this /external directory...
so I added the following web.config to the /external directory:

<allow users="?" />
As for IIS, the root application authentication is integrated windows
authentication. Then for the external directory, I checked only
anonymous. This used to work in 1.x but now I'm using these
web.configs for security and it now prompts the user to log in.
However, if the user hits cancel, it shows the page. I just want to
prevent the login prompt from showing up.

Thanks in advance!


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question