I have this error since today in a project which I have worked for months and has always worked.
I tried cleaning the solution and rebuild, and building works perfect. I
I wanted to share my scenario here if it helps someone. I set an interval in javascript for two different functions calling the same function on the server side each differentiated with a just one parameter. Then OS threw the above error
The process cannot access the file because it is being used by another process
[WebMethod]
public List GetNotifications()
{
return objCommonModels.GetNotificationsData(1);
}
[WebMethod]
public List GetOTPNotifications()
{
return objCommonModels.GetNotificationsData(2);
}
//Javascript
setInterval(LoadNotifications, 3000);
setInterval(LoadOTPNotifications, 3000);
Then i seperated the two functions to make them unique... I didn't have faith in differentiating the timer seconds in JS... HOPE IT HELPS SOMEONE..