Use IIS Express in visual studio 2010 without sp1 and command window

落花浮王杯 提交于 2019-12-11 13:38:58

问题


I want to use iis express with vs 2010 but i can't install sp1 for now, i have figured out how to do this, it is close to this guide How to configure Visual Studio 2008 to use IIS Express? and it works.

My problem is that when vs runs iisexpress it has also an annoying command window (besides the tray icon) which i would like to get rid off.

I can't install sp1 for vs 2010 but i have installed vs 2010 express with sp1 and double checked that when the integrated iis express option is used it runs without command window

First thing i've done was to check if iis express has some command line options to hide the window, but no luck, on the other site option integrated in sp1 can run without this windows, so...

how to do this the same way / or how the sp1 option is doing this ?


p.s. There is however one catch, if vs runs iis express and you wait couple of seconds and then go to tray-> choose website and click Stop Site the command window disappears but iis still runs and the site also, i don't know if this is a bug or something, but then it is like in sp1 no window, only tray icon.

回答1:


  1. There is no command line option to disable command window, but you can use /systray command line option to disable tray icon.

  2. Visual Studio uses CreateProcess API (or similar API) with creation flag set to CREATE_NO_WINDOW (0x08000000). Following links may help you! http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms684863(VS.85).aspx

  3. Your observation is due to the fact that VS has attached to iisexpress.exe (when you stopped site from tray icon, iisexpress is in the process of shutdown by closing it's console window etc..., but since VS is attached to it, iisexpress is not able to exit and running in the background and waiting for VS to release)



来源:https://stackoverflow.com/questions/6343714/use-iis-express-in-visual-studio-2010-without-sp1-and-command-window

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