469,609 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Strange Login Behavior

I use Forms authentication with a SQL Server database.

The portion of the Web.config Looks like this
Expand|Select|Wrap|Line Numbers
  1.     <authentication  mode="Forms" >
  2.       <forms 
  3.         timeout="43200" 
  4.         loginUrl="~/SimpleLogin.aspx"  
  5.         cookieless="UseCookies" 
  6.         requireSSL="false" 
  7.         protection="All" 
  8.         name=".EPAuth" 
  9.         slidingExpiration="true">
  10.       </forms>
  11.     </authentication>
and this
Expand|Select|Wrap|Line Numbers
  1.     <membership defaultProvider="PaxxerMembership">
  2.       <providers>
  3.         <add connectionStringName="PaxxerMemberShipDB" enablePasswordReset="true" requiresQuestionAndAnswer="false"
  4.  applicationName="Paxxer" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" name="PaxxerMembership" type="System.Web.Security.SqlMembershipProvider" />
  5.       </providers>
  6.     </membership>

Typically I have no problems. The login page is very simple. Just the login control.
Expand|Select|Wrap|Line Numbers
  1.     protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.              this.Login1.RememberMeSet = true;
  4.     }
So here's the rub.
When I go to make the login page more complicated. Adding links, or giving it a masterpage. It starts to act up. And there is no straight forward way to explain it. Sometimes it will log a user name in. Sometimes it won't. Sometimes it will seem to log it in, but then on the page they logged in from, it will say "Log in" instead of "Log out" as expected.

I've added break points in the Load routine. And sometimes just breaking here and continueing seems to make things work. Then not.

I've disabled my Virus scanner having read this might be a problem. Still strange behavior.

I'm not doing anything special or clever here. And would not expect these issues, at all. Any ideas?

I even push the website up to another server, compiled and all. And at that server it will behave intermittantly.

What could make it SOMETIMES work? And sometimes not?

Can I code something in an event to force it to behave more consistant?

Can I eliminate the login control and write my own?

Feb 24 '09 #1
1 1263

Last night I added this code
Expand|Select|Wrap|Line Numbers
  1.     protected void Login1_LoginError(object sender, EventArgs e)
  2.     {
  3.         Login1.FailureText = "That UserName/Password combination could not be found!";
  4.     }
That seemed to make it work. I power down the dev box, (Which is also running SQLEXPRESS which holds the membership database.

But this morning, I start up the box, first thing try to log in with my test account
and it seems to login just fine, as the above failure text is not display, I am redirected back to the page where I clicked the Login Status control.

And she still says Login!

It's got to be something simple right?
Feb 24 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Mach Runner | last post: by
3 posts views Thread by marc.gibian | last post: by
6 posts views Thread by Gary | last post: by
reply views Thread by Brad | last post: by
2 posts views Thread by Antonio | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.