Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get logged user while anonymous access set to on

Status
Not open for further replies.

captainPlus

Programmer
Apr 15, 2007
41
0
0
TR
Hello,

I'm trying to get the currently logged on user in an ASP.NET application. But I need both "anonymous access" and "nt authorization". When anonymous access set to on, none of methods to get user identity works. They either return IUSR_XX or ASPNET.

I need both authentication method to provide direct access to local users and a login form for other users.

I crawled a lot on the net. Many posts say it's impossible to get user identity while using anonymous access. It's so reasonable I think. When client is able to connect anonymously, it's normal to not to send any logon information.

But then I realized Microsoft Project Server's login logic. It both works with NT Authorization and anonymous access. Native users are able to use NT Authorization, others can login by typing their username/password set in project server. This is what I exactly need.

Because Project Server use IIS too, I begin to think perhaps there may be a workaround for this. But I'm not sure if this is related or not with the SharePointServices thing that Project Server natively depends on...

Do you have an idea? Is it possible to get currently logged user's name while anonymous access is set to on?

Thanks,
Ali
 
I had this same problem. I needed to capture the user creating or modifying records in my Sql database. I captured the logged in user's name in a session variable then inserted it in my database via a stored procedure using the session variable value in the parameter.

Session("User") = My.User.Name

That should get you the user logged in the ASP.Net application using Forms Authentication.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top