IIS Express Ports for .NET Projects
Answered
Visual Studio already defines the web settings in the project settings. We define the port for each web project in the web settings in the Visual Studio project properties pane. Is this something that is going to be supported in Rider soon? I can setup each project as an executable and put that in now until hopefully supported. Is this shareable amongst the team if we do it this way?
Please sign in to leave a comment.
As far as I'm concerned, you can do it now using applicationhost.config which is automatically generated for your solution, there you can find settings for each web project and define desired ports, bindings, etc.
@Dmitry You are right that one can define the port numbers in that file, but typically you do not commit the .idea folder to source control. This means that everytime you clean your working directory, you need to be sure to backup the applicationhost.config file and restore it after opening the solution(s) in Rider. It also means that the port numbers are not shared among developers.
I find it inconsistent that i *can* specify the SSL port via project properties but not the regular port.
I really wish this will be added int he (near) future.
For me, Rider is overwriting the port numbers in the applicationhost.config file on every build. Is there another place to edit them that it uses to generate the applicationhost.config file?
Hi @Bradley, have you seen this issue
https://youtrack.jetbrains.com/issue/RIDER-7897
Reported as fixed in 2017.1.1, what is your build?
@Ivan I am on 2017.2
@Bradley You'd need to open Project Properties and uncheck the "Generate applicationhost.config" checkbox.
@Ivan I do not see the "Web" section under properties. I was able to use the Environment variable as described in the other article to stop it from regenerating it.
@Bradley, What is your application type? I tried with Rider template project ASP.NET MVC - it worked. But I am on the latest Nightly build available via JetBrains ToolBox App.
@Ivan It is an ASP.NET MVC Application
@Bradley, "Web" section was added in the 2017.2 EAP2 build
I am on Rider 2017.3.1 and don't have a Web Section either
Hi Pascalz,
What kind of application do you have? Please note that there is no 'Web' section for .NET Core apps, you can configure the port for it in run configuration -> Environment variables.