How to get the network userid

G

Guest

Hi

I have a weird problem.

I am using User.Identity.Name() in my application to get the Logged in person Network ID.

In one application it retruns the correct Network userid. But in the other applications it says it cannot get the Network UserId.

In both the applications i have set "<authentication mode="Windows" />
<identity impersonate="true"></identity>" in my web.config file.

I don't understand where i am going wrong .

Am i missing something ? ls let me know
 
S

Steve C. Orr [MVP, MCSD]

I think it might be your IIS settings.
You should disable Anonymous access (for each of your web apps) if you want
to be able to get their Windows userid.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


sileesh said:
Hi

I have a weird problem.

I am using User.Identity.Name() in my application to get the Logged in person Network ID.

In one application it retruns the correct Network userid. But in the other
applications it says it cannot get the Network UserId.
 
R

Raterus

You'll also need to ensure that IIS is setup to authenticate the user based on their network ID, which means you'll have to disable all anonymous access to the page.
 
B

bruce barker

the network log in is only known with iis authenticated pages. you can leave
the site anonymous, but send a 401 error if user is not authenticated.

-- bruce (sqlwork.com)

Sileesh said:
Hi Steve

Thx for the reply

But i shld be able to give access to evryone in my application but shld be
able to get his Network ID to do some validations.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top