Login  
Search All Forums
Dart Home | Custom Development Reply | Licensing Issues Topics | Forums   
AuthorForum: Licensing Issues
Topic: Control licensing within a .NET service
User7

Posts: 8
Member Since: 07/20/01
posted May 22, 2002 7:17 PM

I'm using Dart's Mail and Server tools to write a SMTP service using VB.NET. When I deploy the service, it is failing to load due to the demo nag screen that is popped up, though I have a fully licensed version on my development machine.

Is there a way to resolve this licensing problem without having to resort to embedding a form inside my service? That just seems morally wrong.

Any help on this would be very much appreciated since I need to deploy this thing relatively soon and was not expecting something like this to happen.

ps. The controls work fine when used from a VB6 project.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted May 23, 2002 8:43 AM


Hi,
No, unfortunately there is not. This is a Microsoft .NET licensing bug that they are aware of, and are contemplating how to deal with. As you say, it works fine in VB6.

The work-around is to dynamically instantiate an instance of a form that contains the controls you are using, and access them this way. Obviously, there is no need to actually show the form.

Sorry I do not have a better answer,
-ken

K M Drake
Dart Tech Support
User7

Posts: 8
Member Since: 07/20/01
posted May 23, 2002 12:29 PM

Thanks for the reply Ken.

Is there any chance I could get an example of how your talking aboug using a form to make this stuff work? I've been able to do what I think your talking about with a GUI app, but when I use the same manner in a Windows Service, I get the followin error:

Additional information: Could not instantiate ActiveX control '125b847f-7738-11d2-aada-0020affaefb4' because the current thread is not in a single-threaded apartment.

I really need to get this stuff working soon, so any help would be appreicated.

thanks,
Michael
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted May 23, 2002 4:28 PM


Hi Michael,
Ok, I tried creating a class module with Main, and instantiating a form that contains the service control. Depending on a command line switch, either Install or Connect is called. When I do this, Install works correctly, but Connect causes an exception. Interestingly,
a) The same thing in VB6 works fine, and
b) When I use a form as the startup instead of a module, the same code (in the Load Event) works fine.
This suggests to me that there is another problem with .NET and services.
If possible, my suggestion would be to just use a form as the startup object, and place the service control on this. If the service is not set to interact with the desktop, it will not be visible anyway. Also, you can make the form not visible, in case this option was selected.
Sorry I do not have a better answer,
-ken

K M Drake
Dart Tech Support
SystemUp

From: Norwood, NJ USA
Posts: 23
Member Since: 01/11/02
posted July 16, 2002 9:30 AM

AFAIK, you can't have ANY graphical elements in a .NET Service. I am running into the same problem. Though it wasn't initially a problem, but became one overnight when I didn't touch the code. So I am rather pissed off at the moment...
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 16, 2002 9:37 AM

Hi,
Please see:
http://support.dart.com/postings?topicid=2170
If it just stopped working without any changes, it sounds like the trial has expired.
-ken
Reply | Licensing Issues Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX