This is a small thing but it is driving me crazy and I am hoping that an IIS expert can help.
The scenario is simple:
- IIS is configured so that “default.aspx” is the default document for
a site. - Forms authentication is on and the loginUrl is default.aspx
and defaultURL is default.aspx - In web.config, the default.aspx document has an authorization of ‘ * ‘ (anyone can access)
When I navigate to the site with just the base url: http://www.somesite.com the URL comes back with: http://www.somesite.com/default.aspx?ReturnUrl=%2f
If I navigate to the full name (www.somesite.com/default.aspx) it does not have the ReturnUrl. So, why, when IIS adds the name, do we get the weird redirect but not when we type it?
You need to add
<allow users="?" />to allow non-logged-in users too.