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.as mx.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