Click here to Skip to main content
15,843,200 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have developed one web application using visual studio 2012 (VB & SQL), Now after login to my application pc user name who ever access it through browser. I have already tried multiple available solutions but most of them works in studio only, after deploying application to IIS either it shoes iisuser or defaultpool.

Please guide / help

What I have tried:

User.Identity.Name

Environment.UserName<

System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString()

Page.User.Identity.Name

System.Environment.UserName

HttpContext.Current.User.Identity.Name
Posted
Updated 25-May-20 23:37pm
Comments
MadMyche 19-May-20 13:09pm    
Can you please post the web.config authentication and authorization nodes
Hemil Gandhi 19-May-20 13:19pm    
<authentication mode="Windows">
<authorization>
<allow users="*">
One more thing to add we have domain login setup for each end user.
Hemil Gandhi 19-May-20 13:23pm    
One more thing to add we have domain login setup for each end user.
F-ES Sitecore 19-May-20 14:38pm    
Google how to configure your site to use Windows Authentication.

1 solution

Follow the instruction from MSDN: Authenticating Users with Windows Authentication (VB) | Microsoft Docs[^]
Authenticating Users with Windows Authentication (C#) | Microsoft Docs[^]

Quote:
You must enable Windows authentication by modifying your MVC application's web configuration (web.config) file. Find the <authentication> section and modify it to use Windows instead of Forms authentication like this:
XML

XML
<authentication mode="Windows">

</authentication>

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900