开发者

Visual Studio 2010 Ignoring Specified Port Number

I开发者_运维知识库've got a Visual Studio 2010 MVC 3 Azure project that is acting very weird. When I first start it up, it runs under port 81. As I work throughout the day, the port number will increment upwards (81, 82, 83...) as I run/debug my project locally. It doesn't increment everytime. I've gone into the web role project and specified the port number, but Visual Studio ignores my entry and keeps the number it had before. I've closed down VS and done reboots, none of which has helped. Has anyone else seen something similar to this before?


Are you sure you are not confusing the ports you can set on a web project with the ports that will run in the emulator? These are not the same. VS can use IIS Express or Cassini which will allow you to set ports for a web application. However, the Windows Azure emulator uses real IIS, which has nothing to do with the ports you choose in a web project.

The deal is that the emulator will try to take 80 and the incrementally go up one everytime it sees a reservation or bound application. Sometimes you need to restart it (and wait about 2 mins) if you see it keep getting higher and higher. Most people will see the emulator grab 81 because their IIS Default Web Site is already bound to port 80. If you want 80, just go to inetmgr and remove the port 80 binding from Default Web Site (or delete the site). Next time you start the emulator, it will grab 80.


I see this sometimes, and usually stopping the Compute Emulator (which then restarts during next debug session) fixes it.


There is nothing wrong with that, it will work in the specified port on the real cloud.

Imagine that you create a web application on port tcp 80, with 4 instances ... :) you cannot open 4 times the same port. So don't worry about that.

Cheers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜