Last post Jun 12, 2019 08:23 PM by mgebhard
Member
249 Points
262 Posts
Jun 12, 2019 07:11 PM|rkrex|LINK
Hi Friends !!!! I am working on an asp.net web forms website. I am running this test website in visual studio IDE no IIS because I am developing/testing. However. I need help with why I am not able to get the User.Identity.Name. Thanks !!!
All-Star
43841 Points
18769 Posts
Jun 12, 2019 07:22 PM|mgebhard|LINK
What authentication scheme are you using?
Jun 12, 2019 07:30 PM|rkrex|LINK
windows authentication
Jun 12, 2019 08:23 PM|mgebhard|LINK
rkrex windows authentication
Did you select "Windows Authentication" as the authentication scheme when you created the project?
If not, add the highlighted following configuration to the web.config.
<system.web> <compilation debug="true" targetFramework="4.7.2" /> <httpRuntime targetFramework="4.7.2" /> <authentication mode="Windows"/> <authorization> <deny users="?"/> </authorization>
Then click on the project in the Solution Explorer. In the properties window, disable Anonymous Authentication and Enable Windows Authentication.
Member
249 Points
262 Posts
User.Identity.Name ?(EMPTY)
Jun 12, 2019 07:11 PM|rkrex|LINK
Hi Friends !!!! I am working on an asp.net web forms website. I am running this test website in visual studio IDE no IIS because I am developing/testing. However. I need help with why I am not able to get the User.Identity.Name. Thanks !!!
All-Star
43841 Points
18769 Posts
Re: User.Identity.Name ?(EMPTY)
Jun 12, 2019 07:22 PM|mgebhard|LINK
What authentication scheme are you using?
Member
249 Points
262 Posts
Re: User.Identity.Name ?(EMPTY)
Jun 12, 2019 07:30 PM|rkrex|LINK
windows authentication
All-Star
43841 Points
18769 Posts
Re: User.Identity.Name ?(EMPTY)
Jun 12, 2019 08:23 PM|mgebhard|LINK
Did you select "Windows Authentication" as the authentication scheme when you created the project?
If not, add the highlighted following configuration to the web.config.
<system.web> <compilation debug="true" targetFramework="4.7.2" /> <httpRuntime targetFramework="4.7.2" /> <authentication mode="Windows"/> <authorization> <deny users="?"/> </authorization>
Then click on the project in the Solution Explorer. In the properties window, disable Anonymous Authentication and Enable Windows Authentication.