IIS Express Windows Authentication

Visual Studio 2010 SP1 and 2012 added support for IIS Express eliminating the need to edit angle brackets. If you haven’t already, right-click a web-flavored project and select “Use IIS Express…”. Once complete, select the web project and press F4 to focus the Properties panel. Set the “Windows Authentication” property to Enabled, and the “Anonymous … Read more

Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname

Troubleshot this issue with ngrok. In the words of inconshrevable, some applications get angry when they see a different host header than expected. Running the following command should fix the problem: ngrok http [port] -host-header=”localhost:[port]” Depending on the version, you may also want to try: ngrok http [port] –host-header=”localhost:[port]”

Using Custom Domains With IIS Express

This is what worked for me (Updated for VS 2013, see revision history for 2010, for VS 2015 see this: https://stackoverflow.com/a/32744234/218971): Right-click your Web Application Project ▶ Properties ▶ Web, then configure the Servers section as follows: Select IIS Express ▼ from the drop down Project Url: http://localhost Override application root URL: http://dev.example.com Click Create … Read more

Unable to launch the IIS Express Web server

I had the exact same problem. The reason – bad IIS config file. Try deleting the automatically-created IISExpress folder, which is usually located at %userprofile%/Documents, e.g. C:\Users\[you]\Documents\IISExpress. Don’t worry, VS should create it again – correctly, this time – once you run your solution again. EDIT: Command line for deleting the folder: rmdir /s /q … Read more

Where is the IIS Express configuration / metabase file found?

The configuration file is called applicationhost.config. It’s stored here: My Documents > IIS Express > config usually, but not always, one of these paths will work %userprofile%\documents\iisexpress\config\applicationhost.config %userprofile%\my documents\iisexpress\config\applicationhost.config Update for VS2019 If you’re using Visual Studio 2019+ check this path: $(solutionDir)\.vs\{projectName}\config\applicationhost.config Update for VS2015 (credit: @Talon) If you’re using Visual Studio 2015-2017 check this … Read more

How to enable external request in IIS Express?

There’s a blog post up on the IIS team site now explaining how to enable remote connections on IIS Express. Here is the pertinent part of that post summarized: On Vista and Win7, run the following command from an administrative prompt: netsh http add urlacl url=http://vaidesg:8080/ user=everyone For XP, first install Windows XP Service Pack … Read more

Visual Studio debugging/loading very slow

Here is how I solved the “slow symbol loading” problem in Visual Studio 2012: Go to Tools -> Options -> Debugging -> General CHECK the checkmark next to “Enable Just My Code”. Go to Tools -> Options -> Debugging -> Symbols Click on the “…” button and create/select a new folder somewhere on your local … Read more