Azure emulator switches web role ports

Answered Azure emulator switches web role ports

  • Monday, December 20, 2010 4:40 AM
     
     

    Hi!

    I found weird problem with Azure emulator. By default when I run my cloud app on emulator it uses port 80 like expected. After some error situations when I run my app again (same way in debug mode) it starts using port 81 or 82 instead. Is it bug in emulator or are there settings to keep emulator using port 80 always?


    With best regards,
    Gunnar Peipman
     
    Also visit my ASP.NET and SharePoint blog!

All Replies

  • Monday, December 20, 2010 6:08 AM
     
     Answered

    The compute emulator starts with the port you specified (80) and picks the first one available, so if 80 isn't available, it will pick 81, etc.

    So when you see it incrementing between runs, it generally means the previous port didn't get freed up properly.  Shutting down the compute emulator generally takes care of this.  (csrun /devfabric:shutdown or use the system tray icon)

  • Monday, December 20, 2010 6:11 AM
     
     
    Yes, I already found out that restarting emulator helps. But why it does not use previously used port after error in web role?
    With best regards,
    Gunnar Peipman
     
    Also visit my ASP.NET and SharePoint blog!
  • Monday, December 20, 2010 6:45 AM
     
     
    Because the port is not freed up again.  As to why it wasn't freed up, I don't know.