Things I'd like to achieve
I set index.html(default.html, etc) as most prevailing default page in ASP.NET Web Application, and hope to let it show when user set url of the WebApps without page name.
I thinkg, if the url of the WebApp is something like 'http://www.somewhere.com/testApps/
', when you set it in browser's address bar, index.html would be shown.
But if the web application uses form authentication, it does not work.
Environment
- OS: Windows 7 Pro or Windows Server 2008
- IIS Server: IIS 7.5.7600
- Web Application/ ASP.NET 4.0, ASP.NET 2.0
The way to reproduce the problem
- Make a simple ASP.NET Web Application which uses form
authentication. f.e. WebApp url is '
http://localhost/testApps/
' - Make a simple login form which publishes authentication ticket if user put any ID and Password, and set it as a login form of the form authentication in web.config.
- Default.aspx simply shows the page name in a text box, which is designaged in Page_Load method.
- Make a Index.html which statically shows its page name in the body.
Set the following entry in web.config last parts.
So far, when you set '
http://localhost/testApps/Index.html
', the Index.html is shown. But when you set 'http://localhost/testApps/
', the Login page is shown instead of Index.html
That's all. Any advice, suggestion, hit would be appreciated.
Thank you.