cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1118
Views
0
Helpful
3
Replies

c#: "new VpnApiClass()" get COM Exception 800701e7 till reboot

ferdinandm18
Level 1
Level 1

AnyConnect API.

Often  new VpnApiClass() throws "Retrieving the COM class factory for component with CLSID {C15C0F4F-DDFB-4591-AD53-C9A71C9C15C0} failed due to the following error: 800701e7.".

vpnui.exe is not running.

Application restart does not help.

In this case just a reboot helps.

It happens also in a small program that does almost nothing else beside 'new VpnApiClass()'.

Data: C#, .NET2.0 project on Windows 8.1, 64 bit.

 

How can this be solved?

Thank you, Ferdinand

3 Replies 3

ferdinandm18
Level 1
Level 1

The underlying cause is a rock-hard exception, the equivalent of an AccessViolationException. It occurs at a very critical time, just as the native DLL gets loaded and its DllMain() entrypoint runs. You can see it in the Output window if you enable unmanaged debugging. There isn't anything you can look at or do about if you don't have source code. Cisco has source code, you'll need to call them. –  Hans Passant

Workaround

Inspired by another bug regarding a similar issue here, we found a workaround. The DLL seems to have a fixed load address. When I load the DLL using LoadLibrary() right at program start, this address is free and new VpnApiClass() works.

hi, i've the same problem..

when i inizialize vpnApi it work but when im going to use the connectvpn(sitename) i catch the same error and it doesnt work untill reboot..

did u load dll at program start with loadlibray in this mood?

NativeMethods.LoadLibrary(@"vpnapi.dll");

thank you

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: