asp.net - Redirects to login.aspx but not to default.aspx -


So I have certified the forms to authenticate my web.config. I have two pieces of code in my web.config but this is a strange thing when you go to www.mysite.com, it redirects to login.aspx page but when you have www.mysite.com/default Aspx does not redirect it. Why is it doing this? I have default.aspx

  & lt; System.web & gt; As the default document is set. & Lt; Compilation debug = "true" targetFramework = "4.0" /> & Lt; Authentication mode = "form" & gt; & Lt; Forms loginUrl = "~ / login.aspx" timeout = "2880" defaultUrl = "account / default.aspx" /> & Lt; / Authentication & gt; & Lt; Authority & gt; & Lt; Deny users = "?" / & Gt; & Lt; / Authorization & gt; & Lt; Location path = "default.aspx" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt;    

In the config file it is clearly shown, you have unauthorized users "default. There is no such thing as the aspx "URL clearly" / "URL" Note that it does not matter if they (possibly) finally point to the same physical file on the disk only for URL purposes only for authorization purposes Keeps your & lt; Location & gt; Can clone the tag and there is another for path = "/" that allows access to all users regardless of their authentication status.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -