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.RedirectFromLoginPage' method
thanks,
SamuelSamuel,
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.RedirectFromLoginPage' 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 an
d the password, clicks the login button and the form validates the values ag
ainst 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 logi
n page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin
Page method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in message news:3B65DB89-2A
8E-4A75-B611-6C64220BC86B@.microsoft.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:
>
Use either Forms Authentication or Basic Authentication. You can't "Set" a u
ser as authenticated.
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message news:uuuJ9mY
iGHA.3440@.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 an
d the password, clicks the login button and the form validates the values ag
ainst 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 logi
n page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin
Page method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in message news:3B65DB89-2A
8E-4A75-B611-6C64220BC86B@.microsoft.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:
>
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/archi...7/24/10505.aspx
Samuel Shulman wrote:
> How can i use the Forms Authentication or Basic Authentication to perform=
a similar function
> "Jeff Dillon" <jeffdillon@.hotmail.com> wrote in message news:%23y0Ft2Yi=
GHA.1264@.TK2MSFTNGP05.phx.gbl...
> Use either Forms Authentication or Basic Authentication. You can't "Set=
" a user as authenticated.
> "Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message news:=
uuuJ9mYiGHA.3440@.TK2MSFTNGP02.phx.gbl...
> Let me try and clarify my question
> If the user types in the url the Login.aspx file then enters the user=
name and the password, clicks the login button and the form validates the v=
alues 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 the=
n if the destination page is in a protected folder it returns back to the l=
ogin 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 an=
d then when i call the
> Response.Redirect Method it will work
> Of course if the user was automatically Redirected by the system to t=
he login page then I can use the Web.Security.FormsAuthentication.RedirectF=
romLoginPage method
> Thank you for your help
> Samuel
>
>
> "Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in me=
ssage news:3B65DB89-2A8E-4A75-B611-6C64220BC86B@.microsoft.com...
the
fully is
> --=3D_NextPart_000_0218_01C689AE.FA5FB950
> Content-Type: text/html; charset=3DUTF-8
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 4950
> =EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
> <META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>How can i use the Forms Authentication o=
r Basic
> Authentication to perform a similar function</FONT></DIV>
> <BLOCKQUOTE dir=3Dltr
> style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-=
LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> <DIV>"Jeff Dillon" <<A
> href=3D"mailto:jeffdillon@.hotmail.com">jeffdillon@.hotmail.com</A>> w=
rote in
> message <A
> href=3D"news:%23y0Ft2YiGHA.1264@.TK2MSFTNGP05.phx.gbl">news:%23y0Ft2YiGH=
A=2E1264@.TK2MSFTNGP05.phx.gbl</A>...</DIV>
> <DIV><FONT face=3DArial size=3D2>Use either Forms Authentication or Bas=
ic
> Authentication. You can't "Set" a user as authenticated.</FONT></DIV>
> <BLOCKQUOTE
> style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDE=
R-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> <DIV>"Samuel Shulman" <<A
> href=3D"mailto:samuel.shulman@.ntlworld.com">samuel.shulman@.ntlworld.c=
om</A>>
> wrote in message <A
> href=3D"news:uuuJ9mYiGHA.3440@.TK2MSFTNGP02.phx.gbl">news:uuuJ9mYiGHA.=
3440@.TK2MSFTNGP02.phx.gbl</A>...</DIV>
> <DIV><FONT face=3DArial size=3D2>Let me try and clarify my question</=
FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>If the user types in the url the Log=
in.aspx
> file then enters the username and the password, clicks the login butt=
on
> and the form validates the values against values from the
> database</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>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 pr=
otected
> folder it returns back to the login page because ASP.NET doesn't know=
that
> this user is authenticated</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>So all I need is another method that=
set the
> user as authenticated and then when i call the </FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Response.Redirect Method it will
> work</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>Of course if the user was automatica=
lly
> Redirected by the system to the login page then I can use the <FONT
> size=3D2>Web.Security.FormsAuthentication.RedirectFromLoginPage
> method</FONT></FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>Thank you for your help</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Samuel</FONT></DIV>
> <P><FONT face=3DArial size=3D2></FONT> </P>
> <P><FONT face=3DArial size=3D2></FONT> </P>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>"Peter Bromberg [C# MVP]" <</FONT=
><A
> href=3D"mailto:pbromberg@.yahoo.nospammin.com"><FONT face=3DArial
> size=3D2>pbromberg@.yahoo.nospammin.com</FONT></A><FONT face=3DArial s=
ize=3D2>>
> wrote in message </FONT><A
> href=3D"news:3B65DB89-2A8E-4A75-B611-6C64220BC86B@.microsoft.com"><FONT
> face=3DArial
> size=3D2>news:3B65DB89-2A8E-4A75-B611-6C64220BC86B@.microsoft.com</FON=
T></A><FONT
> face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>>
> Samuel,<BR>> If a user is logged in, <BR>> the User property of=
the
> Page class will have a Name property with the <BR>> username;<BR>&=
gt; you
> can access this from anywhere in your application.<BR>> <BR>>
> Peter<BR>> <BR>> -- <BR>> Co-founder, Eggheadcafe.com develo=
per
> portal:<BR>> </FONT><A href=3D"http://www.eggheadcafe.com"><FONT f=
ace=3DArial
> size=3D2>http://www.eggheadcafe.com</FONT></A><BR><FONT face=3DArial =
size=3D2>>
> UnBlog:<BR>> </FONT><A href=3D"http://petesbloggerama.blogspot.com=
"><FONT
> face=3DArial size=3D2>http://petesbloggerama.blogspot.com</FONT></A><=
BR><FONT
> face=3DArial size=3D2>> <BR>> <BR>> <BR>> <BR>> "Samue=
l 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.FormsAuthentication.RedirectFromLoginPage' method<BR>&g=
t;>
> <BR>>> thanks,<BR>>> Samuel <BR>>> <BR>>>
> <BR>>></FONT> </BODY></HTML>
>=20
> --=3D_NextPart_000_0218_01C689AE.FA5FB950--
How can i use the Forms Authentication or Basic Authentication to perform a
similar function
"Jeff Dillon" <jeffdillon@.hotmail.com> wrote in message news:%23y0Ft2YiGHA.1
264@.TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a u
ser as authenticated.
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message news:uuuJ9mY
iGHA.3440@.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 an
d the password, clicks the login button and the form validates the values ag
ainst 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 logi
n page then I can use the Web.Security.FormsAuthentication.RedirectFromLogin
Page method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in message news:3B65DB89-2A
8E-4A75-B611-6C64220BC86B@.microsoft.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:
>
First of all, what do you mean "protected". How did you protect it? Who has
access?
Jeff
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
news:up6KaaaiGHA.4200@.TK2MSFTNGP05.phx.gbl...
How can i use the Forms Authentication or Basic Authentication to perform a
similar function
"Jeff Dillon" <jeffdillon@.hotmail.com> wrote in message
news:%23y0Ft2YiGHA.1264@.TK2MSFTNGP05.phx.gbl...
Use either Forms Authentication or Basic Authentication. You can't "Set" a
user as authenticated.
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
news:uuuJ9mYiGHA.3440@.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.RedirectFromLoginPage method
Thank you for your help
Samuel
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in message
news:3B65DB89-2A8E-4A75-B611-6C64220BC86B@.microsoft.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:
>
I got the answer alraedy
when I say protected i mean that the folder has forms authentication
security
Cheers,
Samuel
"Jeff Dillon" <jeffdillon@.hotmail.com> wrote in message
news:%23V9JXSkiGHA.2456@.TK2MSFTNGP04.phx.gbl...
> First of all, what do you mean "protected". How did you protect it? Who
> has access?
> Jeff
> "Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
> news:up6KaaaiGHA.4200@.TK2MSFTNGP05.phx.gbl...
> How can i use the Forms Authentication or Basic Authentication to perform
> a similar function
> "Jeff Dillon" <jeffdillon@.hotmail.com> wrote in message
> news:%23y0Ft2YiGHA.1264@.TK2MSFTNGP05.phx.gbl...
> Use either Forms Authentication or Basic Authentication. You can't "Set" a
> user as authenticated.
> "Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
> news:uuuJ9mYiGHA.3440@.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.RedirectFromLoginPage method
> Thank you for your help
> Samuel
>
> "Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.com> wrote in message
> news:3B65DB89-2A8E-4A75-B611-6C64220BC86B@.microsoft.com...
>
0 comments:
Post a Comment