comexception

VSHost crash, REGDB_E_INVALIDVALUE loading Specific Project

…衆ロ難τιáo~ 提交于 2019-12-01 17:48:18
问题 Whenever I load a solution in Visual Studio with a specific project set as the startup project, I get a VSHost32.exe crash. If I keep on going and launch the application, I get a COMException: {"Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE))"} With a stacktrace: at System.Runtime.InteropServices.RuntimeEnvironment.GetDeveloperPath() at System.AppDomain.SetupFusionStore(AppDomainSetup info) at System.AppDomain.SetupDomain(Boolean allowRedirects, String

Exception from Word.ApplicationClass.Activedocument all of a sudden

谁说胖子不能爱 提交于 2019-11-28 13:59:01
I have this single line of code in a Word VSTO add-in project which used to work but suddenly doesn't anymore: Microsoft.Office.Interop.Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument; Before it just returned the Document object as it was supposed to, and I could read from and manipulate it without issue. But now it throws a System.Runtime.InteropServices.COMException exception. "Word has encountered a problem." Very helpful. The exception contains an HRESULT of 0x800A13E9, which hasn't helped me so far either. Out of memory or something? Idk. The new behavior seems to have

how to solve Exception:Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) in C#?

ぐ巨炮叔叔 提交于 2019-11-28 13:20:02
I have written a C# code in console application to open two excels and copy and paste data from one excel to another excel. It was working fine until the destination excel's visibility was true. But I need to hide the excel at the time of execution. So I changed the visibility to false. Like, _destExcelApp = new Excel.ApplicationClass(); _destExcelApp.Visible = false; Now its showing an exception like Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) How to solve this one? I ran into this same error being thrown when I deployed my application onto a

.Net Interop Excel ExportAsFixedFormat() Exception HResult: 0x800A03EC

大城市里の小女人 提交于 2019-11-28 12:07:04
问题 I'm currently implementing a method that generated multiple sheets and export them as PDF. For this I'm using the Microsoft.Office.Interop Library (v14.0.0.0) with .NET 4.5.2 . Running Office is 2016 My code: Dim excel As New Application() excel.Visible = False excel.DisplayAlerts = False Dim workbooks As Workbooks workbooks = excel.Workbooks Dim workbook As Workbook = workbooks.Add(Type.Missing) [...] workbook.ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, String.Format(<a Path>)

WatiN, NUnit and CruiseControl.NET— Error message 800704a6

那年仲夏 提交于 2019-11-28 08:40:51
问题 When running a suite of tests in NUnit with WatiN through CruiseControl.NET (as a service), this error appears: SetUp : System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-000-000000000046} from the IClassFactory failed due to the following error: 800704a6. TearDown : System.NullReferenceException : Object reference not set to an instance of an object. This error has been a nightmare to debug because it is not consistent

How to create an instance of Excel if Excel is not installed

梦想的初衷 提交于 2019-11-27 17:20:56
问题 In my C# app, with the help of Excel Interop dll (as reference) i am reading/writing excel files. If I move this program to system where office/excel is not installed (think of clean machine), i am hitting with below error. System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E

C# Active Directory: Get domain name of user?

谁都会走 提交于 2019-11-27 11:29:32
I know that this type of question has been asked before, but other methods are failing me right now. As it stands our windows service polls AD, given an LDAP (i.e. LDAP://10.32.16.80) and a list of usergroups within that AD server to search for. It retrieves all users within those given groups, recursively searching those groups for more groups as well. Each user is then added to another applications authenticated users list. This part of the application is running successfully. However, we're in need of each user's friendly domain name (i.e. the part of their login DOMAIN/username) So if

Exception from Word.ApplicationClass.Activedocument all of a sudden

拈花ヽ惹草 提交于 2019-11-27 08:04:33
问题 I have this single line of code in a Word VSTO add-in project which used to work but suddenly doesn't anymore: Microsoft.Office.Interop.Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument; Before it just returned the Document object as it was supposed to, and I could read from and manipulate it without issue. But now it throws a System.Runtime.InteropServices.COMException exception. "Word has encountered a problem." Very helpful. The exception contains an HRESULT of 0x800A13E9,

Automating Office via Windows Service on Server 2008

本小妞迷上赌 提交于 2019-11-26 17:43:27
We have a Windows Service which runs on 2003 Server. It opens a source Word document using the Word Interop and then does some stuff with it. It also does likewise with Excel and PowerPoint files. Recently we've tried moving this service onto a Windows 2008 Server machine and are having real problems with it. COMException at Microsoft.Office.Interop.Excel.Workbooks.Open COMException at Microsoft.Office.Interop.Word.Documents.Open I get the above exceptions when the windows service is running on 2008 Server. Looking at the Task Manager, the application does load ok, but then closes again

C# Active Directory: Get domain name of user?

微笑、不失礼 提交于 2019-11-26 15:35:59
问题 I know that this type of question has been asked before, but other methods are failing me right now. As it stands our windows service polls AD, given an LDAP (i.e. LDAP://10.32.16.80) and a list of usergroups within that AD server to search for. It retrieves all users within those given groups, recursively searching those groups for more groups as well. Each user is then added to another applications authenticated users list. This part of the application is running successfully. However, we