Starter Site on a Non-standard Port


If you install the starter site onto a port other than 80 you may need to do some code munging.  On line 276 of App_Code\SiteContext.cs there is a line of code that looks like this:


            builder.Port = -1; // Removes the port setting from the site.


This ensures that the correct port is used for the scheme.  If you are using non-standard ports you will need to change this.  For instance:


            builder.Port = secure ? 8443 : 8000;


This will use 8443 for https connections and 8000 for http connections.


You will also need to change line 49 of User\Login.aspx.cs:


            builder.Port = 8443;

Comments (0)