Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / August 2006

Tip: Looking for answers? Try searching our database.

vb6 nt service dot net interop error 429

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stevenb - 10 Aug 2006 17:20 GMT
Greetings...

I currently have a vb6 application running as an NT service.  I am
referencing a dot net dll and all works fine if I run the vb6
application as a normal executable.  As soon as I try to run it as a
service, I get runtime error 429 activex component cannot create
object.

The method I am using to run the vb6 app as a service is through
Ntsvc.ocx.

my code is similar to:

dim myobj as someDotNetInterop.InteropClass
set myobj = new someDotNetInterop.InteropClass

The error is thrown when I try to set.

Basically, I cannot figure out why I cannot instantiate the object when
I am running the app as as service, but It works fine when I run it as
a normal application.

Any insight is greatly appreciated!
TDC - 11 Aug 2006 12:56 GMT
Are you running them both on the same machine?

If you are, then there are two possible reasons.  Threading (and this
covers a broad set of territory) and permissions.

Unfortunately, I don't have any experience with Ntsvc.ocx.  If you are
moving to .NET, why don't you use the .NET Service support instead of
an ocx?

Tom

> Greetings...
>
[quoted text clipped - 19 lines]
>
> Any insight is greatly appreciated!
stevenb - 11 Aug 2006 18:17 GMT
I have a program called server.exe which is linked to a service.  The
service runs server.exe.  Server.exe references a vb.net dll via com
interop.

If the service is stopped and I just double click on server.exe, I
check my log files and see that it is able to dim and set the vb.net
class referenced in the dll.  Basically, it can create the object.

If I start the service, my log files show that the program cannot set
the vb.net object and I get error 429... activex component cannot
create object.

I hope that makes sense...

I don't think threading is an issue because I am not trying to start
the service and manually run the program at the same time.  Permissions
may be an issue and I am looking in to that, although I haven't had any
luck yet.  .NET service support would be great, except that this is a
legacy app and would require a complete rewrite, which would take a
very long time.

Some additional information... I was able to get everything working on
my development PC, which further leads me towards security as the
culprit.  I am continuing to test but if anyone can provide additional
assitance I would greatly appreciate it!

Steven

> Are you running them both on the same machine?
>
[quoted text clipped - 30 lines]
> >
> > Any insight is greatly appreciated!
TDC - 11 Aug 2006 18:25 GMT
Well, you could have the service layer written in .NET and then just
use COM Interop to create your VB6/COM object that contains all of your
business logic.  No need to rewrite any of that.

But in any case, if this works on your dev amchine it tells me you
didn't register your assembly on the production machine.  That would
yeild the error you described.

Tom

> I have a program called server.exe which is linked to a service.  The
> service runs server.exe.  Server.exe references a vb.net dll via com
[quoted text clipped - 58 lines]
> > >
> > > Any insight is greatly appreciated!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.