Login page appears twice in ASP.NET application on IIS -


i have added login.aspx default document section in iis.

however, when accessing application, required login twice. first 1 wouldn't error message or no redirection next page in application. , second 1 redirect user expected page. , user using right credentials both times. , on local server, able login in first attempt.

i redirecting homepage.aspx login.aspx using web.config. like:

<authentication mode="forms">       <forms loginurl="login.aspx" defaulturl="home.aspx"/>     </authentication> 

after research found need add piece of code in page_load of login.aspx:

if (this.user.identity.isauthenticated) {     response.redirect("home.aspx"); } 

it worked me getting -ve effects. once close application without logging out. , if you'll try give url of login page, gives error. need clear history of browser in order run again.

does know why happening?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -