c# - How do I ensure I have authorization to the root page of my website? -



c# - How do I ensure I have authorization to the root page of my website? -

i have website uses asp.net forms authentication using .net 4.0 on iis 7. have secured site using 3rd party single-sign on provider (jasig cas), , works well.

the default documents list in iis has default.aspx @ top.

the default page of website default.aspx , opened public below snippet web.config, 1 time again works expected when navigate straight page.

<location path="default.aspx"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location>

the problem i'm having when navigate root of website ie www.mydomain.com rather www.mydomain.com/default.aspx redirected forms authentication page.

surely same page, , subject same authorization rules?

i stuck on this, , not know turn.

there similar question in stack overflow:

allowing anonymous access default page

in global.asax, place next code in application_beginrequest method:

if (request.apprelativecurrentexecutionfilepath == "~/") httpcontext.current.rewritepath("default.aspx");

c# asp.net webforms forms-authentication

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -