Hi Zino,
As for the problem you mentioned, I think the main cause is the IIS Virtual
dir's default docment setting, also there are some other things we should
pay attention, let's check them step by step:
1. The reason why you found the FormsAuthentica tion.GetRedirec tUrl always
return the "default.as px" , I think this should occur when we visit the web
application via such url:
http://webserver/webapp/
rather than
http://webserver/webapp/certainpage.aspx yes? ( I think this url will be
redirected to login page with the
certainpage.asp x as the RedirectUrl value)
When we using the first style url, the IIS will look for the default
document in the VIRTUAL DIR, and by default there will have "default.as p",
"default.html", ... ."default.as px" in the default document list, and since
only the "default.as px" will be processed by asp.net , so the "Original
Requested Url" will be the "default.as px" when redirected to login page.
2. If you want to make your own page as the default visited document, you
can add them in the IIS's virutal dir default document list. Just start the
IIS management console( inetmgr.exe) and select the virtual dir's
properties and swtich into "documents" panel , you'll find that setting.
3. As you mentioned that you have your own start page "myStartPage.ht mL"
,yes? If so, I strongly recommend that you change your myStartPage.htm l
into an ASP.NET web page. Because only "aspx" page will be served by
asp.net runtime. Static pages othe static resource will directly be
processed by IIS rather than ASP.NET. So the html pages can't be protected
by the ASP.NET's formsauthentica tion. WE need to make all the pages( which
should be protected by forms authentication) as aspx page.
Please have a check on the above items. If you have any other questions,
please feel free to post here. thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)