DavisDaniel-8667 avatar image
0 Votes"
DavisDaniel-8667 asked DuaneArnold-0443 commented

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

I started by following this guide:

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.

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That I know about, Core solutions use the appsettings.json file for configuration information not the Web.config.

0 Votes 0 ·

Ok. I added the account to the security settings of appsettings.json. Stopped and started the application pool and site. No change...

0 Votes 0 ·

You can setup for debugging, start the WebAPI using a browser, drop a url in browse address bar to an action method. There is a test action method in the WebAPI project, and you can set a debug breakpoint to see if it makes it.

Why are you even trying to use a service account? What service account? Are you talking about Local systems account?

0 Votes 0 ·
Show more comments

@DavisDaniel-8667 If you want to check the stuck, you can you can try to use failed request tracking to see which request has a problem. you can also check whether there is information in iis logs or Event Viewer.

0 Votes 0 ·

1 Answer

AgaveJoe avatar image
0 Votes"
AgaveJoe answered AgaveJoe edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.