Click to See Complete Forum and Search --> : Visual Basic as a service problem


kuhns_m
October 9th, 2001, 02:27 PM
I have a Visual Basic app that I made a service. This VB app calls a com object. I used instsvc.exe and srvany.exe to install the service and the service starts and works fine, except when it needs to call the com object. When it calls this com object I get the error "Method '~' of object '~' Failed. When I run this application as a stand-alone, It works fine and if this method fails It gives me clearer error message like "Method methodName or object Iinterface Failed". Maybe the service needs permissions for this COM object?
Thanks in Advance
Matt K

Cimperiali
October 10th, 2001, 06:34 AM
"Method '~' of object '~' Failed"
You usually receive this message when trying to call unregistered activex.
To call from remote, you should generate a *.VBR file (setting in project properties "Remote component") and add this to a client setup. If you're using Com, you need DCOM98 (in win 98 or DCOM95 on win 95) installed and configured on clients machines. If server is a winnt or 2000 OS, you will need to give permissions to clients users on your components. About this last thing, I was able to do it only giving users an Admin priviliege on the server machine (maybe this last was a bug at that time...)
Hope this may help.


Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater