Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

Check if user is authenticated and get its profile. Thank you.


Hello,

I need to check if the current user is authenticated and get its
profile.

For authentication checking I got the following options:
Request.IsAuthenticated.ToString
My.User.IsAuthenticated.ToString
User.Identity.IsAuthenticated.ToString

Which one should I use?
And how can I get the profile?

Thanks,
Miguel

Hello Shapper,

S> I need to check if the current user is authenticated and get its
S> profile.
S> For authentication checking I got the following options:
S> Request.IsAuthenticated.ToString My.User.IsAuthenticated.ToString
S> User.Identity.IsAuthenticated.ToString
S> Which one should I use?

Anyone, they are the same (u can sure it using Reflector)

S> And how can I get the profile?

smth like
ProfileCommon pc = (ProfileCommon)context.Profile;
pc = pc.GetProfile("johndoe");

---
WBR,  Michael  Nemtsev [C# MVP].  
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

-----------------------------------------------Reply-----------------------------------------------

On Feb 21, 8:32 pm, Michael Nemtsev <nemt@msn.com> wrote:

Those lines you wrote get the profile of a given user.
But what about the profile of the user which is currently
authenticated?

> ---
> WBR,  Michael  Nemtsev [C# MVP].
> My blog:http://spaces.live.com/laflour
> Team blog:http://devkids.blogspot.com/

> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo

Thanks,
Miguel
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc