Windows error 0x80070006, -2147024890

Detailed Error Information

E_HANDLE[1]

MessageInvalid handle
Declared inwinerror.h

INVALID_HANDLE[1]

MessageThe handle is invalid.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode7 (0x007)
NameFACILITY_WIN32[2][1]
DescriptionThis region is reserved to map undecorated error codes into HRESULTs.[2][1]
Error Code6 (0x0006)

This is a Win32 error which has been mapped into an HRESULT. More information may be available in error 0x00000006.

Questions

71votes
3answers

Windows 7: unable to register DLL - Error Code:0X80004005

When I tried to register a COM DLL, regsvr32 rpcrt4.dll I get the following error message: `The module "c:\windows\system 32\"rpcrt4.dll" was loaded but the call to DllRegisterServer failed with error code 0X80070006. How do I fix this problem? Please help. read more
windows-7
regsvr32
34votes
4answers

Indexing .PDF, .XLS, .DOC, .PPT using Lucene.NET

I've heard of Lucene.Net and I've heard of Apache Tika. The question is - how do I index these documents using C# vs Java? I think the issue is that there is no .Net equivalent of Tika which extracts relevant text from these document types. UPDATE - Feb 05 2011 [...] read more
.net
asp.net
lucene
solr
lucene.net
31votes
3answers

What is error code is 0x80070001? And how can I solve it?

I'm getting this error on my web service: > An error occurred while communicating with the remote host. The error code is > 0x80070001 The weird thing is that the CPU and memory usage on the server is not high. The detailed error message: Error Message: > An error occurred [...] read more
asp.net
web-services
iis
24votes
4answers

Converting a JPEG image to a byte array - COM exception

Using C#, I'm trying to load a JPEG file from disk and convert it to a byte array. So far, I have this code: static void Main(string[] args) { System.Windows.Media.Imaging.BitmapFrame bitmapFrame; using (var fs = new System.IO.FileStream(@"C:\Lenna.jpg", FileMode.Open)) { bitmapFrame = BitmapFrame.Create(fs); } System.Windows.Media.Imaging.BitmapEncoder encoder = new System.Windows.Media.Imaging.JpegBitmapEncoder(); encoder.Frames.Add(bitmapFrame); byte[] [...] read more
c#
wpf
image
com
file-io
22votes
6answers

The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

I have a website in an IIS 7 shared hosting environment. It's running .NET 3.5. I have a download button to download a file from the server. When I locally deploy this application to IIS 6, it runs fine. On the IIS 7 shared hosting server, the exception occurs. > [...] read more
c#
asp.net
iis-7
shared-hosting
httpexception
14votes
4answers

"Handle is invalid" error when opening SqlConnection

This error has started occurring sporadically and inexplicably, particularly when connecting to our session state database. Here's the error: Exception type: COMException Exception message: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& [...] read more
c#
asp.net
.net
sql-server
7votes
3answers

Windows Update error 0x80070006

I've noticed that my Windows 10 is no longer updating itself. When I run the Settings app and issue an update command, this message appears. > There were some problems installing updates, but we'll try again later. If you > keep seeing this and want to search the web or [...] read more
windows-10
windows-update
windows-10-v1607
6votes
1answer

SignalR Error while closing the websocket - Invalid Handle

This SignalR problem occurs: > Error while closing the websocket: System.Net.WebSockets.WebSocketException > (0x80070006): The handle is invalid I think that the problem is linked to this code: var currentHub = GlobalHost.ConnectionManager.GetHubContext<HubManager>(); currentHub.Groups.Remove(userConnectionId, roomName); How can it be fixed? read more
c#
exception
websocket
signalr
5votes
7answers

BadImageFormatException encountered with WcfSvcHost and IIS WCF host

Creating a WCF Service Library in Visual Studio 2008 on Vista x64 is troublesome when referencing an x86 DLL. A service that calls a 32-bit DLL is required to have a platform target of x86 to run on a 64-bit OS. When you do this, the WcfSvcHost throws a BadImageFormatException [...] read more
c++
wcf
interop
iis-6
was
5votes
1answer

Pass credentials from one wcf service to another wcf service

I have 2 wcf services both hosted on IIS on the same machine. Service A is called by a client and uses BasicHttpBinding with transport security and NTLM credentialtype. Service A needs to call service B which is also hosted on IIS but uses WsHttpBinding with transport security and NTLM [...] read more
wcf-security
impersonation
5votes
1answer

C# Com Interop with Windows Media Player Visualisation (With Sample Code)

I am attempting to create a Windows Media Player (WMP) Visualization plugin in C#. I am quite new to exposing C# to COM and may have missed something basic. I have persisted with this for 3 days (about 20 hours) and not got past the single issue I will describe [...] read more
c#
com
interop
visualization
media-player
4votes
1answer

C# COM Server to C# COM Client using CoCreateInstance

I need to create a C# COM server, and a C# COM Client, and communicate between the two using CoCreateInstance. This is so that the client can be 64 bit, and the server 32 bit, using the 'DllSurrogate' method described in Hosting a .NET DLL as an Out-Of-Process COM Server [...] read more
c#
.net
dll
com
3votes
2answers

Getting metadata from an image c#

I am trying to import an image into my WPF application and upon clicking the save button save the image and its metadata to a different location. I currently have: BitmapCreateOptions createOptions = BitmapCreateOptions.PreservePixelFormat | BitmapCreateOptions.IgnoreColorProfile; BitmapMetadata importedMetaData = new BitmapMetadata("jpg"); using (Stream sourceStream = File.Open(fileName, FileMode.Open, FileAccess.Read)) { BitmapDecoder [...] read more
c#
multithreading
metadata
3votes
1answer

Do I need to release an IntPtr inside a callback?

I'm Marshalling data across C/C# boundary. I have the following structure: [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Message { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string From; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string Subject; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Body; } The callback is defined as follows: [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void [...] read more
c#
memory-leaks
marshalling
intptr
3votes
2answers

Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ asp.net vs2010

Yesterday my project was running smoothly but today I'm facing an error. Here are the details: > Could not load file or assembly > 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET > Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or > one of its dependencies. The handle is invalid. (Exception from HRESULT: > 0x80070006 (E_HANDLE)) Description: An unhandled exception occurred during [...] read more
asp.net
.net-assembly
.net-framework-version
3votes
0answers

Web Management Service failing at random

so we have a custom deploy script that looks similar to this msdeploy.exe ^ -source:manifest='path_to_manifest' ^ -dest:auto,ComputerName="https://host:port/msdeploy.axd?site=sitename",UserName='domain\user',Password='muhpass',IncludeAcls='False',AuthType='Basic' ^ -verb:sync ^ -enableRule:DoNotDeleteRule ^ -disableLink:AppPoolExtension ^ -disableLink:ContentExtension ^ -disableLink:CertificateExtension ^ -setParamFile:"path_to_the_file" ^ -allowUntrusted ^ -useChecksum ^ -retryAttempts=2 ^ -preSync:runCommand="path_to_script",waitInterval=60000 ^ -postSync:runCommand="path_to_script",waitInterval=60000 I have removed some of the values, but you can probably [...] read more
.net
iis
iis-7.5
windows-server-2008
msdeploy
3votes
1answer

FilePathResult with network path throws COMException (The handle is invalid)

I am using the FilePathResult like so: return new FilePathResult(path, "text/xml"); My path is a path elsewhere on our network. This results in a server error. When I check the event log on the server I can see this error entry: TransmitFile failed. File Name: \\our\path\to\the\file\filename.dfxp, HRESULT: 0x80070005 At the [...] read more
asp.net-mvc
exception
networking
comexception
3votes
1answer

Random COMException on Web App "The handle is invalid"

All of a sudden, I am consistently getting a weird COMException on this machine when I try serve a web app with IIS. I never used to have any problems with this. Stack Trace: [COMException (0x80070006): The handle is invalid. (0x80070006 (E_HANDLE))] [FileLoadException] System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +0 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 [...] read more
windows-xp
asp.net-3.5
iis-5
web-applications
comexception
2votes
2answers

How to Resolve Server Error in '/' Application (Configuration Error)

My web application was working perfectly minutes ago now I get this error when I run it. How can I solve this issue since its not even part of my project files? > Description: An error occurred during the processing of a configuration file > required to service this request. [...] read more
c#
visual-studio-2012
web-config
2votes
0answers

Windows.Networking.Vpn.VpnNativeProfile.get_ConnectionStatus() handle is invalid error

I'm working on an application that will automatically create and connect a VPN profile for the user using the Windows VPN API, but get a meaningless error from Windows when trying to inspect its connection status. I'm certain that the profile is created correctly prior to this (I can connect [...] read more
windows
uwp
vpn
2votes
3answers

Returning an MVC FileContentResult to download .pdf file from

Hi I've search around for this quite a bit but I didn't find a situation that really resembled mine..hope I didn't miss a duplicate somewhere The Goal: Return a file from a UNC share to the client as a download/open option. Info: The share is located on a different server [...] read more
ajax
asp.net-mvc
json
2votes
2answers

JpegBitmapEncoder.Save() throws exception when writing image with metadata

I'm building a WPF desktop app to help me organize photos to post to Facebook. Here's my code for creating a copy of a photo at a new location with a caption (EXIF + IPTC + XMP) added: private void SaveImageAs(string currPath, string newPath, bool setCaption = false, string captionToSet [...] read more
c#
wpf
metadata
exif
iptc
2votes
0answers

FileLoadException when accessing WCF service

After publishing to production server we receive this error from time to time after application is restarted. To fix it our administrator is restarting app and it works again. We have no idea what is going on. What can I check? Edit: In this same application we have asmx webservices [...] read more
c#
asp.net
wcf
2votes
1answer

WiX 3.6 Burn bootstrapper fails to elevate

I'm somewhat new to the world of WiX, so it's very possible I've missed something very obvious. I've installed WiX 3.6 beta, and grabbed the source as well to work from (and adjusted it to use the WiX 3.6 installed binaries), but I'm having problems with the bootstrapper. I can [...] read more
wix
burn
1vote
3answers

Windows defender gives error message on windows startup

When I first start up windows, I get this error message every time: > Application failed to initialize: 0x80070006. The handle is invalid. enter image description here [https://i.stack.imgur.com/4MCmh.jpg] Anyone got any ideas what might be causing it, or ideas of things to try? read more
windows-vista
windows-defender
1vote
1answer

Windows could not search for new updates - Error Code 8024402F / 80072EFE

I've recently started experiencing some issues with a couple of workstations on my network getting the above-mentioned errors when trying to check for and download updates for Windows 7 (x64). Sometimes I get the 8024402F error, and sometimes I get the 80072EFE error. I've attempted to resolve the problem myself [...] read more
windows-7
windows-update
1vote
1answer

win10IoT - UWP (vb.net) - handle is invalid

I have a little problem with my UWP app, I try to turn on an LED, the INIT function works (the LED comes on when the GPIO is booted), however when I click on the ON or OFF button j have the following error: > System.runtime.interopservices.comexception (0x80070006) The handle is [...] read more
vb.net
windows-10-iot-core
1vote
1answer

WiX 3.11.1 Burn bootstrapper fails to elevate

We have a setup built with WiX 3.11.1 and if that exe is not launched with elevated privileges (aka "Run as Administrator"), then we are trying to trigger a new process programmatically with verb as "runas" and filename as the location from where the main exe was launched (C:\Users\loggedin_username\AppData\Local\Temp{GUID}.cr\setup_name.exe) But [...] read more
installation
wix
windows-10
windows-installer
wix3.11
1vote
1answer

Operand types are incompatible inside enum {...} - Compiler error in definition of variable?

Code: (running on CANoe 8.5.98 32bit) /*@!Encoding:1252*/ includes { } variables { /* Windows HRESULT error type enum. */ enum HRESULT_Types { S_OK /* Operation successful */ = 0x00000000, S_FALSE /* No error occured, oper. unsuccessful */ = 0x00000001, E_NOTIMPL /* Not implemented */ = 0x80004001, E_NOINTERFACE /* No such [...] read more
enums
capl
canoe
1vote
1answer

Sitecore Commerce Server was unable to log an event

I am trying to install Sitecore Commerce Server 11.3 + Sitecore 8.1. I am following all steps from dev.sitecore.net. When I install it on Windows 10, everything is ok, I am able to connect Sitecore with Commerce server. But when I do same steps on Windows 2008 R2 Commerce Server [...] read more
com
sitecore
dcom
commerce
sitecore-commerce-server
1vote
0answers

Lucene on windows server 2012

We've migrated 2 completely different sites that run Umbraco (6.1.5 and 6.1.2) to a new dedicated server that runs Windows Server 2012. We're having a very weird behavior when we start publishing new contents. After some time (but not always) the site simply stops working with this error: Http Error [...] read more
umbraco
lucene.net
examine
windows2012
1vote
2answers

An unhandled exception occurred during the execution of the current web request

suddenly when i run my web application i get this error : > Could not load file or assembly > 'file:///C:\Users\rafael\AppData\Local\Temp\Temporary ASP.NET > Files\root\284bddf3\431c8965\App_Web_homepage.aspx.cdcab7d2.vmizb1js.dll' or > one of its dependencies. The handle is invalid. (Exception from HRESULT: > 0x80070006 (E_HANDLE)) Here's the stack trace: FileLoadException: Could not load file or [...] read more
c#
asp.net
exception-handling
hresult
1vote
2answers

Trying to debug VS2010 C# code that uses IBM WMQ (amqmdnet.dll)

I'm using IMB WMQ library to connect to a queue manager. This is a code I use for a long time, it was created by a friend in VS2005 and I updated to be used in VS2010. It works fine when I use integrated with LoadRunner tool to run some [...] read more
c#
.net
ibm-mq
1vote
1answer

Enumeration values for FaxJob.SetStatus method

Using Windows Fax Service, I am trying to cancel a fax from the Windows Fax Console. According to this worthless documentation I need to pass in a value JC_Delete which appears that it is some enumeration, however, the documentation fails to leave out what it is or how to get [...] read more
c#
com
1vote
1answer

C# - COMException was unhandled

I am developing an application where I get information about users from Active Directory. I go through each user and get its information. I have a lot of users in the AD and when I run the application at first it works just fine, but when it comes to the [...] read more
c#
active-directory
0votes
0answers

Getting hwnd for uxtheme.dll DrawThemeParentBackground from a Graphics object

I am dealing with some old drawing code used to draw parts of styled system controls in a WinFroms app. One of the core routines that does this work looks like the following: private bool DrawTheme(Graphics graphics, XPThemeClasses themeClass, int themePart, int themeState, int x, int y, int width, int [...] read more
.net
winforms
gdi+
visual-styles
0votes
1answer

Allocate memory in a C++ dll, free in C#

I am new in C# and trying to communicate C# with C++ dll. My main purpose is allocating memory in C# using Marshal.AllocHGlobal(), assign values in it and pass the reference of IntPtr to C++ dll. On the side of C++ dll, I'm changing the allocated memory size with malloc(), [...] read more
c#
c++
memory-management
0votes
1answer

MSDTC Error - Call to RpcMgmtInqServerPrincName failed. The partner does not support secure calls

I'm trying to get MSDTC and SQL Server to work together on Windows 10 Pro. I started the Distributed Transaction Coordinator service and it is using the Network Service account. Whenever I begin a distributed transaction in SQL Server I get the following error: Msg 8501, Level 16, State 3, [...] read more
sql-server
distributed-transactions
msdtc
0votes
0answers

OpenTK GetActiveUniform handle is invalid

I'm trying to get all uniforms whithin a GLSL program, but GL.GetActiveUniform is throwing an error : > {System.Runtime.InteropServices.COMException (0x80070006): The handle is > invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) at > System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 > errorCode, IntPtr errorInfo) at > System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at > System.Runtime.InteropServices.Marshal.FreeHGlobal(IntPtr hglobal) at > OpenTK.Graphics.OpenGL.GL.GetActiveUniform(UInt32 program, UInt32 [...] read more
c#
glsl
opentk
0votes
0answers

How to change Bitlocker password in windows using script?

I am writing a script to change the bitlocker password in windows. I have found that "manage-bde -changepassword C:" can be executed to change the password for then bitlocker. If run in command prompt it will ask the user to enter the password and confirm the password. It worked well [...] read more
python
powershell
vbscript
0votes
1answer

Visual Studio 2012 throwing error while building website

I am getting the errors below while building an ASP.NET website in Visual Studio 2012 over and over again. These errors are very random and sometimes I'm able to run the site after many attempts. > 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET > Files\fccrcissues\94bcbaf1\224612b9\CSC7282803B8D0F44FBA57E415444603873.TMP' > is not a valid Win32 resource file > > [...] read more
asp.net
visual-studio
visual-studio-2012
hresult
0votes
0answers

The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) and Compiler Error Message: CS1583

I am debugging the web application on browser as application built in .Net framework with Knockout.js, MVC 4.5. Below two issues are occurring in order on my machine as First: * The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) Screen Shot for handle error and on refreshing browser again [...] read more
c#
asp.net
.net
asp.net-mvc
knockout.js
0votes
1answer

Remote file is not getting accessed if path comes from web.config

In web.config, <add key="Uploads" value="\\\\192.19.165.115\\image_dir\\"/> C# code: uploadsPath = (ConfigurationManager.AppSettings["Uploads"].ToString()); Its returning file with below statement return File("\\\\192.19.165.115\\image_dir\\" + name, System.Net.Mime.MediaTypeNames.Application.Octet, name); But, it is throwing below error with this line of code. return File(uploadsPath + name, System.Net.Mime.MediaTypeNames.Application.Octet, name); Error: [COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 [...] read more
c#
0votes
1answer

The handle is invalid when loading file or assembly AjaxControlToolkit

I'm having one error repeatedly. The site is on ASP.NET 2.0 web form. There is no pattern to reproduce this error again because it occurs sometimes and it resolve by adding blank space at end of the in web.config. What could be the problem? > Server Error in '/' Application. [...] read more
c#
asp.net
0votes
0answers

How can I read a 32-bit TIFF file in C#?

I am trying to load a 32-bit TIFF and read the RGBA values of the pixels. I have tried using LibTiff.Net, however I get this error when attempting to load it: "Sorry, can not handle images with 32-bit samples" Does anyone know of a way to accomplish this in C#? [...] read more
c#
arcgis
rgba
libtiff.net
0votes
0answers

c++-cli CreateBitmapSourceFromMemorySection

I am trying to create Bitmap^ from unsigned char* databuffer. I need to do this very effective - this function called many times each second and GUI updated after it runs. My code is : unsigned char* databuffer = new unsigned char[_size]; System::IntPtr _intptr = System::IntPtr(databuffer); System::Windows::Media::Imaging::BitmapSource^ b = System::Windows::Interop::Imaging::CreateBitmapSourceFromMemorySection(_intptr, [...] read more
bitmap
c++-cli
bitmapsource
0votes
0answers

COMException Exception message: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

I deploy a web application in Production Server. In Production we are using Windows Server 2012, IIS 8.5. Deploying the application was successful but I got the error after 2-3 hours or 1 day from deploying the web application. The exception is given below **Exception information:** **Exception type**: COMException **Exception [...] read more
iis
0votes
2answers

Configuration error while loading the project from localhost

Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load file or assembly 'System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The [...] read more
c#
.net
0votes
1answer

DirectInput SetDataFormat error

I want to write a program interacting with joystick. I am using a standard SDK example and dinput8.lib. Here's the code. GUID Is taken from enumJoysticksCallback function. I throw away everything to minimise chance of error. LPDIRECTINPUT8 g_pDI = NULL; LPDIRECTINPUTDEVICE8 g_pJoystick = NULL; HRESULT hr = DirectInput8Create ( GetModuleHandle( [...] read more
directinput
0votes
0answers

Custom ASP.net webservice in Sharepoint

I have created one asp.net custom webservice in sharepoint 2010 using VS, i have deployed it under _layout folder of sharepoint. Everything works fine. Now i want this service to be exposed for cross domain, so any one can use it or call it also i want to be called [...] read more
asp.net
sharepoint
sharepoint-2010
asmx
0votes
1answer

Role based authorization in asp.net mvc3

Hi am new ASP.NET MVC. Currently am learning MVCmusicstore tutorial from asp.net official website.But Iam getting error while executing the project after implementing role based authorization in it.The stack trace is given below.Please advice Stack Trace: [FileLoadException: Could not load file or assembly 'System.Runtime.DurableInstancing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of [...] read more
asp.net-mvc
authorization
0votes
1answer

Unable to get console input mode - 0x80070006

I am working on bitsadmin for downloading the files in the network. I created process for running bitsadmin job creation, addjob, resume, etc. Application works fine with windows 7 but when i run my exe on xp machine bits give exception as > BITSADMIN version 2.0 [ 6.6.2600.2180 ] > [...] read more
c#
handle
microsoft-bits
0votes
1answer

Imail Server Express 11.5 Server APi for .Net : Unable to load DLL 'IMailsec.dll': The handle is invalid

I am writing a custom application for IMAIl express 11.5 using IMAIl Server API for .Net I am using the following code: Dim DomData As New DomainData() DomData.Aliases = "TestALias" DomData.HostName = "TestImailDomain.com" DomData.TopDir = IMailAPI_NET.IMailSystem.TopDir & "\TestImailDomain.com" DomData.UserDBType = DomainData.DBTYPES.IMail DomData.UserDB = "TestUserDB" DomData.IPAddress = "192.168.1.12" DomData.IMEnabled = True [...] read more
.net
vb.net
api
dns
-1votes
1answer

Unlock bitlocker drive from java via cmd

I am trying to unlock a drive secured by bitlocker from Java. As far as I know there are no libs which can help me to handle that, so I was trying it through cmd. Here's the code: public static boolean unlockDisk(String pwd) throws IOException { String[] script = { [...] read more
java
windows
command-line

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0