Setting up the right kind of authentication

K

Klaus Jensen

Hi!

I need to restrict access to an intranet-site

- The users are already logged in on their workstations (NT/Domain)
- I need to be able to retrieve their username for logging purposes
- The users must not be presented with a "login"-window - the are already
logged in!

This spells "Integrated authentication", right?

Then I need to get it working.

1. The site is set to "integrated security"
2. I set authentication to "windows" in web.config

And here is where my research have left me no others choices than to ask
here.

How do I get the NT-username, once the user has access to the site?

An example on gotdotnet suggest I add a sub in global.asax:

Sub WindowsAuthentication_OnAuthenticate(ByVal s As Object, ByVal e As
WindowsAuthenticationEventArgs)

but e.Identity.name is blank.

The example also mentions an IPrincipal class, but I have not been
successfull in implementing it.

Where do I go from here? What am I missing? Is there a good ressource on
this subject?

I have already read...:
http://msdn.microsoft.com/library/en-us/dnbda/html/authaspdotnet.asp?frame=true

Thanks in advance

- Klaus
 
K

Klaus Jensen

[blushing]

Of course it would not work, when I tested on my workstation - not on the
server, where I had the security configured.

Sorry! [blushing even more] :)

- Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top