473,507 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login problem

Is there a method that will indicate the person who logged successfully is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel
Jun 6 '06 #1
7 1936
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel

Jun 6 '06 #2
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database

In case the values are correct and i want to send the user to another page, currently when i try doing it using the Response.Redirect method then if the destination page is in a protected folder it returns back to the login page because ASP.NET doesn't know that this user is authenticated

So all I need is another method that set the user as authenticated and then when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the login page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message news:3B**********************************@microsof t.com...
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel


Jun 6 '06 #3
Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
"Samuel Shulman" <sa************@ntlworld.com> wrote in message news:uu**************@TK2MSFTNGP02.phx.gbl...
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database

In case the values are correct and i want to send the user to another page, currently when i try doing it using the Response.Redirect method then if the destination page is in a protected folder it returns back to the login page because ASP.NET doesn't know that this user is authenticated

So all I need is another method that set the user as authenticated and then when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the login page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message news:3B**********************************@microsof t.com...
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel


Jun 6 '06 #4
How can i use the Forms Authentication or Basic Authentication to perform a similar function
"Jeff Dillon" <je********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
"Samuel Shulman" <sa************@ntlworld.com> wrote in message news:uu**************@TK2MSFTNGP02.phx.gbl...
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database

In case the values are correct and i want to send the user to another page, currently when i try doing it using the Response.Redirect method then if the destination page is in a protected folder it returns back to the login page because ASP.NET doesn't know that this user is authenticated

So all I need is another method that set the user as authenticated and then when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the login page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message news:3B**********************************@microsof t.com...
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel


Jun 6 '06 #5
Well, You have to manually build the FormsAuthenticationTicket and then
redirect the user. Here is an article that you can look at.

http://blogs.msdn.com/tmeston/archiv.../24/10505.aspx

Samuel Shulman wrote:
How can i use the Forms Authentication or Basic Authentication to performa similar function
"Jeff Dillon" <je********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
"Samuel Shulman" <sa************@ntlworld.com> wrote in message news:uu**************@TK2MSFTNGP02.phx.gbl...
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database

In case the values are correct and i want to send the user to anotherpage, currently when i try doing it using the Response.Redirect method then if the destination page is in a protected folder it returns back to the login page because ASP.NET doesn't know that this user is authenticated

So all I need is another method that set the user as authenticated and then when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the login page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message news:3B**********************************@microsof t.com...
> Samuel,
> If a user is logged in,
> the User property of the Page class will have a Name property with the
> username;
> you can access this from anywhere in your application.
>
> Peter
>
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "Samuel Shulman" wrote:
>
>> Is there a method that will indicate the person who logged successfully is
>> Logged and therefore allowed to browse freely other then using the
>> 'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method
>>
>> thanks,
>> Samuel
>>
>>
>>

------=_NextPart_000_0218_01C689AE.FA5FB950
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Google-AttachSize: 4950

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>How can i use the Forms Authentication or Basic
Authentication to perform a similar function</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Jeff Dillon" &lt;<A
href="mailto:je********@hotmail.com">je********@ho tmail.com</A>&gt; wrote in
message <A
href="news:%2****************@TK2MSFTNGP05.phx.gbl ">news:%2****************@TK2MSFTNGP05.phx.gbl </A>...</DIV>
<DIV><FONT face=Arial size=2>Use either Forms Authentication or Basic
Authentication. You can't "Set" a user as authenticated.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Samuel Shulman" &lt;<A
href="mailto:sa************@ntlworld.com">sa****** ******@ntlworld.com</A>&gt;
wrote in message <A
href="news:uu**************@TK2MSFTNGP02.phx.gbl"> news:uu**************@TK2MSFTNGP02.phx.gbl</A>...</DIV>
<DIV><FONT face=Arial size=2>Let me try and clarify my question</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>If the user types in the url the Login.aspx
file then enters the username and the password, clicks the login button
and&nbsp;the form validates the values against values from the
database</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In case the values are correct and iwant to
send the user to another page, currently when i try doing it using the
Response.Redirect method then&nbsp;if the destination page is in a protected
folder it returns back to the login page because ASP.NET doesn't knowthat
this user is authenticated</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>So all I need is another method thatset the
user as authenticated and then when i call the </FONT></DIV>
<DIV><FONT face=Arial size=2>Response.Redirect Method it will
work</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Of course if the user was automatically
Redirected by the system to the login page then I can use the <FONT
size=2>Web.Security.FormsAuthentication.RedirectFr omLoginPage
method</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thank you for your help</FONT></DIV>
<DIV><FONT face=Arial size=2>Samuel</FONT></DIV>
<P><FONT face=Arial size=2></FONT>&nbsp;</P>
<P><FONT face=Arial size=2></FONT>&nbsp;</P>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>"Peter Bromberg [C# MVP]" &lt;</FONT><A
href="mailto:pb*******@yahoo.nospammin.com"><FONT face=Arial
size=2>pb*******@yahoo.nospammin.com</FONT></A><FONT face=Arial size=2>&gt;
wrote in message </FONT><A
href="news:3B**********************************@mi crosoft.com"><FONT
face=Arial
size=2>news:3B**********************************@m icrosoft.com</FONT></A><FONT
face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt;
Samuel,<BR>&gt; If a user is logged in, <BR>&gt; the User property ofthe
Page class will have a Name property with the <BR>&gt; username;<BR>&gt; you
can access this from anywhere in your application.<BR>&gt; <BR>&gt;
Peter<BR>&gt; <BR>&gt; -- <BR>&gt; Co-founder, Eggheadcafe.com developer
portal:<BR>&gt; </FONT><A href="http://www.eggheadcafe.com"><FONT face=Arial
size=2>http://www.eggheadcafe.com</FONT></A><BR><FONT face=Arial size=2>&gt;
UnBlog:<BR>&gt; </FONT><A href="http://petesbloggerama.blogspot.com"><FONT
face=Arial size=2>http://petesbloggerama.blogspot.com</FONT></A><BR><FONT
face=Arial size=2>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; "Samuel Shulman"
wrote:<BR>&gt; <BR>&gt;&gt; Is there a method that will indicate the person
who logged successfully is <BR>&gt;&gt; Logged and therefore allowed to
browse freely other then using the <BR>&gt;&gt;
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method<BR>&gt;&gt;
<BR>&gt;&gt; thanks,<BR>&gt;&gt; Samuel <BR>&gt;&gt; <BR>&gt;&gt;
<BR>&gt;&gt;</FONT> </BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0218_01C689AE.FA5FB950--


Jun 6 '06 #6
First of all, what do you mean "protected". How did you protect it? Who has
access?

Jeff

"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl...
How can i use the Forms Authentication or Basic Authentication to perform a
similar function
"Jeff Dillon" <je********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a
user as authenticated.
"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:uu**************@TK2MSFTNGP02.phx.gbl...
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username
and the password, clicks the login button and the form validates the values
against values from the database

In case the values are correct and i want to send the user to another page,
currently when i try doing it using the Response.Redirect method then if the
destination page is in a protected folder it returns back to the login page
because ASP.NET doesn't know that this user is authenticated

So all I need is another method that set the user as authenticated and then
when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the
login page then I can use the
Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:3B**********************************@microsof t.com...
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully
is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel


Jun 7 '06 #7
I got the answer alraedy
when I say protected i mean that the folder has forms authentication
security

Cheers,
Samuel

"Jeff Dillon" <je********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
First of all, what do you mean "protected". How did you protect it? Who
has access?

Jeff

"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl...
How can i use the Forms Authentication or Basic Authentication to perform
a similar function
"Jeff Dillon" <je********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a
user as authenticated.
"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:uu**************@TK2MSFTNGP02.phx.gbl...
Let me try and clarify my question

If the user types in the url the Login.aspx file then enters the username
and the password, clicks the login button and the form validates the
values against values from the database

In case the values are correct and i want to send the user to another
page, currently when i try doing it using the Response.Redirect method
then if the destination page is in a protected folder it returns back to
the login page because ASP.NET doesn't know that this user is
authenticated

So all I need is another method that set the user as authenticated and
then when i call the
Response.Redirect Method it will work

Of course if the user was automatically Redirected by the system to the
login page then I can use the
Web.Security.FormsAuthentication.RedirectFromLogin Page method

Thank you for your help
Samuel

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:3B**********************************@microsof t.com...
Samuel,
If a user is logged in,
the User property of the Page class will have a Name property with the
username;
you can access this from anywhere in your application.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Samuel Shulman" wrote:
Is there a method that will indicate the person who logged successfully
is
Logged and therefore allowed to browse freely other then using the
'Web.Security.FormsAuthentication.RedirectFromLogi nPage' method

thanks,
Samuel

Jun 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2201
by: Sniffer-Dog | last post by:
Hi I just wondered if anyone can spot anything wrong with the following? I have now added the session_start(); as the first command in the code to all the pages needing it. When I click on a...
5
2957
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
2136
by: John Davis | last post by:
I put a little login (username and password textfields) in a web page, and once the user able to login, I want the username and password textfields will disappear, and replace with text " has...
0
1772
by: Mike | last post by:
I can not figure out what is going on here. I hope somebody can please help!!! I've got an intranet ASP3 application running on a Win2k server. This application requires a login, so the user...
1
5452
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
2
12680
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at...
2
2192
by: Rujuta Gandhi | last post by:
Hi All, I am facing a very crucial problem. Im developing a web application using .net studio 2005(beta). I want my Login.aspx page to be secured(https) for encrypted login information...
1
3045
by: xcelmind | last post by:
Hello Dev. Guru, I want to at this time introduce myself. I am Stanley Ojadovwa by name. I’m a freelance and a newbie in web application development. I’m currently using ASP as my application...
4
2021
by: RN1 | last post by:
I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows Authentication). When I run a ASPX page that connects to SQL Server, the following error gets generated: Login failed for user...
10
4794
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey...
0
7114
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...
0
7321
Oralloy
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,...
0
7377
jinu1996
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...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
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,...
0
4702
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...
0
3191
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
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 ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.