How to start IIS Express Manually

后端 未结 5 1215
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 23:00

Is there a command line program or service that I can use to start IIS Express manually?

相关标签:
5条回答
  • 2020-12-04 23:33

    iisexpress program is responsible for that.

    http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line

    0 讨论(0)
  • 2020-12-04 23:44

    Once you have IIS Express installed (the easiest way is through Microsoft Web Platform Installer), you will find the executable file in %PROGRAMFILES%\IIS Express (%PROGRAMFILES(x86)%\IIS Express on x64 architectures) and its called iisexpress.exe.

    To see all the possible command-line options, just run:

    iisexpress /?
    

    and the program detailed help will show up.

    If executed without parameters, all the sites defined in the configuration file and marked to run at startup will be launched. An icon in the system tray will show which sites are running.

    There are a couple of useful options once you have some sites created in the configuration file (found in %USERPROFILE%\Documents\IISExpress\config\applicationhost.config): the /site and /siteId.

    With the first one, you can launch a specific site by name:

    iisexpress /site:SiteName
    

    And with the latter, you can launch by specifying the ID:

    iisexpress /siteId:SiteId
    

    With this, if IISExpress is launched from the command-line, a list of all the requests made to the server will be shown, which can be quite useful when debugging.

    Finally, a site can be launched by specifying the full directory path. IIS Express will create a virtual configuration file and launch the site (remember to quote the path if it contains spaces):

    iisexpress /path:FullSitePath
    

    This covers the basic IISExpress usage from the command line.

    0 讨论(0)
  • 2020-12-04 23:44

    Or you simply manage it like full IIS by using Jexus Manager for IIS Express, an open source project I work on

    https://jexusmanager.com

    Start a site and the process will be launched for you.

    0 讨论(0)
  • 2020-12-04 23:45

    From the links the others have posted, I'm not seeing an option. -- I just use powershell to kill it -- you can save this to a Stop-IisExpress.ps1 file:

    get-process | where { $_.ProcessName -like "IISExpress" } | stop-process
    

    There's no harm in it -- Visual Studio will just pop a new one up when it wants one.

    0 讨论(0)
  • 2020-12-04 23:46

    There is not a program but you can make a batch file and run a command like that :

    powershell "start-process 'C:\Program Files (x86)\IIS Express\iisexpress.exe' -workingdirectory 'C:\Program Files (x86)\IIS Express\' -windowstyle Hidden"

    0 讨论(0)
提交回复
热议问题