.Net Core on IIS stuck on pending for api call tests

Davis, Daniel 1 Reputation point
2021-06-15T17:08:31.427+00:00

I started by following this guide:
https://www.c-sharpcorner.com/article/publish-and-host-asp-net-core-web-api-on-iis2/

I installed a different bundle for .netcore 3.1 (guide is for 2.1), but this was after I accidently installed 5.

I'm attempting to use a service account and I've added that in the application pool that the site is under as a custom account.

My first issue was that there wasn't correct permissions for web.config. At this time api calls appeared in the log file.

I added the account to the security of web.config.

I now have all api calls just stay on pending and they don't appear within the log. How do I find where it's getting stuck? This is my first time using IIS or doing really any of this kind of publishing.

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,157 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 26,191 Reputation points
    2021-06-16T15:42:17.977+00:00

    Service accounts are a very common security approach. Don't take a lot of stock in the previous comment. Also, Web API certainly has web.config file which is created during the deployment process. And from the web.config you can enable logging. This will log any startup errors. What shows in the logs depends on how logging works in your application. If you do not have logging designed then set the web.config to the development environment.

    If you can remote into the server and have installed the SDK then another option is running the app from the command line.

    dotnet myapp.dll  
    

    This will show start up errors in the console and will verify the app will start and run. You should be able to browse to any Get URL and see results. Pay attention to the url registered in the console.

    I'm not sure what pending means. The HTTP request never returns? There are no errors? If so, this is probably an IIS configuration issue. The deployment guide you shared is not the best. I recommend the official docs. There are several to read through as well as troubleshooting docs.

    If all else fails, then remove the ASP.NET Core app and replace it with a simple index.html page that contains Hello World. This verifies the IIS app can respond to requests.

    0 comments No comments