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?

12 comments
Comment actions Permalink

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. 

0
Comment actions Permalink

@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.

0
Comment actions Permalink

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?

0
Comment actions Permalink

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?

0
Comment actions Permalink

@Ivan I am on 2017.2

0
Comment actions Permalink

@Bradley You'd need to open Project Properties and uncheck the "Generate applicationhost.config" checkbox.


0
Comment actions Permalink

@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.

0
Comment actions Permalink

@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.

0
Comment actions Permalink

@Ivan It is an ASP.NET MVC Application

0
Comment actions Permalink

@Bradley, "Web" section was added in the 2017.2 EAP2 build

0
Comment actions Permalink

I am on Rider 2017.3.1 and don't have a Web Section either

0
Comment actions Permalink

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.

0

Please sign in to leave a comment.