IIS Application Pool Active Directory Identity UNC Path Access

41 Views Asked by At

We are hosting a third party application that access a UNC path in the appplication.

We have the app pool running under an AD account that has permissions to the UNC path.

The application will work for 24-28 hours but then access to the UNC path will be denied and throw an error in the logs. Only when we restart the app pool, the application starts working again.

Load User Profile: True

Been fighting with this one more months and cannot track the source of the issue down.

We set load user profile to true and that did not help.

We tried using an administrator active directory account to test it and that did not work.

We triple checked permissions on the UNC path and that is configure correctly.

UPDATE MORE INFO: The code that is executing File.Exists C# https://learn.microsoft.com/en-us/dotnet/api/system.io.file.exists?view=net-7.0.

It is throwing an error because the logic of the application checks if file exists, if it doesnt it throws an error saying it cannot access the file.

This application does work for 1-2 days and then it will start throwing the error. The error is just being logged using this https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.loggerextensions.logerror?view=dotnet-plat-ext-7.0.

The reason I know what their code is doing because we did contact them and they sent us the snippet of code that is throwing the error.

I am not sure what other information is important to know at this point.

It is running in classic mode. The app pool is currently using an AD administrator account. Anonymous Authentication is enabled and it is not using the application pool Identity. It is using the IUSR. This is one thing I plan on changing it to see if that resolves the issue but it does not make sense that the it works once the application pool is restarted.

0

There are 0 best solutions below