Could not load file or assembly 'xxx.Data' The process cannot access the file because it is being used by another process

后端 未结 3 1298
渐次进展
渐次进展 2021-01-22 14:37

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

3条回答
  •  情话喂你
    2021-01-22 14:55

    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..

提交回复
热议问题