Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: VB.NET Service
dboris

From: Blackwood, NJ USA
Posts: 7
Member Since: 09/10/03
posted December 12, 2003 10:26 AM

I saw this posting from about a year ago concerning a problem with control licensing when instantiated dynamically in a Windows Service. Has there been any resolution to this issue?

Dan

"Our licensing implementation is exactly as Microsoft designed it for ActiveX and has always worked as specified. In .NET, interop licensing is handled in a very specific manner, which is that the license info is requested from us when a control is placed on a form. That is the only time that the function that returns licensing info to the environment is executed. When you don't place the control on a form, our function is never called and licensing info is never provided to the environment. We work very closely with Microsoft and they are aware of this problem. Hopefully they will address this issue in the next version of .NET. In the mean time we are considering providing a work-around, but the best approach at the present time is to place the control on a form and use it by way of calling it through the form class."

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted December 12, 2003 10:36 AM

Hi,
That quotation concerns ActiveX controls.
You are posting under the Sockets.Net forum.
Which product are you using?
Thanks,
-ken
dboris

From: Blackwood, NJ USA
Posts: 7
Member Since: 09/10/03
posted December 12, 2003 10:45 AM

I am using PowerTCP Sockets for .NET. Is the issue mentioned below only related to ActiveX controls in .NET applications?

I created a VB.NET application that works fine as a normal executable, but when I convert it to a Windows Service I get this error in the event log when trying to start the service:

"System.ComponentModel.LicenseException: This PowerTCP product has not been added to the project's licenses.licx file. "

Dan
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted December 15, 2003 10:29 AM

Hi,
Yes, it only applies to ActiveX controls in .Net services.

This error means the Project (not Solution) was not Rebuilt (not just Built or Started) on the licensed development machine with a licenses.licx file that contains the component in question.

-ken
nowickim

From: Austin, TX USA
Posts: 16
Member Since: 02/13/04
posted February 13, 2004 3:37 PM

I have the same problem. I have tried deleting all files from "Bin" and then Building the Project, Rebuilding the Project, Building the Solution, and Rebuilding the Solution. None of the above (or any combination) seem to fix the problem. I too am creating a Windows Service. Could this have something to do with it? Also, FWIW, all of my source files are in SourceSafe. Help?!?!
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 16, 2004 9:00 AM

Hi,
Which Tool are you using in the .Net Service - is it an ActiveX Tool or a native .Net Tool?
Thanks, I'm just not sure which problem you are referring to.
-ken
nowickim

From: Austin, TX USA
Posts: 16
Member Since: 02/13/04
posted February 16, 2004 9:10 AM

PowerTCP SSL Sockets for .NET (native not activex)... Thanks
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 16, 2004 9:40 AM

Hi,
In that case, please see my response above.
You need to add the valid licenses.licx file to the Project (not Solution) and Rebuild (not Build or Start) the Project (not Solution) on the machine with the license.

Also, please be aware that any project that uses our dlls on any level (even if the project uses a dll that references our dlls) must have the licenses.licx and be compiled on a licensed machine.

It works with all types of .Net applications, including .Net windows services.

-ken
nowickim

From: Austin, TX USA
Posts: 16
Member Since: 02/13/04
posted February 16, 2004 10:09 AM

I have gone through those steps (multiple times) with no luck. One thing that's weird is that when I add the licenses.licx file, it never shows up as being part of my project. Also, FWIW, I am using the TRIAL version of the project. I have not purchased yet because I wanted to make sure it will work for me. Any other suggestions?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 16, 2004 11:17 AM

Hi,
The fact that it is in trial does not matter.
When the component is added to a form, the licenses.licx is automatically created and added, and it will not show up in the solution explorer. 

However, when the component is used as a reference (as in a service), the licenses.licx must be manually added. When it is, it will initially appear under the project, but then after the project is closed, it will no longer appear.

You do not explicitly say so, but I assume the problem you are reporting is the error message stating that the component has not been added to the licenses.licx. Is this correct?

If you want to send a very simple demonstrative project (zipped) to support@dart.com, that would be fine. I should be able to tell pretty quickly why it is happening.

Thanks,
-ken
nowickim

From: Austin, TX USA
Posts: 16
Member Since: 02/13/04
posted February 16, 2004 1:26 PM

The exact message is:

"There was activity in 'Dart.PowerTCP.SslSockets.a'.

ACTIVITY MESSAGE: This PowerTCP product has not been added to the project's licenses.licx file. If your project does not have a licenses.licx file already, you must create a text file named "licenses.licx" and add it to your PROJECT (not the solution). 

You must then add the line:

'Dart.PowerTCP.SslSockets.Server, Dart.PowerTCP.SslSockets'

 to the file.

If the project already contains a licenses.licx, simply append this line to the file. For more information, please see the "Creating the Licenses.licx File" page in the Online Help. 

***IMPORTANT*** Any time you make changes to the licenses in your project, you MUST REBUILD THE SPECIFIC PROJECT (not the solution!) that contains the reference to the licensed DLL or the changes will not be built into the application!! Sometimes it may be necessary to delete any temporary project files from the project's output directory to force a rebuild.
ACTIVITY AREA:  Dart.PowerTCP.SslSockets.a
ACTIVITY DETAILS:  at n.a(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3)
  at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
  at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
  at System.ComponentModel.LicenseManager.Validate(Type type)
  at Dart.PowerTCP.SslSockets.Server..ctor()
  at SmartEye_NET__Service_.modSocket.InitializeServerSocketSSL() in C:\Source Code\SmartDealerProducts Projects\SmartEye NET\SmartEye NET (Service)\SmartEye NET (Service)\modSocket.vb:line 245

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."



I have checked the contents of the file (it is correct), and have tried and tried to add the licenses.licx file to the project. On my system, the file NEVER shows up in the project, before or after closing the project. I'll compress my project and send it to your e-mail. Look out for it shortly.

THANKS
nowickim

From: Austin, TX USA
Posts: 16
Member Since: 02/13/04
posted February 16, 2004 3:55 PM

FIXED!! (my fault -- see below)

My license.licx file had the line

"Dart.PowerTCP.SslSockets.Tcp, Dart.PowerTCP.SslSockets" (as is instructed in the help file). 

But I'm using the SERVER component, so I changed to "Dart.PowerTCP.SslSockets.Server, Dart.PowerTCP.SslSockets" and it works like a charm.

Doh!

THANKS
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 16, 2004 4:11 PM

Hi Matt,
Ok, thanks, please ignore the email I just sent you.
-ken
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX