Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Login problem

Reply
Thread Tools

Login problem

 
 
Samuel Shulman
Guest
Posts: n/a
 
      06-06-2006
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      06-06-2006
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
>
>
>

 
Reply With Quote
 
 
 
 
Samuel Shulman
Guest
Posts: n/a
 
      06-06-2006
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]" <> wrote in message news:3B65DB89-2A8E-4A75-B611-...
> 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
>>
>>
>>

 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      06-06-2006
Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
"Samuel Shulman" <> wrote in message news:...
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]" <> wrote in message news:3B65DB89-2A8E-4A75-B611-...
> 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
>>
>>
>>

 
Reply With Quote
 
Samuel Shulman
Guest
Posts: n/a
 
      06-06-2006
How can i use the Forms Authentication or Basic Authentication to perform a similar function
"Jeff Dillon" <> wrote in message news:%...
Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
"Samuel Shulman" <> wrote in message news:...
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]" <> wrote in message news:3B65DB89-2A8E-4A75-B611-...
> 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
>>
>>
>>

 
Reply With Quote
 
tdavisjr
Guest
Posts: n/a
 
      06-06-2006
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" <> wrote in message news:%...
> Use either Forms Authentication or Basic Authentication. You can't "Set" a user as authenticated.
> "Samuel Shulman" <> wrote in message news:...
> 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]" <> wrote in message news:3B65DB89-2A8E-4A75-B611-...
> > 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="private.php?do=newpm&u=">jeffdillon@ho tmail.com</A>&gt; wrote in
> message <A
> href="news:% ">news:% </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="private.php?do=newpm&u=">samuel.s </A>&gt;
> wrote in message <A
> href="news:"> news:</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"><FONT face=Arial
> size=2></FONT></A><FONT face=Arial size=2>&gt;
> wrote in message </FONT><A
> href="news:3B65DB89-2A8E-4A75-B611-"><FONT
> face=Arial
> size=2>news:3B65DB89-2A8E-4A75-B611-</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--


 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      06-07-2006
First of all, what do you mean "protected". How did you protect it? Who has
access?

Jeff

"Samuel Shulman" <> wrote in message
news:...
How can i use the Forms Authentication or Basic Authentication to perform a
similar function
"Jeff Dillon" <> wrote in message
news:%...
Use either Forms Authentication or Basic Authentication. You can't "Set" a
user as authenticated.
"Samuel Shulman" <> wrote in message
news:...
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]" <> wrote in message
news:3B65DB89-2A8E-4A75-B611-...
> 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
>>
>>
>>


 
Reply With Quote
 
Samuel Shulman
Guest
Posts: n/a
 
      06-07-2006
I got the answer alraedy
when I say protected i mean that the folder has forms authentication
security

Cheers,
Samuel



"Jeff Dillon" <> wrote in message
news:%...
> First of all, what do you mean "protected". How did you protect it? Who
> has access?
>
> Jeff
>
> "Samuel Shulman" <> wrote in message
> news:...
> How can i use the Forms Authentication or Basic Authentication to perform
> a similar function
> "Jeff Dillon" <> wrote in message
> news:%...
> Use either Forms Authentication or Basic Authentication. You can't "Set" a
> user as authenticated.
> "Samuel Shulman" <> wrote in message
> news:...
> 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]" <> wrote in message
> news:3B65DB89-2A8E-4A75-B611-...
>> 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
>>>
>>>
>>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
News login different from mail login William W. Plummer Firefox 21 04-08-2005 05:37 AM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 1 08-18-2004 08:36 AM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 0 08-17-2004 06:26 PM
Forms Login Page Not Login Out Hermit Dave ASP .Net 5 01-13-2004 07:14 AM
Re: PLEASE? Any way to get the user's nt login from the pc -- not the server login? William F. Robertson, Jr. ASP .Net 0 07-02-2003 03:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57