I cannot get my site to allow anonymous access to the login page. I've tried all the recommended fixes to no avail. Currently I have it set up as follows:
1) Forms authentication is configured in web.config and anonymous access is disabled
<configuration> ...<system.web> ... <authentication mode="Forms"><forms name=".ASPXFORMSAUTH" loginUrl="Account/Authenticate.aspx"></forms></authentication><authorization><deny users="?"/></authorization>
2) A special allowance for anonymous users has been added to the login page
</system.web><location path="Account/Authenticate.aspx"><system.web><authorization><allow users="?"/></authorization></system.web></location>
I have disabled windows authentication and enabled anonymous authentication in IIS Express. I've done this using the project Properties window in VS2013, but I've also verified the settings in applicationhost.config in my user IIS Express directory.
I have also uploaded this site to a live server and attempted to configure it there, but the results are the same. On the live site I use the full IIS 7.x interface to enable forms authentication and disable all other methods and I point to the correct login page (Account/Authenticate.aspx). The redirection to the login page works correctly, but I get the 401 unauthorized access error.
If I enable Windows authentication alongside anonymous authentication on the debug server everything works as it is supposed to, but this does not work on the production server.
Does anyone know how to fix this?