IIS Express path to applicationhost.config in Visual Studio 2010

旧城冷巷雨未停 提交于 2019-12-24 05:30:30

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/6098374/iis-express-path-to-applicationhost-config-in-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!