6

I followed the accepted answer to this question to try to get my .Net web application to run under a specific set of credentials when debugging locally via the IIS Express server running on my machine, however, I can't seem to get the changes to pick up. Admittedly, I have no idea how to verify what is actually happening, but the behavior I'm seeing leads me to believe that the web app just continues to run under my own Windows credentials. I've stopped the IIS Express processes via System Manager and also restarted my computer, but no dice. Here's what I have in my applicationhost.config file...

<applicationPoolDefaults managedRuntimeLoader="v4.0">
    <processModel userName="username" password="a_strong_pwd" />
</applicationPoolDefaults>
Community
  • 1
  • 1
Dan Forbes
  • 2,734
  • 3
  • 30
  • 60

2 Answers2

1

What fixed things for me was editing %userprofile%\documents\IISExpress\config\applicationhost.config. Apparently, it overrides the applicationhost.config that Visual Studio points to.

Jamie
  • 1,754
  • 16
  • 34
0

Try adding an indentityType="SpecificUser" attribute:

<applicationPoolDefaults managedRuntimeLoader="v4.0">
  <processModel indentityType="SpecificUser" userName="someName" password="a_strong_pwd" />
</applicationPoolDefaults>

The settings are detailed in: https://msdn.microsoft.com/en-us/library/ms689446(v=vs.90).aspx

  • It's **identityType** and it's still not working for me. I have IIS 10 on Win10. Any suggestions ? – Misi Nov 14 '17 at 12:07