Is there a way to tell Visual Studio 2010 what value to use for the /config parameter when IIS Express is started?
Using Process Explorer I can see:
- the iisexpress.exe process is started by Visual Studio with the /config parameter pointing to 'My Documents\IISExpress' via the environment variable named
IIS_USER_HOME
.
However I need to store my applicationhost.config in another location.
Changing that IIS_USER_HOME
variable might do the trick (?) but I don't know any way to access it.
What I have tried:
I guess that these instructions on how to debug .NET web projects with IIS Express pre SP1 might work for me but they seems like a hassle to follow. There ought to be an easier way?
This StackOverflow question about global variables within IIS Express suggest that I should move the location of 'My Documents'. Unfortunately that is not an option for me.
You cannot change IIS_USER_HOME because this is set by IISExpress.exe during the process startup.
I am not sure about concerns you have about how to debug .NET web projects with IIS Express pre SP1 .
If you don't want to use macros in VS, probably you can just start IIS Express from command line with /config switch and then from visual Studio attach to iisexpress.exe and debug your web application.