Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can JetBrains Rider work properly with IISExpress?

The JetBrains Rider I'm using is the latest version, 2019.1.2 (free 30-day trial), from the official website. It's not a broken version.

I have a solution which contains an ASP.NET web API csproj. The solution was working properly in IIS, or VS + IISExpress.

Like VS, Rider also creates some configuration files in the folder .idea. In it, I can find the applicationhost.config file for IISExpress.

The problem is that IISExpress can never start and shows me an error once I start debugging in console:

**Failed to initialize site bindings**
Error initializing ULATQ.  hr = 80070005
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Waiting for all LISTENER_CHANNELS to stop
Unable to start iisexpress.

I checked the applicationhost.config file. It's the same as the one generated by VS. It also has the line of bind info, and I'm sure the port is available:

<bindings>
  <binding protocol="http" bindingInformation="*:8080:localhost" />
</bindings>

Questions: Can Rider really work properly with IISExpress? Any idea how to config it and what files should be changed?

like image 448
David Smith Avatar asked Jun 20 '19 08:06

David Smith


1 Answers

I finally found that, in Windows 10, it seems to be a permission problem that prevented Rider from starting IISExpress properly.

Solution:

  1. Make sure to run JetBrains Rider as admin (most important for me, then IISExpress could work!)

  2. Open the solution, right click the web project that will run on IISExpress.

  3. Select Properties and go to the Web section.

  4. Check Generate applicationhost.config before running it for the first time.

  5. The URL should be http://locahost:8080/ (8080 could be any port. Has not supported any IP yet.)

  6. Check Anonymous authentication to allow viewing and debugging the page.

  7. Uncheck Generate applicationhost.config after running for the first time. Make sure Rider is still working with IISExpress without any changes in both Properties and applicationhost.config.

Only if Rider is run as admin and the settings are correct in Properties would IISExpress work properly. Otherwise, it won't start or it merely returns HTTP 5XX/4XX.

like image 189
David Smith Avatar answered Nov 12 '22 23:11

David Smith