i already found that, and it does not work as simply as it implies.
if i use this:
x new selfhost someproject
and then add the UseIISIntegration call as above, when i publish in VS2019, I get a web.config that looks like:
<?xml version="1.0" encoding="utf-8"?>
in IIS i have my site set up to listen on port 5000
this results in a socket binding error, so if i change SS project to do this:
.UseUrls(Environment.GetEnvironmentVariable(“ASPNETCORE_URLS”) ?? “(http://localhost:5001/)”)
Then you end up with this:
HTTP Error 500.37 - ANCM Failed to Start Within Startup Time Limit
Common solutions to this issue:
ANCM failed to start after 120000 milliseconds
how do you tell IIS to talk to localhost on 5001 while serving itself on 5000?
if you look at the IIS section of the docs i has all this stuff:
is this needed with IIS on 2019 and .net core 3.1?
So i guess what i want to know is:
- What SS project to use for API only (web., selfhost?)
- What additional config needs to be done to the project to get it to work with IIS
- What settings for IIS website? set physical path and a binding on a port?
- What does web.config need to look like
- do i need this? https://www.iis.net/downloads/microsoft/application-request-routing
it sure looks like thing have changed between 2.2 and 3.1, because InProcess is now the default in a .net core project.
i am sure i would probably not even come close to the limits when it comes to outofprocess, but thats not the point. i just cannot find documentation that shows how to make this work and i spent hours last night trying different things to get the default project and default IIS site stuff working
why cant there be a simple Hello app example that works for your recommended approach when using IIS (in or out process)?