Katya85S
Programmer
- Jul 19, 2004
- 190
In asp.net application, intranet, Windows Authentication, I have to identify user credentials (to respond on users' questions, send e-mails and so on).
To find user name I use
Protected strUser As String = CStr(System.Security.Principal.WindowsIdentity.GetCurrent.Name.ToStrin())
And then I would use DirectoryEntry and DirectorySearch objects to find User Name, Email and so on.
Till recent it worked fine. But now, I don’t know what could possibly happen, the strUser instead of bringing logged on user name (Domain/UserName) gives me the following data “NT AUTHORITY\NETWORK SERVICE”. How can I fix it? The application has to identify real user name and credentials….
In IIS the anonymus authentication is turned off for these pages.
Any ideas?
Thank you all in advance
To find user name I use
Protected strUser As String = CStr(System.Security.Principal.WindowsIdentity.GetCurrent.Name.ToStrin())
And then I would use DirectoryEntry and DirectorySearch objects to find User Name, Email and so on.
Till recent it worked fine. But now, I don’t know what could possibly happen, the strUser instead of bringing logged on user name (Domain/UserName) gives me the following data “NT AUTHORITY\NETWORK SERVICE”. How can I fix it? The application has to identify real user name and credentials….
In IIS the anonymus authentication is turned off for these pages.
Any ideas?
Thank you all in advance