Code Project

Link Unit

Monday, May 19, 2008

ASP.Net Server Unable to assign port

I was facing this problem(ASP.Net Server Unable to assign port) way back when I started using Visual Studio . After googling around for a while this is what solved the issue for me.
I hope this help you as well.
If you want to assign a fixed port number for debugging, please refer to the following steps:
1. Right click the Project in the Solution Explorer, and then select “Properties” 2. Click “Web” tab. 3. Check “Specific port” instead of “Auto-assign Port”.
If you want to debug with IIS, please follow the first and second steps above, and then check “Use IIS Web Server” instead of “Use Visual Studio Development Server”. Also, click the “Create Virtual Directory” button.
Please note the above steps are based on Web Application project. For the Web Site project, we can fix the port number by following steps:
1. Click the project in Solution Explorer. 2. Open “Properties” panel. 3. Set “Use dynamic ports” property to false and assign a value to "Port number".
You may also like to follow the excellent description given at following link
http://blogs.msdn.com/bradleyb/archive/2005/08/29/457573.aspx
I hope this help you as well.