Groups | Blog | Home
all groups > dotnet web services > march 2007 >

dotnet web services : Unable to instantiate COM Interop from .NET Web Service


RonS
3/5/2007 2:04:45 PM
I am attempting to use a COM Interop inside my .NET Web Service. This
same COM Interop works just fine in a VB.NET application. I've
followed the guidance given in
http://msdn2.microsoft.com/en-us/library/ms996450.aspx but to no
avail. When I execute the web method that instantiates the COM
Interop, I receive the following error:

System.Runtime.InteropServices.COMException (0x800A005B): Object
variable or With block variable not set
at AFMCloseMgrService.AFMCCloseMgrService.Test() in c:\inetpub
\wwwroot\AFMCloseMgrService\AFMCCloseMgrService.asmx.vb:line 48


The snippet of code that causes me the problem looks like this:
Public Function Test() As String
Try
Dim oAFMCCloseMgr As AFMCCloseMgr.ComplCloseMgr
oAFMCCloseMgr = New AFMCCloseMgr.ComplCloseMgr
Catch ex As Exception
Throw ex
End Try

End Function

Granted it doesn't do anything more than instantiate the COM Interop
(for now), but since I couldn't get this to work, I took out the meat
of the method for demonstration purposes.

I do not know how to resolve this and would appreciate any guidance.

Thank you in advance,

Ron Simmons
Electronic Data Systems
RonS
3/5/2007 4:23:44 PM
On Mar 5, 3:07 pm, "John Saunders" <john.saunders at trizetto.com>
[quoted text, click to view]

It is a class...
John Saunders
3/5/2007 6:07:25 PM
[quoted text, click to view]

Is AFMCCloseMgr.ComplCloseMgr a class or an interface? Look in Object
Browser and find out.

John

AddThis Social Bookmark Button