Aaron Thomas
Aaron Thomas

Reputation: 5281

Single ASP.NET solution that handles multiple ports

Is it possible to specify different ports for a single ASP.NET solution? I'd like to have one solution handling requests coming in on multiple ports, but returning responses that are specific to each port.

Upvotes: 0

Views: 353

Answers (1)

junkangli
junkangli

Reputation: 1212

You can have your site in IIS to set multiple bindings with different ports. Then in your app use HttpContext.Current.Request.Url.Port to determine the port and respond accordingly.

Upvotes: 1

Related Questions