Server and Client in the same Domain. I am trying to get client windows identity from Published Web Site on IIS.
WindowsIdentity identity = WindowsIdentity.GetCurrent();
string userNameWithDomain = identity.Name.ToString();
string identityName = HttpContext.Current.Request.LogonUserIdentity.Name;
string userName = HttpContext.Current.User.Identity.Name;
By the Way, I dont want to type username and password to anywhere...
I am already tried below parts and parts combinations but still the web page requires username and password
- Windows Authentication
if iispool(autotest) is default and windows authentication is enabled result is
userNameWithDomain = "FALAN\Filan"// Server Identity name
identityName = "IIS APPPOOL\autotest"// IIS Pool
userName = "FALAN\Bilgehan" // After I typed the username and password, this variable gives me the correct answer. However as you can see up, i dont want to type username and password to anywhere
- IIS Pool
I enter custom account information for iispool
userNameWithDomain = "FALAN\Filan"// Server Identity name
identityName = "FALAN\Filan"// Server Identity name
userName = "FALAN\Bilgehan" // After I typed the username and password, this variable gives me the correct answer. However as you can see up, i dont want to type username and password to anywhere
- Web Config
I did identity impersonate="true"
and
I did authentication mode="Windows"
- Visual Studio
As you can see I couldnt catch correct answer. How Can I Get Client Windows Identity from Published Web Site on IIS without enter username and password?
Thanks...