Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IISExpress AppPool identity verification

I needed to run IISExpress under a specific identity. After going through this post how to run iisexpress app pool under a different identity I changed the processModel's username and password attributes in my \Documents\IISExpress\config\applicationhost.config file.

I would like to verify the change in my web application. Is there a way to verify?

Ultimately, what I'm after is that my security works properly using the PrincipalPermission attribute. I believe the Name property on this attribute matches the user under which IISExpress and my application are running.

Thanks in advance for your help.

like image 292
RT. Avatar asked Nov 08 '13 21:11

RT.


People also ask

What user does IISExpress run as?

IIS Express runs as your user account. When installed, you should find an IISExpress folder in your My Documents folder.

How do I find my application pool identity password?

Browse the following path on command prompt “%systemroot%system32inetsrv” and run APPCMD list apppool “Demo User” /text:* Replace “Demo User” with the App Pool name of which you want to retrieve the password. 4. Under the [processModel] section you will get the username and password which is in Clear Text .


2 Answers

IISExpress runs with current user identity and changing ProcessModel username/password won't help. Only way to run with particular identity is to launch iisexpress.exe with 'runas'.

like image 107
vikomall Avatar answered Oct 01 '22 22:10

vikomall


I'm probably way too late to help, but have you tried changing your project to run with Local IIS instead of IIS Express?

Here's the way I do it (you could start in Visual Studio, but I find this more straighforward):

  • Launch IIS Manager with admin privilege (important that you have rights to muck with localhost)
  • Add a new Application Pool running with the Identity you need for your database (probably your windows account)
  • Create a new application on iis
    • point it to your project folder
    • assign it to the app pool you just created
  • In Visual Studio open your project's properties (select the project in solution explorer hit Alt-Enter or use context menu). In the Web Section, select Local IIS instead of IIS Express. No need to create virtual directory (you already did).

Now your app can open the database. As an added bonus, your project is always available to run. no need to start it from visual studio.

like image 25
MikeSullivan Avatar answered Oct 01 '22 20:10

MikeSullivan