Hi all,
I'm developing a asp.net c# web application.
Basically, my login page is default.aspx, which is in root of the application.
I've set to run in iis, where the url will be http://127.0.0.1/WebSite1
My problem is if i run from any web browser with the url http://127.0.0.1/WebSite1/ my web application takes some time to load the default.aspx (which is the login page). It takes about 1-3 minutes to load the default.aspx page.
But, if i run with the url http://127.0.0.1/WebSite1/default.aspx, it loads fast without any issue.
Even if i run from my visual studio still getting the same issue.
What I have tried:
I've tried below on web.config ;
Attempt 1:
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="/default.aspx" />
</authentication>
<authorization>
<deny users="?"/>
</authorization>
Attempt 2:
<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
On my default.aspx.cs ;
protected void Page_Load(object sender, EventArgs e)
{
if (Request.IsAuthenticated)
{
Response.Redirect("~/Main.aspx");
}
}
Anything i missed here?