Configure IIS Web Site for alternate Port and receive Access Permission error
Posted
by
Andrew J. Brehm
on Server Fault
See other posts from Server Fault
or by Andrew J. Brehm
Published on 2012-10-17T15:12:00Z
Indexed on
2012/11/13
23:04 UTC
Read the original article
Hit count: 322
iis
|windows-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?
© Server Fault or respective owner