ctrlalt313373
ctrlalt313373

Reputation: 4065

Static Port for Azure Web Role in Dev Fabic

How do I get my Azure Web Role to always use the same port when I run the solution instead of always incrementing the port by one?

Upvotes: 4

Views: 557

Answers (1)

user94559
user94559

Reputation: 60143

I assume you're talking about running locally in the WA Simulation Environment. If so, it tries to use the port you specified (usually 80) and increments the port number by one at a time until it finds a free port.

If the port keeps increasing every time you run, it means the port is not getting freed up when you shut down your app. First, make sure you're actually stopping the previous run (open up the "dev fabric" or "compute emulator" depending on which SDK version you're using, and be sure to stop the old run). Second, you should be able to reclaim all those old ports for good if you shut down the dev fabric (compute emulator). You can do that by right-clicking the system tray icon and shutting down, or do "csrun /devfabric:shutdown" from the command line.

Upvotes: 3

Related Questions