Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF C#4.0 ASP.NET4.0
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

        }
Posted 28-Dec-11 0:37am
Edited 28-Dec-11 0:38am
v2
Comments
Mika Wendelius at 28-Dec-11 5:38am
   
pre tags added around the code

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

That tells me that some other code is calling the javascript method multiple times. Perhaps you're calling a method that runs the code once, and then the calling method runs the code itself a second time. It's hard to tell what's going on, because only YOU can run YOUR code under the debugger to see why it's happening.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,917


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 28 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100