本文介绍了思维呼唤多次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
在更改或修改数据访问层中的某些内容时,出现以下提到的错误.
1.无法将文件"C:\ bin \ Debug \ ajaxservice.Data.dll"复制到"bin \ Debug \ ajaxservice.Data.dll".该进程无法访问文件"bin \ Debug \ ajaxservice.Data.dll",因为它正在被另一个进程使用. ajaxservice.Services
2.无法将文件"C:\ bin \ Debug \ ajaxservice.Business.dll"复制到"bin \ Debug \ ajaxservice.Business.dll".该进程无法访问文件"bin \ Debug \ ajaxservice.Business.dll",因为该文件正在被另一个进程使用. ajaxservice.Services
重新启动系统后,错误不会再出现,但是我正在调用两次方法的问题.
(实际上,我是从Java脚本中调用某些WCF方法,而直接从C#中调用某些方法.方法是从Java脚本中调用时多次调用.如果我从C#中调用,则相同的方法也可以正常工作.请帮助我解决此问题.)
var service = new Hotal.Services.IMenuSearchService();
service.FindRestaurant(City,Area,onRestaurantSeachSuccess,onRestaurantSeachFailed,null);

以下方法仅调用两次:

Hi All,
while I change or modify something in data access layer, I am getting below mentioned error.
1. Unable to copy file "C:\bin\Debug\ajaxservice.Data.dll" to "bin\Debug\ajaxservice.Data.dll". The process cannot access the file ''bin\Debug\ajaxservice.Data.dll'' because it is being used by another process. ajaxservice.Services
2. Unable to copy file "C:\bin\Debug\ajaxservice.Business.dll" to "bin\Debug\ajaxservice.Business.dll". The process cannot access the file ''bin\Debug\ajaxservice.Business.dll'' because it is being used by another process. ajaxservice.Services
After I restarting the system the error will not be again but I am getting method calling twice problem.
(Actually I am calling some WCF method from java script and some directly from C#. The menthod is calling multiple times whenever calling from java script. If I call from C#, the same methods working fine. Please help me how to fix this.)
var service = new Hotal.Services.IMenuSearchService();
service.FindRestaurant(City, Area, onRestaurantSeachSuccess, onRestaurantSeachFailed, null);

the below method only calling twice:

public IEnumerable<data.newrestaurantheader> FindRestaurant(string City, string Area)
        {
            Business.Menu menu = new Business.Menu();            
            return menu.FindRestaurant(City, Area);
        }


 public IEnumerable<data.newrestaurantheader> FindRestaurant(string City, string Area)
        {
            // LinQ query here

        }

推荐答案


这篇关于思维呼唤多次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 07:27