IIS Dotnet 6 Web Api has a HttpRequestException every morning - .net-core

I have a .Net 6 Web Api that uses the PnP Core Sdk to communicate with a Sharepoint Online Server (365 Cloud). The Web Api is registered in AAD, has Application permissions for the Sharepoint Rest Api / MS Graph and uses a Certificate for authorization. When I run the process as a user it works for several days without issues, but when I deploy it with IIS 10 on Windows Server 2016 Datacenter I get a HttpRequestException every morning and have to manually recycle the application pool or restart the Application. Otherwise it does not work anymore. I have attached the logs for the exception. I am not very familiar with IIS and are not able to resolve the error. Can somebody provide help?

Related

WCF Service Migrated to IIS 10 - Consistent 503

A computer hosting a WCF service at my work was swapped out from a Windows 7 instance running IIS 7 to a Windows 10 instance running IIS 10.
The WCF service is a third party service that allows remote control of the robotic system the computer is connected to, so I have no access to the source code.
I've tried using MS Deploy to migrate, I've tried perfectly replicating every single setting in IIS and installing all the necessary .Net Framework versions, and I've completely re installed .Net Framework twice.
No matter what I do it always results in a 503 - Service Unavailable. The logs in HTTPERR simply state "N/A" for each failed request to the svc file.
Yes, I've added the svc Mime type and handler.
Also Server Manager has been no help, as it's Windows 10 and not actually a server.
EDIT:
Here are the settings I've copied over:
Application pool for default site uses .Net CLR 4.0, with Application Identity and 32-bit applications disabled.
Application pool for the WCF service uses .Net CLR 4.0, with Network Application as its identity and with 32-bit applications enabled.
It works perfectly fine on the old server, so I'm still at a loss as to why it doesn't work on the new one.
Thanks to Travis Acton for the suggestion to check netsh http show urlacl!
I decided to run the delete command for the port despite it not being shown, and it indicated that the port reservation was successfully deleted. For some reason it was unlisted by netsh.
So now it's all working fine! Thanks so much for the help!

Application Pool Identity seemingly running as network service

I've run into an issue managing our dev IIS instance and an MVC 3 web application. The issue is that when I try to connect to the database from the IIS machine via one of our website I get the error: Login failed for user . Where is the name and domain of the server IIS is running on. The IIS server and SQL Server are on two different machines. I have read multiple questions on SO and other sites and it said to run under application pool identity, which we are doing. We have a user for the database that is tied to the application pool identity.
The site was operating as expected yesterday but after a server reboot it seems to have caused this issue. I have checked everywhere and there is not an area that would cause this to run under NETWORK SERVICE or LOCAL SERVICE. I've been banging my head on this problem all day and was hoping that there was some solution that I have missed.

Web Application deployed in IIS is unable to access Database

I have a web application developed in .net and deployed in IIS so that other systems on the LAN can access the application easily. It was all working fine but suddenly when i did some modification in application deployment services under world wide web under IIS in windows features on/off then my application unable to access database. I have checked everything i am able to access the same database in SQL server management studio.
Please help me
I have resolved my problem and it was very silly actually the problem with in the iis application pool i have stopped the application pool of my application and then started and the problem solved....!!!!

using two .NET 1.1 web services getting server application unavailable with one, other one works

I have a .NET framework 1.1 application that uses two web services, one handles security and the other business functionality. Both were working fine. I made a change to the service responsible for business functionality, as well as the main application, and reinstalled both the web service and the main application. I have done this at least twice before, but this time, after logging in (which shows that the security web service is working), any access to the biz web service fails with "Server Application Unavailable. The web application you are attempting to access on this web server is currently unavailable."
There is no error logged in the event application log.
It works fine on my development laptop (in the Visual Studio .NET 2003 dev environment), this error only occurs when I install it on the server (Windows Server 2003 Standard).
I'm really stumped because all I changed was some code affecting functionality, and I built the application in exactly the same was as the last time.

IIS 6.1 Server 2003 Web Apps Don't Startup on Reboot Sometimes

Occasionally when I reboot one of the servers at a client site the Web Apps running in IIS do not automatically start backup when the server is done rebooting. The IIS service starts up just fine, its set to Auto Start and there are no errors in the event log. Just none of the Web Apps are running, I have to click each one and click start. This only happens occasionally, as they usually start but its completely baffling.
Any thoughts? Its a mix of Classic ASP and ASP.NET applications. There are a total of 4 application pools running between around 8 web applications.
I have seen this happen when apps rely on a resource that is not yet available to the server, such as a network share.
Some people combat this problem by writing a Windows Service who's job is to check for such conditions and start the application.

Resources