2012-09-10 36 views
5

Ứng dụng của tôi đã hoạt động tốt trên máy tính win 7 64 bit của tôi.cuộc gọi đã bị từ chối bởi callee

Tôi cố gắng để chạy winforms visual studio 2008 NET C# ứng dụng trên một khác nhau giành chiến thắng máy 7 64 bit và bây giờ tôi đang nhận được lỗi này:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box. 

************** Exception Text ************** 
System.Runtime.InteropServices.COMException (0x80010001): Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) 
    at Microsoft.Office.Interop.Excel.WorkbookClass.get_Worksheets() 
    at EmailSalesVolumeSolution.WorkBook.OpenWorkBook() in C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\EmailSalesVolumeSolution\EmailSalesVolumeSolution\WorkBook.cs:line 40 
    at EmailSalesVolumeSolution.WorkBook.CreateFiles(String column, Boolean isTest) in C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\EmailSalesVolumeSolution\EmailSalesVolumeSolution\WorkBook.cs:line 144 
    at EmailSalesVolumeSolution.Form1.InitializeWorkBook(String filename) in C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\EmailSalesVolumeSolution\EmailSalesVolumeSolution\Form1.cs:line 108 
    at EmailSalesVolumeSolution.Form1.button1_Click(Object sender, EventArgs e) in C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\EmailSalesVolumeSolution\EmailSalesVolumeSolution\Form1.cs:line 86 
    at System.Windows.Forms.Control.OnClick(EventArgs e) 
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 
    at System.Windows.Forms.Control.WndProc(Message& m) 
    at System.Windows.Forms.ButtonBase.WndProc(Message& m) 
    at System.Windows.Forms.Button.WndProc(Message& m) 
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 


************** Loaded Assemblies ************** 
mscorlib 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400) 
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll 
---------------------------------------- 
EmailSalesVolumeSolution 
    Assembly Version: 1.0.0.0 
    Win32 Version: 1.0.0.0 
    CodeBase: file:///C:/Users/agordon/Desktop/Debug/EmailSalesVolumeSolution.exe 
---------------------------------------- 
System.Windows.Forms 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400) 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
---------------------------------------- 
System 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400) 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll 
---------------------------------------- 
System.Drawing 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400) 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
---------------------------------------- 
System.Data 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400) 
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll 
---------------------------------------- 
System.Xml 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400) 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll 
---------------------------------------- 
GenericParsing 
    Assembly Version: 1.1.3.20921 
    Win32 Version: 1.1.3.0 
    CodeBase: file:///C:/Users/agordon/Desktop/Debug/GenericParsing.DLL 
---------------------------------------- 
Microsoft.Office.Interop.Excel 
    Assembly Version: 14.0.0.0 
    Win32 Version: 14.0.4756.1000 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Excel/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dll 
---------------------------------------- 

************** JIT Debugging ************** 
To enable just-in-time (JIT) debugging, the .config file for this 
application or computer (machine.config) must have the 
jitDebugging value set in the system.windows.forms section. 
The application must also be compiled with debugging 
enabled. 

For example: 

<configuration> 
    <system.windows.forms jitDebugging="true" /> 
</configuration> 

When JIT debugging is enabled, any unhandled exception 
will be sent to the JIT debugger registered on the computer 
rather than be handled by this dialog box. 

đây là một ảnh chụp màn hình:

enter image description here

Tôi đã tự hỏi liệu có ai khác đã gặp sự cố này không?

lỗi này có nghĩa là gì?

+0

tôi sẽ đoán rằng lỗi "RPC" đến từ các Interop Assembly. Bạn đã kiểm tra xem Excel đã được cài đặt trên máy khác chưa? Và đó là phiên bản tương tự như của bạn? – David

+0

@David vâng, vâng! cảm ơn bạn. –

+0

@David bạn có biết liệu điều này có thể áp dụng không? http://msdn.microsoft.com/en-us/library/ms228772.aspx –

Trả lời

5

Đây là giải pháp nhanh chóng và bẩn, thêm một luồng sau khi bạn tạo đối tượng excel.

Something như thế này:

var app = new Microsoft.Office.Interop.Excel(); 
Thread.Sleep(2000); 
+0

Thật kỳ quặc công việc này. – ja72

Các vấn đề liên quan