I use Forms authentication with a SQL Server database.
The portion of the Web.config Looks like this
. -
<authentication mode="Forms" >
-
<forms
-
timeout="43200"
-
loginUrl="~/SimpleLogin.aspx"
-
cookieless="UseCookies"
-
requireSSL="false"
-
protection="All"
-
name=".EPAuth"
-
slidingExpiration="true">
-
</forms>
-
</authentication>
.
and this
. -
<membership defaultProvider="PaxxerMembership">
-
<providers>
-
<add connectionStringName="PaxxerMemberShipDB" enablePasswordReset="true" requiresQuestionAndAnswer="false"
-
applicationName="Paxxer" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" name="PaxxerMembership" type="System.Web.Security.SqlMembershipProvider" />
-
</providers>
-
</membership>
.
Typically I have no problems. The login page is very simple. Just the login control. -
protected void Page_Load(object sender, EventArgs e)
-
{
-
this.Login1.RememberMeSet = true;
-
}
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.
Question:
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?
Thanks
1 1376
So,
Last night I added this code
. - protected void Login1_LoginError(object sender, EventArgs e)
-
{
-
Login1.FailureText = "That UserName/Password combination could not be found!";
-
}
.
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?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: swp |
last post by:
I have a site created using ASP, HTML, and JavaScript. I use frames
to manage a few things, and requires SSL to connect. The site is on a
secured network, not meant to be cross-browser compatible, and only
works with IE 5.5 or higher. IIS v5 is used, with all patches
applied. "Keep Alives" are enabled.
I have a login page that uses session variables to know things about
who logged in, such as preferences and what rights they have. I...
|
by: gmarquez |
last post by:
Hello,
I am using "FORMS" authentication, without SSL the behavior is normal, everythings working very well.
When in IIS I cheking "Require SSL" (in Secure Communications property), I can't to do login, after introducing the credentials, I am redirected to login's page again, If I take the SSL's Check off in the ISS property, everythings will work very well again.
NOTE: I have a valid certificate well installed.
What is happening?,...
|
by: Mach Runner |
last post by:
I am implementing a secure website using the ASP.NET FormsAuthentication
model. I have taken the simplest code examples from MSDN
(login.aspx,default.aspx, web.config) but cannot get proper behavior on my
machine.
As an unauthenticated user, I navigate to the website http://localhost/XXX.
global.Authenticate_Request considers sending default.apsx but cannot find
any authentication cookie in the Context object, so the request is...
|
by: marc.gibian |
last post by:
I have a simple pair of ASP.NET pages, main.aspx and login.aspx. Main
checks if there is an identity in the Session context, and if not does
a Server.Transfer to login.aspx. So far, so good. Login does exactly
that, and on success does a Server.Transfer back to main.aspx. This has
been working fine with both IE and Firefox. Within that past couple of
weeks, all of a sudden running through this logic with IE results in:
Internet Explorer...
|
by: Gary |
last post by:
I have an application that has been working just fine for a couple of years.
It queries a SQL database and returns some formatted data back to the client.
I have a new client, who has a larger database than any of our previous
customers. For example, the query to build the datatable now takes about 2
minutes instead of one minute or less. This is a third party database we are
integrating with. He is getting very strange results. For...
| |
by: Brad |
last post by:
I am hoping that somebody might be able to offer me a suggestion.
I have developed a new website using VS 2005 Standard and I am using SQL
Server 2005 Standard. The web has been working fine until recently when I
just had to restore the PC that runs the web. The web is working, however
now I cannot login from this PC or another PC on our network. But when I run
the web from VS, everything acts like normal and I can login.
I was at a...
|
by: Antonio |
last post by:
Good morning, everyone.
Here is the strange behavior:
I have a datagrid (dgPIs) with paging enabled. When I click to view any
page in the grid, it runs the private void lnkIPReg method, instead of the
private void IPchangePage.
The lnkIPReg method refers to a linkbutton that I created in the grid. The
datagrid properties list the ItemCommand = lnkIPReg and the PageIndexChange
|
by: peter |
last post by:
Hi,
I have very strange situation but first description ;)
I have:
1) project in VB.NET, in this f.e. 1 function:
Public Function Login(ByVal UserName As String, ByVal UserPassword As
String, Optional ByVal ConnectionParamList As String = Nothing) As
String
|
by: dgbergman |
last post by:
I have created a php login page in my site for my company. The goal is to get people into members area. Below is a list of steps that I take to create my login page in Dreamweaver CS3, can some one verify that I have built the page correct and that is nothing wrong with the code. If there is something wrong with the code is it possible to explain a step by step process to have a successful login page as I am new to creting php codes and pages in...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |