Iis – Configure IIS Web Site for alternate Port and receive Access Permission error

iiswindows-server-2008-r2

When I configure IIS to run a Web site on Port 1414, I get the following error:

————————— Internet Information Services (IIS) Manager
————————— The process cannot access the file because it is being used by another process. (Exception from HRESULT:
0x80070020)

However, as according to netstat the port is not in use.

Completely aside from IIS, I wrote a test program (just to open the port and test it):

TcpListener tcpListener;
tcpListener = new TcpListener(IPAddress.Any, port);
try
{
     tcpListener.Start();
     Console.WriteLine("Press \"q\" key to quit.");
     ConsoleKeyInfo key;
     do
     {
          key = Console.ReadKey();
     } while (key.KeyChar != 'q');
 }
 catch (Exception ex)
 {
     Console.WriteLine(ex.Message);
 }
 tcpListener.Stop();

The result was an exception and the following ex.Message:

An attempt was made to access a socket in a way forbidden by its access permissions

The port was available but its "access permissions" are not allowing me access. This remains after several restarts.

The port is not reserved or in use as far as I know and while IIS says it is in use, netstat and my test program say it is not and my test program receives the error that I am not allowed to access the port. The test program ran elevated. The IIS Site is running MQSeries, but the MQ listener also cannot start on port 1414 because of this issue. A quick search of my registry found nothing interesting for port 1414.

What are socket access permissions and how can I correct mine to allow access?

Update: Output of netstat for port 1414.

C:\Windows\system32>netstat -ban|findstr 1414

C:\Windows\system32>

Best Answer

According to IBM documentation, mq defaults to 1414, so you won't be able to have both a website and mq using the same port. (Unless I'm misunderstanding your question.)