Quick Launch IIS Express

September 27, 2017    Visual Studio Development IIS

Quickly Launch IIS Express from Command Line

Normally I use Visual Studio, but I also like VS Code for our web application. Visual Studio Ctrl+F5 is great to launch the website, but I don’t always want to wait for the project to build and compile TypeScript, etc. VS Code doesn’t have a way to startup the app (in my current setup), so I have to start Visual Studio and Ctrl+F5 then leave it running with all its resource usage.

Save Time and Computer Resources

Our team created a .bat file that we can run to get the localhost website running in a few seconds.

Our Batch File

@echo off
start "" http://localhost:52734
cd "C:\Program Files (x86)\IIS Express"
iisexpress /config:"c:\tfs\git\MyApp\.vs\config\applicationhost.config" /siteid:2

Copy this into a new file called startMyApp.bat. Double click that and a console will popup. http://localhost:52734 will now be available to browse.

I have 2 sites in my applicationhost.config, so you may have to modify that.

Note: if you are using a CLI from a framework, webpack or dotnet run then IIS Express is a thing of the past for you. Enjoy living in the modern world :-)!

comments powered by Disqus