page redirects to login page

Posted by Write2varun under ASP.NET on 10/5/2013 | Points: 10 | Views : 892 | Status : [Member] | Replies : 4
hi

i have a web application when we click first time on any page it redirect to the log in page,
when i log in again i can access the page and it works fine it is only giving error when i'm hosting it on IIS

I'm using
iis 8
asp.net 4.0
os: sql server 2012
Browser :IE 10

m using form authentication the user can see the login page before login and once he logs in and tries to go the next page he is redirected to the login page again again he enter the credentials the page works fine but when i restart the server the error cones again

web key


<identity impersonate="true" />
<authentication mode="Forms">
<sessionState timeout="180" />





Responses

Posted by: Bandi on: 10/5/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
refer
http://stackoverflow.com/questions/14489155/asp-net-mvc-4-application-under-iis7-5-not-redirecting-to-login-page
http://www.hanselman.com/blog/RedirectingASPNETLegacyURLsToExtensionlessWithTheIISRewriteModule.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Write2varun, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Write2varun on: 10/5/2013 [Member] Starter | Points: 25

Up
0
Down
it didn't solve my problem

Write2varun, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jammyhunt on: 10/7/2013 [Member] Starter | Points: 25

Up
0
Down
have you edited web.config file for authorization?
code should look like this

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<authentication mode="Forms"/>
<customErrors mode="Off"/>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</configuration>

Write2varun, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 10/8/2013 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
what is the Error ?

Thank you for posting at Dotnetfunda
[Administrator]

Write2varun, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response