Can JetBrains Rider work properly with IISExpress?
Asked Answered
E

2

11

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?

Eulaeulachon answered 20/6, 2019 at 8:6 Comment(3)
about the error info in console: I add /trace:error parameter in debug's configuration(end of porgram arguments) to see the IISExpress detail errors. but seems still don't know what happened.Eulaeulachon
"the same as vs generate config", then have you killed all IIS Express processes created by VS?Cockneyism
Yes, I restart my laptop, and copy the ".idea\config\applicationhost.config" file from another PC(has VS installed), it also now working.Eulaeulachon
E
25

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.

Eulaeulachon answered 21/6, 2019 at 3:38 Comment(2)
When I do this, it also adds a line into the .csproj file which essentially would update the URL for everyone else if I were to commit it. Any idea if there is a way around this?Kemp
Interesting, but I don't think it's a good idea to run an IDE as admin.Eccrine
E
0

Thank you @David Smith I found Generate applicationhost.config in edit Configuration iis here

enter image description here

Then find this option is here

enter image description here

Elysium answered 27/9, 2021 at 14:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.