开发者

Static Port for Azure Web Role in Dev Fabic

开发者 https://www.devze.com 2023-01-28 18:04 出处:网络
How do I get my Azure Web Role to always use the same port when I run the solution instead of always incr开发者_运维问答ementing the port by one?I assume you\'re talking about running locally in the W

How do I get my Azure Web Role to always use the same port when I run the solution instead of always incr开发者_运维问答ementing the port by one?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号