tags:

views:

123

answers:

2

Hi, I have a web application that I use Login Control and ASP.net membership for Sign in process. my application work propebly untill last week I upload new version, in this version I didnt change the login UC and just the main page ( default page after user logged in ) changed.

but some users report me they cant login and redirect to Login page. some note: 1- this problem occure just in IE browser 2- users that report this problem can login to old version

I add a log procedure and see users redirected becuase of this code

if (!this.User.Identity.IsAuthenticated)
{
    Response.Redirect("~/Secure/Signin.aspx");
}

I checked and see this.User.Identity.Name was empty or null.

What setting maybe changed?

Thanks

A: 

Doubt this will solve the problem, it's kind of tangental. But, rather than hand coding the redirect url it's poosible to use

FormsAuthentication.RedirectToLoginPage()

which has the benefit of taking care of the returnUrl and stuff. It'd require the login Url set in the web.config.

Mark Holland
thanks, but dont change anythings
Ashian
A: 

I've seen a similar thing happen when there was a malformed FORM tag was rendered inside my ASP.Net Server FORM tag. By 'malformed' I mean that it was missing the required METHOD attribute.

It is my understanding that the HTML spec doesn't support nested FORM tags, so different browsers handle them differently. In my case, I saw a similar issue as you describe, with no issues in Firefox, and major issues in IE.

Check to ensure there are no Nested FORM tags on your page. Also check all FORM tags to ensure they have all required attributes.

Ryan Done
thanks for your reply, where I have to check , Login Page or destination pages?
Ashian
I believe that the login page is where the problem would be because that is where the form is being submitted.Start by checking the rendered output of the page. Open the page in IE, view source, and look for FORM tags. If there are multiple FORM tags, make sure that they are separate forms and that one FORM is not within another FORM.
Ryan Done