473,396 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Unable to instantiate COM Interop from .NET Web Service

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

Mar 5 '07 #1
2 4727
"RonS" <ro*********@eds.comwrote in message
news:11**********************@t69g2000cwt.googlegr oups.com...
>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.
Is AFMCCloseMgr.ComplCloseMgr a class or an interface? Look in Object
Browser and find out.

John
Mar 5 '07 #2
On Mar 5, 3:07 pm, "John Saunders" <john.saunders at trizetto.com>
wrote:
"RonS" <ron.simm...@eds.comwrote in message

news:11**********************@t69g2000cwt.googlegr oups.com...
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/lib...996450.aspxbut 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.

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

John
It is a class...

Mar 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
1
by: AP | last post by:
Hi, I'm trying to use c# to pop up a dialog box when a user attempts to close word to prompt them if they want to exit or cancel (obviously other stuff needs to happen based on their selection...
2
by: Joris Dobbelsteen | last post by:
Is it possible to make a Windows Service that has a COM interop. I want to synchronize my database and ISA server blocklist. The application is quite simple and should do the trick, provided I...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
2
by: letibal | last post by:
Hello, I have written a windows service and created an installer for it. The service runs under the system accounts. When started, it launches a GUI. By default, the InteractiveProcess property...
3
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net...
0
by: Pieter | last post by:
Hi, I'm using NHibernate 1.2 (CR1), and I'm using a custom list (inherited from BindingList(Of T) ) for all my lists. The NHibernate documentation told me that I had to implement...
4
by: Jon Davis | last post by:
Newbie to WCF here. I am getting the error "unable to open its IChannelListener", but the service is running as an admin, and on a different port from anything else. If it matters, I'm trying to...
0
by: mrdanny2007 | last post by:
I have a DLL or assembly that I created in .NET that calls a webservice. I registered this as a COM Interop using regasm. I then opended the registry to check the objects and saw that one of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.