After installing IIS Express (the easiest way is Microsoft Web Installer ), you will find the executable in %PROGRAMFILES%\IIS Express ( %PROGRAMFILES(x86)%\IIS Express on x64 architecture) and its name is iisexpress.exe .
To view all possible command line options, simply run:
iisexpress /?
and detailed help about the program will appear.
If executed without parameters, all sites defined in the configuration file and marked for launch at startup will be launched. An icon in the system tray will show which sites are running.
There are several useful options when you have some sites created in the configuration file (found in %USERPROFILE%\Documents\IISExpress\config\applicationhost.config ): /site and /siteId .
With the first, you can run a specific site by name:
iisexpress /site:SiteName
And with the latter, you can run by specifying an ID:
iisexpress /siteId:SiteId
At the same time, if IISExpress is launched from the command line, a list of all requests made to the server will be shown, which can be very useful for debugging.
Finally, the site can be started by specifying the full path to the directory. IIS Express will create a virtual configuration file and start the site (do not forget to specify the path if it contains spaces):
iisexpress /path:FullSitePath
This covers the main use of IISExpress from the command line.
Marc Climent Apr 13 '11 at 2:30 p.m. 2011-04-13 14:30
source share