简体   繁体   中英

IIS url rewrite reverse proxy to asp.net core web app on localhost

I have a IIS 8 on a server where some sites are hosted. I want to call my ASP.NET App which should not be hosted as a site in my IIS, but it should be reached over localhost:5001 on the IIS server.

To achieve that I created a site in my IIS which should port forward to my backend app. For that I used the url rewrite module -> Reverse Proxy. I entered in the Inbound Rules the address which should be navigated to, so I used for that localhost:5001 and left all the settings as default.

If I look at all the tutorials, everything should be working now, but I always get the following error:

HTTP Error 502.3 - Bad Gateway The server returned an invalid or unrecognized response Error Code: 0x80072f78

The certificate for the https site which should port through to localhost is valid, since the error code guides me to certificate errors.

Okay, it was a problem with the certificate of my backend app. If I call the proxy it works perfectly fine, it just throws the exception with the certificate error. So the backend app doesn´t have to run over https.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM