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.F ormsAuthenticat ion.RedirectFro mLoginPage' method
thanks,
Samuel 7 1956
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.F ormsAuthenticat ion.RedirectFro mLoginPage' method
thanks, Samuel
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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method thanks, Samuel
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******** ******@TK2MSFTN GP02.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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method thanks, Samuel
How can i use the Forms Authentication or Basic Authentication to perform a similar function
"Jeff Dillon" <je********@hot mail.com> wrote in message news:%2******** ********@TK2MSF TNGP05.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******** ******@TK2MSFTN GP02.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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method thanks, Samuel
Well, You have to manually build the FormsAuthentica tionTicket 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********@hot mail.com> wrote in message news:%2******** ********@TK2MSF TNGP05.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******** ******@TK2MSFTN GP02.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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help Samuel
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method >> >> thanks, >> Samuel >> >> >> ------=_NextPart_000_ 0218_01C689AE.F A5FB950 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" <<A href="mailto:je ********@hotmai l.com">je****** **@hotmail.com</A>> wrote in message <A href="news:%2** **************@ TK2MSFTNGP05.ph x.gbl">news:%2* *************** @TK2MSFTNGP05.p hx.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" <<A href="mailto:sa ************@nt lworld.com">sa* ***********@ntl world.com</A>> wrote in message <A href="news:uu** ************@TK 2MSFTNGP02.phx. gbl">news:uu*** ***********@TK2 MSFTNGP02.phx.g bl</A>...</DIV> <DIV><FONT face=Arial size=2>Let me try and clarify my question</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </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 the form validates the values against values from the database</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </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.Redire ct method then 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> </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> </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.Secu rity.FormsAuthe ntication.Redir ectFromLoginPag e method</FONT></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </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> </P> <P><FONT face=Arial size=2></FONT> </P> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>"Peter Bromberg [C# MVP]" <</FONT><A href="mailto:pb *******@yahoo.n ospammin.com">< FONT face=Arial size=2>pb****** *@yahoo.nospamm in.com</FONT></A><FONT face=Arial size=2>> wrote in message </FONT><A href="news:3B** *************** *************** **@microsoft.co m"><FONT face=Arial size=2>news:3B* *************** *************** ***@microsoft.c om</FONT></A><FONT face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> Samuel,<BR>> If a user is logged in, <BR>> the User property ofthe Page class will have a Name property with the <BR>> username;<BR>&g t; you can access this from anywhere in your application.<BR >> <BR>> Peter<BR>> <BR>> -- <BR>> Co-founder, Eggheadcafe.com developer portal:<BR>> </FONT><A href="http://www.eggheadcafe .com"><FONT face=Arial size=2>http://www.eggheadcafe .com</FONT></A><BR><FONT face=Arial size=2>> UnBlog:<BR>> </FONT><A href="http://petesbloggerama .blogspot.com"> <FONT face=Arial size=2>http://petesbloggerama .blogspot.com</FONT></A><BR><FONT face=Arial size=2>> <BR>> <BR>> <BR>> <BR>> "Samuel Shulman" wrote:<BR>> <BR>>> Is there a method that will indicate the person who logged successfully is <BR>>> Logged and therefore allowed to browse freely other then using the <BR>>> 'Web.Security.F ormsAuthenticat ion.RedirectFro mLoginPage' method<BR>>& gt; <BR>>> thanks,<BR>> > Samuel <BR>>> <BR>>> <BR>>></FONT> </BLOCKQUOTE></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_ 0218_01C689AE.F A5FB950--
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******** ******@TK2MSFTN GP05.phx.gbl...
How can i use the Forms Authentication or Basic Authentication to perform a
similar function
"Jeff Dillon" <je********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP05.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******** ******@TK2MSFTN GP02.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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method
thanks, Samuel
I got the answer alraedy
when I say protected i mean that the folder has forms authentication
security
Cheers,
Samuel
"Jeff Dillon" <je********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP04.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******** ******@TK2MSFTN GP05.phx.gbl... How can i use the Forms Authentication or Basic Authentication to perform a similar function "Jeff Dillon" <je********@hot mail.com> wrote in message news:%2******** ********@TK2MSF TNGP05.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******** ******@TK2MSFTN GP02.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.Redire ct 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.Redire ct 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.Fo rmsAuthenticati on.RedirectFrom LoginPage method
Thank you for your help Samuel "Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:3B******** *************** ***********@mic rosoft.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.F ormsAuthenticat ion.RedirectFro mLoginPage' method
thanks, Samuel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 webpage that is restricted, it takes me to the login
page fine. When I login though instead of taking me to the page I
clicked previous to that, it always takes me to the index file, and
when I try to then click on the page I wanted to go to, it...
|
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 post method and either logs the user in our
out given the information from the form.
but every pages use sessions and cookies, if the user is successfully logged
in then the cookies and session values are updated, (as well as MySQL).
|
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 Login!]" in the same
position.
My question is how to make the username and password textfields disappear
and replace with " has Login!]" in the same position?
This is the code I have done so far, but it has another problem: Even I
first check if...
|
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 must first go to the login.asp
page before accessing any other .asp page. I have set up a redirection
method so that if a user pastes a URL to an internal .asp page, I store the
URL in a session variable, then I direct them to the login page. After...
|
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 register a username and password & then login with those details, but so far I am having only marginal success. I am far from an expert on ASP programming, indeed the code I am using comes from "Sams Teach Yourself E-Commerce Programming with ASP" but it...
| |
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 it in
Enterprise Manager. That said, I can not see the users associated
with the group from Enterprise Manager, but know they can login to the
database.
The problem is this. When we login via the web we get access to the
database without...
|
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 transfer. I modified web.config and properties of Login page
from IIS server. And now when ever the execution is redirected to Login.aspx
It is having https as its protocol.
|
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 server technology with Microsoft
access as my database source.
Just as I have introduced myself, I’m a newbie in web application
development. I’m currently working on an application that will allow
|
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 'RON\ASPNET'
where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.
|
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 Jones, then login as David Smith the Welcome message below will show "Welcome Davey". And it will be Davey's information that is accessible - not David Smith's. So something is amiss but I don't know what.
(BTW, this login script is based on the...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: 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: 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
|
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...
| |