I have a development server which has IIS installed and multiple assigned static private IP's but I also want to use it to run a Kestrel self hosted web service. When I set the Kestrel service endpoint config to run HTTP on port 80 with a specific IP it runs fine side by side with IIS as long as I don't overlap the endpoints/bindings.
That's great, however when I try to set up SSL on Kestrel's service it will not start at all. It will fail with the following exception
System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.
This only happens when I set the endpoint's port to 443, 5001 will work, 446 will work, but not 443.
Here's an example endpoint config that fails for me.
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://10.10.13.11:80"
},
"Https": {
"Url": "https://10.10.13.11:443",
"Certificate": {
"Location": "LocalMachine",
"Store": "My",
"Subject": "portaldev.mydomain.com",
"AllowInvalid": false
}
}
}
Only the port 443 is the issue, IIS also has all it's bindings set to other IP's, none of them attempt to reuse that 10.10.13.11 IP that the Kestrel service is using.
What could be going on here? What's it only with the SSL port and not the HTTP port? Do I need to give permissions to something to let it bind to that 443 port/ip socket?