Last post Jan 16, 2013 03:00 AM by cmore
Jan 15, 2013 05:06 AM|cmore|LINK
I have a default.aspx and forms authentication working.
The project is set up as a web site.
I am using master pages (I have a site.master).
When I run the site from within the IDE, default.aspx loads.
When I run the site outside of the IDE by typing in the URL (with /default.aspx specified) it loads login.aspx
When I run the site outside of the IDE by typing in the URL (with no page specified) it loads login.aspx
This last statement is the problem. I want it to load default.aspx as the "landing page", instead of forcing them to log in.
Jan 15, 2013 05:18 AM|Rion Williams|LINK
You should be able to set the default page within the
defaultDocument element in your project's web.config file :
<add value="default.aspx" />
Jan 15, 2013 05:24 AM|ManikandanUlagu|LINK
during the host your application set the default page under the documen t ab(in the IIS).
Jan 15, 2013 07:04 AM|oned_gk|LINK
set defalult aspx to allow anynomouse
Jan 15, 2013 12:57 PM|cmore|LINK
All three of these suggestions were already confirmed as in place. Thank you for the suggestions but I remain stumped.
It's almost like it is ignoring the default page because, despite a specific allow for default.aspx, the directory itself is set to deny anonymous.
Unfortunately, if it is that simple, I don't understand why it loads Default.aspx without logging in when I type it in the URL in the browser.
http://localhost/TMaxApp/Default.aspx Loads fine. It is set as my default page both in IIS as well as the project. It loads as the default page when I run from within visual studio.
However, despite all users being allowed access to Default.aspx in the web.config, when the URL
http://localhost/TMaxApp is entered, it goes to the login page.
Jan 16, 2013 03:00 AM|cmore|LINK
I found the answer (http://stackoverflow.com/a/5549254/1982253). Excerpt:
Forms Authentication Ignoring Default Document
if (Request.AppRelativeCurrentExecutionFilePath == "~/") HttpContext.Current.RewritePath("HomePage.aspx");