asp.net - Forms Authentication Ignoring Default Document -
i have spent day , half trying resolve issue. bascially have asp.net website forms authentication on iis7 using framework 4.0.
the authorization stuff seems working every scenario exception of hitting no document specifed (should resolve default doc).
for example (please don't harsh on site still developed ;) ), http://www.rewardroster.com/default.aspx works perfectly, page should allow anon access specified in web.config.
but if hit www.rewardroster.com directly redirects login page return url set "/" or login.aspx?returnurl=%2f
some things have tried:
1) set authentication none , default document worked thats not issue.
2) added defaultdocument attribute web.config
3) deleted entries in default document list in iis except default.aspx
4) added machinekey entry in config
5) toggled integrated classic pipeline in iis
here what's in config:
<authentication mode="forms"> <forms name="appnameauth" loginurl="login.aspx" protection="all" timeout="60" slidingexpiration="true" defaulturl="default.aspx" path="/"> </forms> </authentication> </authentication> <location path="default.aspx">
thanks time , hope knows going on here.
this solution:
in global.asax
, method: application_beginrequest
, place following:
if (request.apprelativecurrentexecutionfilepath == "~/") httpcontext.current.rewritepath("homepage.aspx");
nice , simple, , have chance build logic around home page want use if website uses multiple home pages based on configuration variables.
dmitry.alk
Comments
Post a Comment