C
C#•2y ago
Neteyes

.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
gerard
gerard•2y ago
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.
Neteyes
Neteyes•2y ago
Setting out of process in web.config solved it, thanks! 😄