Unable to use https with IISExpress
Answered
I'm trying to use https with a C# project using IIS Express and in my project file I have this line:
<IISExpressSSLPort>44371</IISExpressSSLPort>
Unfortunately, when I try to run the server it starts the server using http:
"C:/Program Files/IIS Express/iisexpress.exe" /config:C:/Users/User1/Documents/Company/WebSite/.idea/config/applicationhost.config /site:WebSite /apppool:Clr4IntegratedAppPool
Starting IIS Express ...
Successfully registered URL "http://localhost:44371/" for site "WebSite" application "/"
Registration completed for site "WebSite"
IIS Express is running.
Enter 'Q' to stop IIS Express
In the past I've been able to edit the applicationhost.config and just add the https binding. However, now it seems like Rider is regenerating the applicationhost.config every time I start the server and overrides the applicationhost.config file. The applicationhost.config has this binding:
<binding protocol="http" bindingInformation="*:44371:localhost" />
and the past I've been able to add this:
<binding protocol="https" bindingInformation="*:44371:localhost" />
but now the file gets overridden so any changes I make to it are erased when I launch the server. How do I get Rider to bind my website using https?
Please sign in to leave a comment.
I am having the same issue as well. Really annoying
Thanks for the feedback, this must be fixed in next available build, see https://youtrack.jetbrains.com/issue/RIDER-4420
The workaround for now is setting env variable RIDER_DISABLE_IIS_EXPRESS_CONFIG = true and editing a config manually.
Please take a look at https://youtrack.jetbrains.com/issue/RIDER-7897 as well
Do you mean setting the env variable in the Windows system environment variables? I tried that and it still overrides the file.
Having this issue right now. Works in VS. This was a project in VS. I have tried seemingly everything. Tried changing the ports, installing IIS feature in Windows. Port is well above 1024. I just can't figure it out. I start a new project, and it works right away. Thoughts?
Ugh, I'm having this issue also. I'm usually on macOS but I'm working with a project on Windows and have to use IIS Express, this is a pain.
go to edit configuration then in inviroment variable set this:
ASPNETCORE_ENVIRONMENT=Development;ASPNETCORE_URLS=http://localhost:5000;https://localhost:44300
This is still an issue and very annoying, I need ssl to run!
When I change the `applicationhost.config` it just turns `<binding protocol="https" bindingInformation="*:57586:localhost" />` back into `<binding protocol="http" bindingInformation="*:57586:localhost" />`
When I use the `ASPNETCORE_ENVIRONMENT` setting it just removes the https entry.
What is the problem here, this should not be so freaking hard right?
The problem still exists in Rider 2019.2.2. Initially I had such structure:
Rider adds http line after IIS Express starting:
but I probably was able to solve it following way. I've just commented the line with http and IIS Express has started normally:
Hello,
As it is mentioned in the issue RIDER-7897, now it is possible to disable automatic applicationhost.config file generation in UI, in order to do that please navigate to Edit configuration | Settings Profile | Generate applicationhost.config - disable, see screenshot attached.
Please let me know if it helps. Have a great day!