Issues with deploying ASP.NET Core 5.0 Web API

74 views Asked by At

I'm creating a simple API that will create a PDF letter based on data passed into the API via the body.

For simplicity sake, I've got the API working just fine on my local machine via IIS Express.

I'm now attempting to deploy it on our web server (Server 2019).

In publishing the API, I've selected net5.0 as the Target Framework, deployment mode is set to self-contained, and the target runtime is set to win-x64.

I've logged into our web server, copied my publish folder contents into a new folder (D:\Sites\WebSite\Mailer) [Mailer is the API reference - so it should be website.com\mailer\pdfmaker is the designed url that again works fine on my local machine running IIS in Visual Studio 2019].

I've gone into IIS under Application Pools, and created a PDFMaker app pool, set to "No Managed Code" that is started.

I've gone under the WebSite, and added an application named Mailer using the PDFMaker app pool, pointed to the correct physical path (D:\Sites\Websites\Mailer) using pass-through authentication.

I would assume that all should work, but whenever I try to access the API, (using Postman), I get a HTTP 404 Not Found error.

So, what am I missing?

For the record, I've also tried using framework-dependent as the deployment mode, and Portable as the target runtime, to no avail.

0

There are 0 answers