.Net 6 on IIS (Port conflict)
Hey! I have an application that I would like to run on port 8081, and it does use port 8081 in startup, in UseUrls(). But I can't get it to run through IIS on the same port because obviously I get a conflict. But the issue is that no other port works either.
I've put IIS on port 8082, my app runs 8081. In the stdout i get a log that app is started on 8081, but IIS it seems can't access the site, so the binding on 8082 times out.
Any ideas to help here? I realize that I should run things on port 80, but it's not an option in this specific case sadly.
This is with dotnet publish and the .net6 hosting bundle
2 Replies
If you're using
UseUrls
, I think ASP.NET Core will start in Kestrel mode? (not sure). So make sure you're running out-of-process (https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/out-of-process-hosting).
Also, maybe you can give your web.config, startup (with the UseUrls
) for more information. Now it's more a guessing game for us.Setting out of process in web.config solved it, thanks! 😄