Visual studio that won't be repaired... Everytime I want to compile an app on vs 2015 - it crashes. Even if I want to compile the main function or write somthing to it, there appears a window, which says > Visual Studio 2015 has stopped working It goes same on [...] read more
I am trying to use Shell32 to get extended file properties in c#. My code for this is as follows. var file = FileUpload1.PostedFile; List<string> arrHeaders = new List<string>(); Shell shell = new ShellClass(); //Exception is thrown at next line Folder rFolder = shell.NameSpace(Path.GetDirectoryName(file.FileName)); FolderItem rFiles = rFolder.ParseName(Path.GetFileName(file.FileName)); for (int [...] read more
I have 2 windows program. Program A : create with visual studio 2015 with crystal report SP18 Program B : create with visual studio 2017 with crystal report SP22 I have a computer with crystal report runtime SP 18. I run program A in that computer. Program A can create [...] read more
This is a problem that I'm intermittently running into, but when it happens it takes down all of my app services at the massive displeasure of the clients that are paying me to use them. At 4am this morning (when no-one was using any of the apps), the CPU on [...] read more
My application has a feature to export to Microsoft Word, but it hasn't worked since I've upgraded from Microsoft Office 2010 to Microsoft Office 2013. Here is the code: Microsoft.Office.Interop.Word.Application appVersion = new Microsoft.Office.Interop.Word.Application(); appVersion.Visible = false; and this is the error message: > Unable to cast COM object of [...] read more
I am really struggling to get this installed. I have tried the suggestions here in an attempt to rectify any possible corruption. I mounted the disk image to 'G' to do an offline install. I also attempted an online install with similar results. Output as follows: Microsoft Windows [Version 6.2.9200] [...] read more
I have a Win32 app that exposes a REST endpoint and displays a window to log requests. It's written in Delphi and is 32-bit. I've run it in Ubuntu (20.04) using Wine (4.0.4). It runs straight out of the box. I create a 32-bit prefix and launch it. All is [...] read more
I want to set some custom document properties of a word document I'm creating in my C# code. To do this, I followed this MSDN article and came up with this code: using Word = Microsoft.Office.Interop.Word; // Version 12.0.0.0 word = new Word.Application(); word.Visible = false; Word._Document doc = word.Documents.Add(ref [...] read more
[Updated problem description] We have a bulk import process for which we were passing IEnumerable<SqlDataRecord> as a Table Valued Parameter (TVP) to a Stored Proc, as DataTable Type was not available until EF Core 1.1. We just upgraded our project to use .Net Core 2.0 and started updating the code [...] read more
I'm a novice in the windows form application. It's my first application at the office. My office management gives me the source code. But they don't know anything about it. I run those codes on visual studio 12 (64 bit). Everything is running, but the crystal report is not working. [...] read more
I'm having a strange issue with Wine on macOS 10.13.4. I have Homebrew installed and have installed Wine with brew install wine winetricks. $ wine --version wine-3.0 When I run wineboot --init > log 2>&1 I get a dialog box that says The Wine configuration in /Users/richard/.wine is being updated, [...] read more
We're using Microsoft System Center Configuration Manager 2012. And I have issues installing the SCCM Client on a Windows XP Prof SP3 PC. The Log on the XP machine says: Failed to query BITS 2.5 interface with error 0x80004002 ccmsetup 22.10.2014 15:46:34 268 (0x010C) This operating system does not contain [...] read more
I'm using Windows 7 64 bits and I'm trying to install Google Chrome. However, every time I do, I get this error message: > Google Update installation failed with error 0x80004002. There is a Show me help for this issue link, but it does nothing. I tried the standalone installer [...] read more
I have documentum developer edition 6.6. I want to get document content (read content into stream) using DFC in c#. I have used following C#.net code IDfId id = collection.getId("r_object_id"); IDfDocument doc = (IDfDocument) session.getObject(id); but it throws following exception. > Exception: Unable to cast COM object of type 'System.__ComObject' [...] read more
The below code is used to get the custom document properties for Excel workbook. var xlApp = Globals.ThisAddIn.Application; // This works in VSTO Excel Add-in var xlApp = new global::Microsoft.Office.Interop.Excel.Application(); // This doesn't work anywhere xlApp.Visible = true; global::Microsoft.Office.Interop.Excel.Workbook workbook = xlApp.Workbooks.Open(file, false, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, [...] read more
VisualSVN Server installation fails with the following error message: > Custom action InstallWMISchemaExcute failed: Cannot query proxy blanket: No > such interface supported (0x80004002). read more
I'm seeing a strange issue with FluentValidation (v8.2.0) when I try to compose validators: > System.InvalidCastException HResult=0x80004002 Message=Unable to cast object > of type 'BaseModel' to type 'DerivedModel'. Source=FluentValidation > StackTrace: at > FluentValidation.Internal.ConditionBuilder1.<>c__DisplayClass2_0.<When>g__Condition|0(ValidationContext > context) in > C:\Projects\FluentValidation\src\FluentValidation\Internal\ConditionBuilder.cs:line > 62 at FluentValidation.Internal.PropertyRule.<Validate>d__67.MoveNext() in > C:\Projects\FluentValidation\src\FluentValidation\Internal\PropertyRule.cs:line > 270 at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() [...] read more
I've been testing out creating script tasks through Biml for SSIS packages. I want to be able to locally execute/test packages successfully. I was unable to execute the packages for a project from my local development environment, as they all error with the same error below. Issue: Error: 0x0 at [...] read more
I'm writing an application to modify the volume of another application and using the CoreAudioApi dll to do so. The following block of code works perfectly on the main thread, but when called in a separate thread, an InvalidCastException is raised. I threw in a Mutex in case this was [...] read more
I am developing a Office Development with Visual Studio. And receive the error below Error: ** Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following [...] read more
I couldn't find anything regarding a search by conversation ID in the Outlook.Items object collection (corresponding an outlook inbox) Scenario: we designed a website that requests an email to be searched in outlook client through a table insert insert into Request(UserID,CID,emailDate,outlookAccount) values ('myUserID','28603734D8EE4316A59257895B1B4A1A','2020-02-11','myOutlookAccount@outlook.com') From out VSTO add-in (visual basic) we [...] read more
I'm trying to print the contents of a WPF WebBrowser control so that no print dialog is shown, but am having no luck. I have tried the following and am sure it did work: PrintDialog printDialog = new PrintDialog(); printDialog.PrintDocument(((IDocumentPaginatorSource)browser.Document).DocumentPaginator, "My App"); but for some reason, I'm now getting the [...] read more
Exception: Unable to cast COM object of type 'System.__ComObject' to interface type 'DirectShowLib.IBaseFilter'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{56A86895-0AD4-11CE-B03A-0020AF0BA770}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). My Graph: Custom File Source [...] read more
Trying to uninstall this update as it breaks one of our .net applications but it will not remove. Tried in Installed Updates which fails, also tried removing via DISM which fails with the log below (I had to remove timestamps and a little inconsequential data to make it all fit [...] read more
There are several posts along this line, but the fixes that answered other questions did not solve my problem. * Windows 10 Pro * Upgraded from W7 Pro, then did a "Reset", as I was having some problems with a screen saver and wanted to get a cleaner install without [...] read more
Right now I my computer crashes with errors like SystemService exception. It does this quite frequently. Especially if I run a GPU intensive application like a game. I've executed a DISM command for RestoreHealth after sfc /scannow revealed corrupted files. However, it seems that the files needed for that are [...] read more
As some of google chrome's dependencies for Linux are unable to be met (libstdc++6 and lsb-base), I've been unable to update it, which bothers me. So I've tried to install Google Chrome for Windows. I have installed wine (version 1.6.1) and it seems to be working. In addition, I've gotten [...] read more
Windows Server 2012 R2 (Datacentre edition) I cannot enable Data Deduplication. This particular volume previously had data deduplication enabled. Computer was changed from BIOS to UEFI boot, so basically Windows was reinstalled and boot disk has changed. However I get the same error on new volumes that did not previously [...] read more
I've used Winebottler without problems to create an app bundle but now I can't create them anymore because I get a similar error for every attempt. I even tried creating a new user account and uninstalling Wine and Winebottler and deleting every trace of them from terminal but the problem [...] read more
I upgraded last year from Windows 8.1 which was licensed. Since then I've been using Windows 10 quite happily with no problems although Windows Update reports it hasn't updated since May 2016 and that it can't update now due to problems with error 0x80004002 reported. Last night I installed Photoshop [...] read more
I installed Portable Virtual Box in my flash memory.when I run it in my laptop it works great.but when I want to run it in my PC this error appears and it appears again when I run it as administrator. Failed to create the Virtual Box COM object. The application [...] read more
I've tried to install Hyper-v platform component on my Windows 8 Pro. I got no message about anything going wrong. Just after "need restart" i got 30% progress done, then sudden restart again and "canceling unsuccessful install" message. No log messages, or rather say i don't know where to look [...] read more
I've got this shared event handler for 19 menu items, labeled "1" to "19", with corresponding tag values of 1 to 19: // This event handler is shared by all 19 zoom level menu items private void toolStripMenuItem_ZoomLevel1_Click(object sender, EventArgs e) { //int zoomLevel = sender.Tag; // "object does not [...] read more
im trying to do a program that read a string from a website e send it to another. the process to read string for the first works correctly, and also the function to send a string to the other works, but have problem when this function was called from the [...] read more
I have problems with enter transaction code in SAP when I am running c# test. I don't know where I am doing incorrect work. After log in to SAP enviro I am trying to enter transaction but it doesn't enter. It gives me error. I tried many ways. Thanks for [...] read more
.NET, WinForms. The calls are triggered from the UI thread (buttons - clicks). The returns from ExecuteScriptAsync should continue to be processed synchronously, i.e. they should be synchronized again with the call context. I fail here. I tried for example: private void buttonTest1_Click(object sender, EventArgs e) { MessageBox.Show(GetMathResult()); } String [...] read more
I'm building a .NET Core 3 console app with EF Core 2.2.x and EntityFrameworkCore.Jet to perform some generic reading and writing from/to an access database (mdb). I'm compiling for x86 as the docs say. Goal is to migrate lost and lots of data from a legacy system to a newer [...] read more
With work being slow I have decided to experiment and learn with Visual Basic. I have decided that it would be nice to develop and app to query my SCCM DB for Bitlocker Keys using a Computer Name as search criteria. My SQL Query works if run vis SQL Studio [...] read more
System.InvalidCastException: '[A]DefaultStockWatchPlugins.Model.EditWatchlistModel cannot be cast to [B]DefaultStockWatchPlugins.Model.EditWatchlistModel. Type A originates from 'DefaultStockWatchPlugins, Version=2020.9.8.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'P:\Code Projects\Codefarts.StockMarket\StockWatchWpfCore\bin\Debug\netcoreapp3.1\Plugins\DefaultStockWatchPlugins\DefaultStockWatchPlugins.dll'. Type B originates from 'DefaultStockWatchPlugins, Version=2020.9.8.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'P:\Code Projects\Codefarts.StockMarket\StockWatchWpfCore\bin\Debug\netcoreapp3.1\Plugins\DefaultStockWatchPlugins\DefaultStockWatchPlugins.dll'.' Never had this exception show up like this before. I mean [...] read more
TestData is System.Linq.Expressions.LogicalBinaryExpression I have convert to Expression<Func<Experience, bool>> this format its occur error Expression<Func<Experience, bool>> C1 = (Expression<Func<Experience, bool>>)TestData; Error: > System.InvalidCastException HResult=0x80004002 Message=Unable to cast object > of type 'System.Linq.Expressions.LogicalBinaryExpression' to type > 'System.Linq.Expressions.Expression1[System.Func2[CCIP.Shared.ModelsCCIP.Experience,System.Boolean]]'. > Source=CCIP.Data StackTrace: read more
I have difficult to make an out-of-process COM server work properly. My steps are 1. DEFINE IDL (CLASSIC.IDL) import "objidlbase.idl"; [ uuid(CF86E2E0-B12D-4C6A-9C5A-D7AA65101E91), ] coclass CClassic { [default] interface IClassic; } [ object, uuid(CF86E2E0-B12D-4C6A-9C5A-D7AA65101E90), pointer_default(unique) ] interface IClassic : IUnknown { HRESULT Hello(); } 2. GENERATE THE PROXY/STUB FILES midl /nologo [...] read more
Winforms-application in C#, .net 4.5.2. I wish to handle all communication with a private COM-assembly in a thread. However, I get "This operation failed because the QueryInterface call on the COM component for the interface with IID xxxx-xxx failed due to the following error: No such interface supported (Exception from [...] read more
I'm trying to get details of the graphics in an InDesign file. For technical reasons I'm using COM. Not my favourite, as (discussed elsewhere in StackOverflow) you have to spend half your life casting. In Theory (!), the code snippet belwo should work. Intellisense shows doc.AllGraphics as returning objects. The [...] read more
Trying to automate Outlook as Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook.NameSpace mapiNameSpace = myApp.GetNamespace("MAPI"); and getting following exception at second line i.e. GetNamespace > Unable to cast COM object of type > 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because > the QueryInterface call on the COM component [...] read more
I've an ASP.NET Core 3.1 project on which I want to generate the API documentation along with queryable examples using Swagger. I want to use the new System.Text.Json namespace instead of the good old Newtonsoft.Json one As stated in the Swagger documentation > If you're using System.Text.Json (STJ), then the [...] read more
I'm trying to use one of these namespaces //using Microsoft.Data.SqlClient; using System.Data.SqlClient; My model public class Get_Data_Scholar{ [Key] public Int32 ID_Transcript { get; set; } public string Year_Semester { get; set; } public string Period { get; set; } public string Status { get; set; } } My controller public [...] read more
I am working on a project in which the video file has non standard header, it is using H264 algorithm and the file is in .avi format. The problem is that file doesn't contain .avi standard header, the header is custom and i want to do the following 1. Load [...] read more
On my local machine in Visual Studio 2017, I created solution based on the .NET Core Stateless Service template, and added Microsoft.ServiceFabric.Services.Remoting.Runtime package to accept remote calls through RPC. protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners() { return this.CreateServiceRemotingInstanceListeners(); } Then I added interface ITestAccUp in a separate project: public interface ITestAccUp : [...] read more
I have the following working code taken from this answer: Option Compare Binary Option Explicit On Option Infer On Option Strict Off Imports Microsoft.Office.Interop Imports System.Collections.Generic Imports System.Runtime.InteropServices Friend Module Module1 Private Declare Function GetDesktopWindow Lib "user32" () As IntPtr Private Declare Function EnumChildWindows Lib "user32.dll" (ByVal WindowHandle As IntPtr, [...] read more
I used to use VBA to automate SAP, now I use C# with SAPFEWSELib to control SAP. I can control Buttons or TextFields but I am doing something wrong with Scrollbars and don't know what the problem is. My goal is to scroll bar but not in Table or GridView, [...] read more
I have written c# code to call ms access function. Below is the function call “CallModule” written in c# . There is a function called “fReturnRecordset” in ms access. This function returns Recordset. From c# we are able to call function successfully. But we are not able to typecast oRrecordSet [...] read more
I am trying to run a windows command-line program called msconvert inside a docker container. The authors provide a docker image and it works just fine using ´docker run´ or when connecting to the docker machine and running it from the inside. So this works when connected to a bash [...] read more
I have an Azure function app with multiple functions running within it. If multiple queries end up running at the same time, I get an InvalidCastException from deep inside of the DocumentQuery code. If I disable all but a single function (doesn't matter which), the error does not occur, leading [...] read more
I have an SSIS script task that collects extended error information. The contents of the script are as follows: /// <summary> /// ScriptMain is the entry point class of the script. Do not change the name, attributes, /// or parent of this class. /// </summary> [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute] public partial class ScriptMain [...] read more
For more than likely a very obvious reason when I try build or run my program it breaks on this function below: Public Function GetLnkTarget(lnkPath As String) As String Dim shl = New Shell32.Shell() lnkPath = System.IO.Path.GetFullPath(lnkPath) Dim dir = shl.[NameSpace](System.IO.Path.GetDirectoryName(lnkPath)) Dim itm = dir.Items().Item(System.IO.Path.GetFileName(lnkPath)) Dim lnk = DirectCast(itm.GetLink, Shell32.ShellLinkObject) [...] read more
Been searching for an answer to this but everybody seems to want to do the opposite! Using VB.NET code I want to convert all the tables in an open word doc to text but when I run the following code, I get the error > "'Microsoft.Office.Interop.Word.Table'. This operation failed because [...] read more
I have an instance of SQL Server 2008 running on a Windows 2008 server. I am able to connect to this SQL server from several machines on my network. However, I cannot connect using SQL Management Studio on the SQL Server itself. When I hit "Connect" I get this error: [...] read more
I have updated my registry so that I can edit folder comments in the Details pane. Specifically, to Computer\HKEY_CLASSES_ROOT\Directory\PreviewDetails I added prop:System.Comment; Now I can see folder comments in the Details pane. Each folder has a desktop.ini with the bare minimum to at least see Comments if added to columns [...] read more
I'm working on a UWP app using the Windows Community Toolkit. In some pages, I use the ListDetailsView (FKA MasterDetailsView) like this : <!-- page and stuff... --> <controls:ListDetailsView x:Name="ListViewParameters" ItemsSource="{x:Bind ViewModel.ParametersList, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.Selected, Mode=TwoWay}" CompactModeThresholdWidth="720" BorderBrush="Transparent" NoSelectionContent="Please select a parameter to view" ListPaneBackground="{ThemeResource SystemControlPageBackgroundChromeLowBrush}" ListPaneWidth="350" SelectionChanged="ListViewParameters_SelectionChanged"> <controls:ListDetailsView.ItemTemplate> <DataTemplate [...] read more
I'm new to c#. I have been trying on my own to fix this issue since 1 week until i've got no other alternative than to ask for help here. My goal is to create a console app which would look for Unread Mails on the secondary mailbox[mailboxB@gmail.com]/second outlook account [...] read more
I am running a Windows execuable (.exe) using wine, in a docker container and I am dumping the graphical interface using xvfb-run. The setup is working but with some fixmes and some errors which I am trying to understand what do they mean. The most common and fixme is: 002c:fixme:event:wait_for_withdrawn_state [...] read more
So what I'm trying to do is open some images in Photoshop on the press of a button. I can get PS to launch without an issue but it just sits there waiting and does not open the file I am requesting (regardless of format (.png .jpg. bmp etc)). I [...] read more
I am creating a self-signed certificate for converting IIS web-ste from http to https. Essentially, I am using the code suggested here. It works perfectly fine with Windows server 2019. However, when the same code is deployed in Windows Server 2012 R2, i am getting the error around the code [...] read more
I want to use SymGetSourceFile to get a source file from source server using info from a dump file. But the first param is a handle to process but during postmortem we dont have a process, so is it meant to be used only for live debugging tools? How can [...] read more
The error is System.InvalidCastException occurred HResult=0x80004002 Message=Unable to cast object of type 'System.String' to type 'System.Int32'. Source=<Cannot evaluate the exception source> StackTrace: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.SimpleNullableDependentKeyValueFactory 1. TryCreateFromBuffer(ValueBuffer valueBuffer, TKey& key) at Microsoft.EntityFrameworkCore.Query.Internal.WeakReferenceIdentityMap`1.CreateIncludeKeyComparer(INavigation navigation, ValueBuffer valueBuffer) I'm not sure how to troubleshoot/solve this error. Checking-on all Exception Settings doesn't break on the [...] read more
I am new here and this is my first question. I have some issues with connecting databases in general, I've only ever succeeded with local databases in Visual Studio. Background Software used for this project: * Visual Studio Enterprise 2019 * PostgreSQL 12(?) * PgAdmin4 * Google Cloud SQL (PostgreSQL [...] read more
I'm trying to add a ComboBox control to a ChartSheet. I can add one to a normal worksheet, but whenever I run the following code and use a ChartSheet I get the error under it. // Create the original worksheet Worksheet sampleGraphSheet = workbook.Worksheets.Add(After: workbook.Sheets[workbook.Sheets.Count]); // Create the graph ChartObjects [...] read more
I am making a windows forms that previews waveforms. I use AudioFileReader.Read in the following: A...When I first load the file and read through to save peak files for zoom preview B...When I calculate FFT for the whole audio C...When I draw the waveform The wav/mp3 works fine, but when [...] read more
I'm trying to follow and combine 2 example projects from Microsoft: https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-synchronizing-a-custom-task-pane-with-a-ribbon-button?view=vs-2019 and https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-displaying-custom-task-panes-with-e-mail-messages-in-outlook?view=vs-2019 I want to have a custom tab on the main outlook window (Reading Pane) (explorer?) which works. And I want to have a taskpane with buttons that modify the current reply / forward email message. I [...] read more
I want to transfer the data from dataGridView to Excel. For this, I added the "Microsoft.Office.Interop.Excel" plug-in to my project. I wrote the necessary codes properly. But when I run the project and click the "Export to Excel" button, I get an error. What should I do? This is my [...] read more
I'm very new to Sage 50 SDK and when I try to run the sample c# code sample, I get the following error message. 'Save failed: Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.PeachwServer.Application'. This operation failed because the QueryInterface call on the COM component for [...] read more
I have this problem, when I try to cast the "batch" object, I am raised exception "Invalid cast". Can you help me out with why? The vault5 object exists and is correct. public void batch(IEdmVault5 vault5) { edmVault11 = (IEdmVault11)vault5; IEdmBatchRefVars batch = default(IEdmBatchRefVars); batch = (IEdmBatchRefVars)edmVault11.CreateUtility(EdmUtility.EdmUtil_BatchRefVars); //some code } [...] read more
I am working on a simple C# asp.net Web API that is going to be used to generate Word documents. I am making use of the Microsoft.Office.Interop.Word Nuget package (v 15.0.4797.1003) in this API. I have a very basic method, shown below, which is simply attempting to open an existing [...] read more
I'm trying to port DirectShowLib for .NET Standard. I have no problem while casting Xml2Dex to IXml2Dex interface in .NET Framework 4.6.2. However, I've got InvalidCastException in .NET Core 3.1. COM IMPORT [ComImport, SuppressUnmanagedCodeSecurity, InterfaceType(ComInterfaceType.InterfaceIsDual), Guid("18C628ED-962A-11D2-8D08-00A0C9441E20")] public interface IXml2Dex { // Interface implementation.. } [ComImport, Guid("18C628EE-962A-11D2-8D08-00A0C9441E20")] public class Xml2Dex { [...] read more
Hello I'm trying to do this: I have more classes where user can store the files - path to those files is stored in JSON format in DB and files are stored in folders named as the class (so when class name is Foo then files will be stored in [...] read more
Does anybody knows how to solve the same problem in InDesign 2020 and VS 2019? Extracting InDesign CS4 Graphics using C# and COM I don't have any file tlb or the Scripting Support folder... There is my code: public void IndesignFile(){ try { Type inDesignAppType = Type.GetTypeFromProgID("InDesign.Application.2020"); InDesign.Application myInDesign (InDesign.Application)Activator.CreateInstance(inDesignAppType); [...] read more
I'm in a process of creating a demo for an audio conversion software that I create as a hobby. I wanted converting an M4A (MPEG-4) audio file to an MP3 using a simple GUI for the user to interact. I also implemented a feature that allows the user to play [...] read more
trying to attach to an IE browser.. it works for awhile then starts throwing this error... --------------------------- --------------------------- Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}' failed due to [...] read more
I have been working on a workflow to process data in order to be used by machine learning models to make predictions. For that I have a few steps in which the first run a windows .exe (https://github.com/mzdb/pwiz-mzdb) and then the others steps are : to modify the previous output [...] read more
Question: I get the following error message when opening what appear to be valid .MSG files using Outlook API to open emails: > Unable to cast COM object of type 'System.__ComObject' to interface type > 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the > QueryInterface call on the COM component for the [...] read more
seeking for help regarding on crystal report. I'm working on a project using asp.net webforms with crystal report... actually the project is working on my local testing but when I deployed it on our test server, results error shows like this "Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to [...] read more
When trying to run a test case that uses the xunit framework through Visual Studio I am currently getting the following error. System.InvalidCastException HResult=0x80004002 Message=Specified cast is not valid. Source=xunit.execution.desktop StackTrace: at Xunit.Serialization.XunitSerializationInfo.GetValue[T](String key) in C:\Dev\xunit\xunit\src\common\XunitSerializationInfo.cs:line 40 at Xunit.Sdk.XunitTestCase.Deserialize(IXunitSerializationInfo data) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\XunitTestCase.cs:line 177 ... I am the only person in [...] read more
> System.InvalidCastException: Unable to cast COM object of type > 'System.__ComObject' to interface type 'Shell32.Shell'. This operation failed > because the QueryInterface call on the COM component for the interface with > IID '{34936BA1-67AD-4C41-99B8-8C12DFF1E974}' failed due to the following > error: No such interface supported (Exception from HRESULT: 0x80004002 > [...] read more
I was told that > when adding the EF6 nuget package to a project it creates an appropriate > config file I've added the EF6 NuGet package to a project, but the App.config file is nowhere to be found. What am I doing wrong, and is the error below a [...] read more
I have a task to provide a button to stop running process and for that sake I am trying to use multithreading but it gave me exception on a certain point I don't understand how to deal with it please provide some solution. Here its code private void btngenerateNew_Click(object sender, [...] read more
I am using VS2015 for this particular project but also using VS2017 for other projects. Installed: Microsoft Azure Service Fabric SDK - 4.0.466.9590 VS Project Target framework: .NET Framework 4.6.2 VS reference System.Fabric: Runtime Version v4.0.30319 - Version 6.0.0.0 When I try to debug the application in VS2015, it turns [...] read more
I'm trying to get the value of a property via reflection, but end up getting the following exception: > System.Reflection.TargetInvocationException: 'Exception has been thrown by the > target of an invocation.' > > Inner Exception: InvalidCastException: Unable to cast COM object of type > 'System.__ComObject' to interface type > 'Microsoft.Kinect.Interop.INuiColorCameraSettings'. [...] read more
I would like to store a Microsoft.Office.Interop.Word.Table object in a T-SQL Database. And get the object again from the database to paste in a word document. Its mandatory that all the information, like tag, index, format keep consistent. On the database side I created a [Object] (varbinary(max)) byte[] field. Directly [...] read more
I'm trying to connect to the Connected Service "Authentication with Azure Active Directory" but Visual Studio throws an error when I click it. Connected Services The Connected Services component 'Azure AD Authentication' failed: (HRESULT:0x80004002) Specified cast is not valid. The error seems to be application specific as I can access [...] read more
After updating to Windows 10, C# program on VisualStudio 2017, which processes images and uses Interop.Photoshop.dll and Interop.PhotoshopTypeLibrary.dll, got following issue : "System.InvalidCastException: Unable to cast COM object of type 'Photoshop.ApplicationClass' to interface type 'Photoshop._Application'. This operation failed because the QueryInterface call on the COM component for the interface with [...] read more
I’m trying to consume a legacy COM components (dll library created probably in C++, 32 bit) in my C# application. I need to get it work in the following scenarios: 1. COM component used in x86 STA thread (e.g. main app thread) 2. COM component used in x86 worker thread [...] read more
When I try to call method of COM+ object from remote PC I get error: System.InvalidCastException HResult=0x80004002 Message=Unable to cast COM object of type 'System.__ComObject' to interface type 'System.EnterpriseServices.IRemoteDispatch'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6619A740-8154-43BE-A186-0319578E02DB}' failed due to the [...] read more
PROBLEM I'm trying to introduce a strongly typed ID in one of my entities. To do so, I followed the instructions on https://andrewlock.net/using-strongly-typed-entity-ids-to-avoid-primitive-obsession-part-3/ The only difference to the instructions above is, that I'm trying to persist my ID as a string instead of a Guid. A short summary of the [...] read more
I'm playing with Azure Service Fabric and a console app. I simply want my console app to connect to the cluster and do some stuff. The console app try to resolve the service address with the following: static void Main(string[] args) { ServicePartitionResolver resolver = null; try { resolver = [...] read more
My laptop died so I restored my code to my desktop. I use Xamarin for VS 2017. When I compile I get a "java exited with code 1" error, the logs contain the following: Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished Xamarin|Information|0|Xamarin - 4.12.3.83-d15-9+23fa80172 Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter Xamarin.VisualStudio.TastyPackage|Information|0|Initialization [...] read more
How can I implement the authorization through token and roles, in WEB API C #, SOAP architecture, through the use of repositories with stored procedures and dependency injection? public override void OnAuthorization(HttpActionContext actionContext) { if (actionContext.Request.Headers.Authorization == null) { actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.Unauthorized); } else { string autenticationToken = actionContext.Request.Headers.Authorization.Parameter; string [...] read more
I am experimenting with ASP.NET WebForms and data. I am able to post data to the page using a small code snipped in the ASPX, but I cannot get the buttons for deleting, editing, and viewing individual records to work. I believe this is because I cannot add runat="server"when I [...] read more
I'm trying to deploy the example app in this tutorial: https://docs.microsoft.com/en-us/xamarin/get-started/first-app/?pivots=win-vs2017 However, I'm unable to get the debugger to work for it. I followed all the steps precisely but nothing seems to work. Here's the log output: > Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter > Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished > Xamarin|Information|0|Xamarin - 4.12.3.83-d15-9+23fa80172 [...] read more
The prototype of ITaskHandler::Start is the following: HRESULT ( STDMETHODCALLTYPE Start )( __RPC__in ITaskHandler * This, /* [in] */ __RPC__in_opt IUnknown *pHandlerServices, /* [in] */ __RPC__in BSTR data) How come pHandlerServices is optional - and if I get a NULL (as it's my case) - how can I notify the [...] read more
I am working on the existing project. Here is a exe file, when user open it, it get the config from the same directory will auto downloading the latest files(assets) from server to the current directory. I don't know how the exe run, maybe it just run git pull or [...] read more
We have the issue with Gremlin query on Azure Cosmos DB The query works in Gremlin Console on TinkerPop but Cosmos DB is complaining about it. It seems to be an issue with the last group().by(...) step Not sure if this is a bug or there is some workaround specific [...] read more
I have registered COM Class and interface written in .NET 2.0 . Now i am looking for a way to pass Bitmap object from WindowsForms .Net 4.5 application into COM component. When i try to do this code: Type type = Type.GetTypeFromCLSID(clsid); source = (IBaseFilter) Activator.CreateInstance(type); public void SetBitmap(Bitmap input) [...] read more
We have an application that either runs some COM hosting in the main thread or in a different thread (async), and we would like to connect to this (connectable) object by using the standard ConnectionPoint interfaces in order to get its events. Up to Windows 10 SP 1903, it did [...] read more
I want to call click event of a button from a web page by using my client c# code. I can see the element as after doing F12 on the page as: <button class="btn btn-primary form-control btn-block" type="button" ng-click="tranCtrl.retrieveTransactionsList('Go')" ng-disabled="tranCtrl.isLoading"> Go </button> My code works for all the input type [...] read more
I am trying to populate an excel file with some data from a SQL server, my code is as follows, public static void SQLToExcel(Excel.Workbook xlWorkBook, string SQL, string tFORMAT) { string connectionString = ConfigurationManager.ConnectionStrings["ANSICConnection"].ConnectionString; SqlConnection conn; conn = new SqlConnection(connectionString); conn.Open(); using (SqlCommand cmd = new SqlCommand(SQL, conn)) { SqlDataReader [...] read more
Good day, I have a Windbg script that iterates around the frames of a stack using a .do loop. For each frame it uses !for_each_local and $spat ("@#Local","foo") to match for things I'm interested in getting an initial look at. I then use dx @$t2 = to assign and finally [...] read more
I have a ListView that displays TitleName from Title table\entity. Upon ListView_OnSelectionChanged, I can Linq query and display a TitlesDetails Panel, and make visible another panel for edit and delete. But I can only delete one item. I've google and tried all I could till frustrated and backed off for [...] read more
I have a DLL which is consumed by a 3rd party Application. I am trying to run a long running Task as Async which is failing due to error:- > "Unable to cast COM object of type 'System.__ComObject' to interface type > 'IMSRelation.IJAssocRelation'. This operation failed because the > QueryInterface [...] read more
If I try to install Microsoft Office 365 using Wine 6.9 and Ubuntu 20.10. I downloaded the OfficeSetup.exe on a Windows computer, copied it to my Linux computer and run wine OfficeSetup.exe. After that, a window appeared where it said: > Office > > We are finished in a few [...] read more
Code: object obj = new List<object>() { "a", "b" }; List<string> list = (List<string>)obj; Exception: System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Collections.Generic.List`1[System.Object]' to type 'System.Collections.Generic.List`1[System.String]'. Source=ConsoleApp2 StackTrace: at ConsoleApp2.Program.Main(String[] args) in C:\Users\guoswang\source\repos\ConsoleApp2\ConsoleApp2\Program.cs:line 12 I know how to avoid this, but want to understand the root cause. Cast exception read more
I am trying to read a value from a nested Json object, but I am getting a Parse error: My Json object: { "MessageId": "f6774927-37cf-4608-b985-14a7d86a38f9", "Time": "2017-04-06T16:28:38.0719933+02:00", "Data": { "ID": { "value": "0008044834" }, "Carrier": { "value": 0 }, "Tool": { "value": 0 } } } var myJsonString = File.ReadAllText(_currentDictory.FullName [...] read more
I have a workbook with multiple sheets and I was trying to iterate through them but it's causing me problems. The code below throws the error: > Microsoft.Office.Tools.Excel.Worksheet'. This operation failed because the > QueryInterface call on the COM component for the interface with IID > '{297DC8D9-EABD-45A1-BDEF-68AB67E5C3C3}' failed due to [...] read more
During a deployment of an update to our Web Service that QuickBooks Web Connector calls, we are not having a bunch of issues related to the Interop.QBFC13.IQBSessionManager. Note our code all works in development environment and has worked in the past on our production server. We are running on a [...] read more
enter image description here [https://i.stack.imgur.com/Lalss.jpg] enter image description here [https://i.stack.imgur.com/Njsop.jpg]When I am a casting below code then i got an error Code : string subject = ((Microsoft.Office.Interop.Outlook.MailItem)myInbox.Items[temp]) .Subject.ToString(); > Unable to cast COM object of type 'System.__ComObject' to interface type > 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the > QueryInterface call [...] read more
I am trying to interface with a SAP gui window using c#. Using this solution here: solution, I have successfully connected to my open GUI window. I can send the command frame.Maximize(); which will maximize the window, as expected. Trouble comes when I attempt to put some text into a [...] read more
Hey all I have the following code thats throwing Late bindings. enter image description here [https://i.stack.imgur.com/oNhTR.png] I thought putting: Dim excelWS As Worksheet excelWS = New Worksheet Before using the variable corrected the late binding issue? UPDATE 1 Would it be something like this? Dim excelRange As Range Dim excelApp [...] read more