iis - Assert User.Identity.Name is set right in my MVC app -


I have a ASP.NET MVC app running on IIS 7.5 with an app pool that is set to identify "roger01" is.

I want to make sure that when I present the @ User.Idenity.Name , this is the identity (Roger 01) that is displayed.

I am ASP impersonation but it is not compatible with integrated mode. And ASP.NET MVVC requires unified mode.

I have also set an anonymous authentication identity to "Roger 01", but it will not change anything.

I really am not able to count even a few hours ...

It seems that it can be completed that you know what '

identifies an application pool in IIS

when creating a new application pool, the pool It is often convenient to be able to identify the identity of the user. This issue usually arises at IIS 7 / 7.5, where the default application pools use the identity of IIS APPPOOL \ identname . And when you give access to the database / file system, you will have to give the exact identification name.

Usually I use this simple script. Simply copy it to a text file, name it as test.aspx and point it to your browser. The name of the application pool will be presented to you in a clear way.

  & lt;% @ page language = "c #"%> Current user: & lt;% = System.Security.Principal.WindowsIdentity.GetCurrent (). Name% & gt; 


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -