Hi,
I am exploring the possibility of using the MSAccess provider for
membership, etc. All is working well, including being able to use it
for webparts, user authentication, etc. I can create users, change
passwords, request the password (I am currently using "Clear" as the
password format, and when I drop the LoginStatus control onto the form
it shows the correct status However, I am struggling with the login
control and the use of the Remeber Me Next Time check box.
The login works fine and using the following code:
protected void Page_Load(objec t sender, EventArgs e)
{
Response.Write( "Hello, " +
Server.HtmlEnco de(User.Identit y.Name));
try
{
FormsIdentity id = (FormsIdentity) User.Identity;
FormsAuthentica tionTicket ticket = id.Ticket;
Response.Write( "<p/>TicketName: " + ticket.Name);
Response.Write( "<br/>Cookie Path: " + ticket.CookiePa th);
Response.Write( "<br/>Ticket Expiration: " +
ticket.Expirati on.ToString());
Response.Write( "<br/>Expired: " +
ticket.Expired. ToString());
Response.Write( "<br/>Persistent: " +
ticket.IsPersis tent.ToString() );
Response.Write( "<br/>IssueDate: " +
ticket.IssueDat e.ToString());
Response.Write( "<br/>UserData: " + ticket.UserData );
Response.Write( "<br/>Version: " +
ticket.Version. ToString());
}
catch (Exception ex)
{
Response.Write( ex.Message);
}
}
yeilds the following details:
Hello, JohnDoe
TicketName: JohnDoe
Cookie Path: /
Ticket Expiration: 30/11/2008 13:31:37
Expired: False
Persistent: False
IssueDate: 19/10/2008 21:31:37
UserData:
Version: 2
The persistance is set to false, but I see no way of setting it to
true. The forms section of my web.config file is as follows:
<authenticati on mode="Forms">
<forms loginUrl="Login .aspx"
defaultUrl="Log in.aspx"
protection="All "
timeout="60000"
name=".AccessPo rtal"
slidingExpirati on="true"
cookieless="Use Cookies"
enableCrossAppR edirects="false "
path="/" />
</authentication>
Does anyone have any thoughts on how I can set persistence to true and
have the cookie retained to enable me not to have to login the next
time I visit the site?
Many thanks in advance,
Jason. 1 1422
Guys,
found the problem and it was a stupid one.
I had set the persistent flag in the RedirectFromLog inPage to false as
below:
if (Membership.Val idateUser(Login 1.UserName, Login1.Password ))
{
FormsAuthentica tion.RedirectFr omLoginPage(Log in1.UserName,
false);
}
else
{
Login1.FailureT ext = "Invalid user.";
}
and not to the value indicated by the state of the "Remeber Me" check
box on the form as below:
if (Membership.Val idateUser(Login 1.UserName, Login1.Password ))
{
FormsAuthentica tion.RedirectFr omLoginPage(Log in1.UserName,
Login1.Remember MeSet);
}
else
{
Login1.FailureT ext = "Invalid user.";
}
Regards. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randell D. |
last post by:
Folks,
I currently connect to my db with PHP code that uses non-persistent
connections. I've read that persistent connections can help performance
since a connection to the db will use an existing unused connection.
If my system was to go through a busy period whereby I seen an extra 50% or
more activity for ten minutes or so, would the extra connections stay alive
for ever or is there a time limit of inactivity?
Would the unused...
|
by: Paul Rubin |
last post by:
I've had this recurring half-baked desire for long enough that I
thought I'd post about it, even though I don't have any concrete
proposals and the whole idea is fraught with hazards.
Basically I wish there was a way to have persistent in-memory objects
in a Python app, maybe a multi-process one. So you could have a
persistent dictionary d, and if you say
d = Frob(foo=9, bar=23)
that creates a Frob instance and stores it in d. Then if...
|
by: obhayes |
last post by:
Hi All,
Im using classic ASP (3.0) and I have a web farm with 2 webservers
(webserver A and webserver B, both windows server 2003). I do not want
to store any client specific information on the webserver (therefore do
not intend to use the session object- as you cannot gaurantee which
server the user will go to). I want to store a small value (e.g. a Y/N
value or an Id) on the client machine for the duration of their
browsing session,...
|
by: brad |
last post by:
Hi,
Im using classic ASP (3.0) and I have a web farm with 2 webservers
(webserver A and webserver B, both windows server 2003). I do not want
to store any client specific information on the webserver (therefore do
not intend to use the session object- as you cannot gaurantee which
server the user will go to). I want to store a small value (e.g. a Y/N
value or an Id) on the client machine for the duration of their
browsing session, hence I...
|
by: M?rio Amado Alves |
last post by:
Will you help an outsider trying to trace the current state of
persistent object technology?
"I expect that there will be persistent object stores with
STL-conforming interfaces fitting into the STL framework within the
next year."
--Alexander Stepanov, 1995
Has this happened? (In 1996 or another year.)
| |
by: Eric Lindsay |
last post by:
I am trying to understand the differences between and uses of
persistent, default and alternate styles. I have read
http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on
specifying external style sheets in link using combinations of rel and
using or not using the title attribute.
I think I sort of understand rel="alternate stylesheet". It seems to be
able to act something like the media="print" or media="handheld" or...
|
by: Niebs |
last post by:
Is this Class in the release version of ASP.net 2.0? I see examples all over
the internet sing it in Beta but I cannot find it on my system. I have seen
others also mention that the only two providers shipped are ActiveDirectory
and SqlmembershipProvider.
What happened to System.Web.Security.AccessMembershipProvider
Thanks,
|
by: mcnaryxc |
last post by:
Hey, I'm a senior in high school and I got stuck making a website for the school's drama department. It's due next wednesday and I'm almost done, but....a part of it is driving me crazy.
See, I want to make it so people can buy tickets off of the website for the musical the school is having in a month. So, I created a catalog and am using paypal to have people pay for the tickets. It's just that....it's horrible. I mean, I understand it, but...
|
by: sanchita |
last post by:
Hello everyone,
I didn't get any response in "Security" forum hence posting here again.
I am having problem with persistent cookies. Even after setting
"CreatePersistentCookie" to true in "FormsAuthentication.SetAuthCookie" I'm
being logged out after the specifed timeout provided in "forms"
element of web.config.
I read somewhere that lifetime of persistent cookies depend on the timeout
|
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: 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: 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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |