How to fix System.IO.FileLoadException: Could not load file or assembly 'file:///C:\inetpub\wwwroot\project\bin\BusinessLayer.dll' or one of its dependencies. Access is denied.
On IIS server, after hosting my Web API works fine for two or three minutes then it get crashed with below message ..
Server Error in '/' Application.
Could not load file or assembly 'file:///C:\inetpub\wwwroot\project\bin\BusinessLayer.dll' or one of its dependencies. Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\inetpub\wwwroot\project\bin\BusinessLayer.dll' or one of its dependencies. Access is denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'file:///C:\inetpub\wwwroot\CreditRepairmenServiceslive\bin\CreditRepairmen.Service.BusinessLayer.dll' could not be loaded.
I have crossed check all my packages and dependencies , all are fine...
Not sure what making my site to crashed...
My guess is something is wrong with IIS.......