Why and how to fix? IIS Express “The specified port is in use”

I had a similar issue running Visual Studio 2019 on Windows 10. Some solutions that worked for others seemed to include: Changing the application port number. Have Visual studio automatically assign a port number each time the application start. Restart Visual Studio Restart the computer. Unfortunately, none of these solutions worked for me, assigning another … Read more

Creating virtual directories in IIS express

IIS express configuration is managed by applicationhost.config. You can find it in Users\<username>\Documents\IISExpress\config folder. Inside you can find the sites section that hold a section for each IIS Express configured site. Add (or modify) a site section like this: <site name=”WebSiteWithVirtualDirectory” id=”20″> <application path=”https://stackoverflow.com/” applicationPool=”Clr4IntegratedAppPool”> <virtualDirectory path=”https://stackoverflow.com/” physicalPath=”c:\temp\website1″ /> </application> <application path=”/OffSiteStuff” applicationPool=”Clr4IntegratedAppPool”> <virtualDirectory path=”https://stackoverflow.com/” … Read more

.vs\config\applicationhost.config in source control

You should ignore .vs folder all together. However, there are cases where you want to persist some config on your applicationhost.config file such as registering FQDN as explained here. For this type of config, you want to use the global application host file where you can persist your changes. In a classic Web Application project … Read more

How do I restore a missing IIS Express SSL Certificate?

Windows 10 users: Repair is only in the Control Panel, not in the Add Remove programs app. I typically run appwiz.cpl to launch the old control panel applet and run repair from there. Windows 7 and 8.1: After going to Add/Remove Programs and choosing the “Repair” option on IIS Express, the certificate has been reinstalled … Read more

HTTP Error 500.30 – ANCM In-Process Start Failure

In ASP.NET Core 2.2, a new Server/ hosting pattern was released with IIS called IIS InProcess hosting. To enable inprocess hosting, the csproj element AspNetCoreHostingModel is added to set the hostingModel to inprocess in the web.config file. Also, the web.config points to a new module called AspNetCoreModuleV2 which is required for inprocess hosting. If the … Read more

IIS Express Immediately shutting-down running site after stopping web application

I recently faced a similar situation when suddenly my IIS Express stopped right after I stopped debugging. This happened after I turned on “Enable Edit and Continue”. So if you disable this you will see that IIS Express stays running even after debugging is stopped. Right click your project > click Properties > select the … Read more

Add MIME mapping in web.config for IIS Express

Putting it in the “web.config” works fine. The problem was that I got the MIME type wrong. Instead of font/x-woff or font/x-font-woff it must be application/font-woff: <system.webServer> … <staticContent> <remove fileExtension=”.woff” /> <mimeMap fileExtension=”.woff” mimeType=”application/font-woff” /> </staticContent> </system.webServer> See also this answer regarding the MIME type: https://stackoverflow.com/a/5142316/135441 Update 4/10/2013 Spec is now a recommendation and … Read more

IISExpress returns a 503 error from remote machines

It looks like you are missing a binding information entry in applicationhost.config file. Open your applicationhost.config file. Possible locations are: %userprofile%\Documents\IISExpress\config\applicationhost.config $(solutionDir)\.vs\config\applicationhost.config (VS2015) Failing that, inspect the output from iisexpress.exe to be sure. Locate your WebSite entry and add following binding with your machine name. <binding protocol=”http” bindingInformation=”:50333:your-machine-name” /> Restart IIS Express