Forms Authentication Ignoring Default Document

后端 未结 7 1600
无人共我
无人共我 2020-11-28 10:01

I have spent a day and a half trying to resolve this issue. Bascially have an ASP.net website with Forms Authentication on IIS7 using Framework 4.0.

The Authorizati

7条回答
  •  情话喂你
    2020-11-28 10:38

    This was my solution:

    In Global.asax, method: Application_BeginRequest, place the following:

    if (Request.AppRelativeCurrentExecutionFilePath == "~/")  
       HttpContext.Current.RewritePath("HomePage.aspx");
    

    Nice and simple, and you have a chance to build logic around what home page you want to use if your website uses multiple home pages based on configuration variables.

    Dmitry.Alk

提交回复
热议问题