Request.Url has wrong port information

2019-07-24 06:36发布

问题:

My web application is using Nancy, and is hosted in Asp.Net, in Azure.
In development, I am using IIS Express, and Azure's Compute Emulator.

In production, the homepage opens in http://mydomain/test
Debugging on my machine, the homepage opens in http://127.0.0.1:81/test
But, in my NancyModule, I'm getting:

Request.Url == http://127.0.0.1:82/test

Why 82? Maybe it has something to do with IIS Express showing its site on http://127.255.0.0:82/ ?

回答1:

82 is the port that IIS is serving the app through. Are you trying to do something with it?