How do i host an aspnet core API and Website on the same IIS box?

0

I have a website running on IIS. It has a wildcard cert setup on port 443. The website runs in netcore on port 44311 (options.SslPort = 44311;). This works fine.

I have just added an API on a new website. I put this on port 8080 and 4433. The app runs on port 44378 (options.SslPort = 44378;).

The appsettings.json has the api endpoint set as "ApiEndpoint": "https://localhost:44378/api"

When i run this locally in IIS Express from Visual Studio i can call the API and i get good results. However now it is deployed i get:

System.Net.Http.WinHttpException (0x80072EFD): A connection with the server could not be established

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at System.Threading.Tasks.RendezvousAwaitable`1.GetResult()

at System.Net.Http.WinHttpHandler.<StartRequest>d__105.MoveNext()

I think something is wrong with ports/SSL. Any ideas where i have gone wrong?

api
ssl
iis
asp.net-core-2.0
iis-8
asked on Stack Overflow Feb 6, 2018 by WhatTheDeuce

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0