0

I inherited a project that is a collection of WCF Services that target .Net Framework 4.6.1. I wrote a front end SPA application that targets .Net Core 2.2 not realizing that the hosting model was such that both the UI (.Net Core) and the API (.Net 4.6.1) need to run under one Site on IIS.

I'm trying to get this to work on my local machine. I created a new Site in IIS -- Site A. I published my .Net Core application to Site A and set it up with an application pool set to "No Manged Code".

I then added an Application to Site A called API and added all my WCF services in that folder. I configured API to use an application pool that targets ".NET CLR 4.0".

I updated the web.config in the root of Site A to include all the necessary bits for WCF.

I'm able to hit Site A and get my SPA UI, but when I do anything that attempts to hit the backend API (including trying to hit it directly -- http://localhost:464646/api/test.svc), I get the following error:

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

Is what I'm doing even possible? If so, what changes do I need to make in order to get this to work?

RHarris
  • 10,641
  • 13
  • 59
  • 103
  • "the hosting model was such that both the UI (.Net Core) and the API (.Net 4.6.1) need to run under one Site on IIS"? From where did you learn that? Never a requirement. – Lex Li Dec 04 '20 at 15:21
  • It's a requirement from my boss – RHarris Dec 04 '20 at 18:05
  • _"I updated the web.config in the root of Site A to include all the necessary bits for WCF"_ - why and how? – CodeCaster Dec 07 '20 at 14:22
  • My WCF services require a connection string and a `bindings` and `services` section that defines the services that are available. – RHarris Dec 08 '20 at 13:11
  • You can view this link:https://stackoverflow.com/questions/54755562/http-error-502-5-ancm-out-of-process-startup-failure-after-upgrading-to-asp-ne?page=2&tab=active#tab-top – Theobald Du Dec 09 '20 at 06:13
  • see: https://stackoverflow.com/questions/48201847/how-to-run-self-hostedowin-based-web-api-on-iis – Hoshani Dec 10 '20 at 08:44

0 Answers0