473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to get the network userid

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
Nov 18 '05 #1
3 5000
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.

"sileesh" <si*****@discussions.microsoft.com> wrote in message news:FB**********************************@microsof t.com...
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

Nov 18 '05 #2
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" <si*****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
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

Nov 18 '05 #3
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" <Si*****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
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.
The other application which was working fine has also annynimous access set to true in IIS.
ANy other suggestions wld be of great help

"Steve C. Orr [MVP, MCSD]" wrote:
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" <si*****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
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


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Joseph | last post by:
Hello We have a web application written in ASP.Net that calls an external C# program (.exe). This C# program needs to access data from a different server and is not able to do so. We use impersonate...
4
by: Rajeev | last post by:
Hi I have developed a windows service using C#. I am checking a folder path using "DirectoryInfo" class which is in local network. It always returns false, even folder exists on local network. ...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
2
by: Kalyan | last post by:
Hello, System.Data.SqlClient.SqlException: General network error. Check your network documentation. What does this error means? My web app, suddenly started to show this error today in my...
1
by: Kal | last post by:
Hello, System.Data.SqlClient.SqlException: General network error. Check your network documentation. What does this error means? My web app, suddenly started to show this error today in my...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
3
by: Daniel | last post by:
How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler? How to specify which account that aspx application should use when doing file IO from network paths?...
0
by: GregInHouston2 | last post by:
I am attempting to access the files on a share on a server in my network so I can list the files there on an intranet web page. At this point, the share permissions and the NTFS permissions are...
0
by: Peter | last post by:
How do I get current user Network ID on Intranet from ASP.NET web page? the following works on my computer, but I get blank userID when the website is on the test web server. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.