Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ASP.NET Server Control and 1st Attempt at Using Product

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
PianoPLayer



Joined: 03 Dec 2007
Posts: 2

PostPosted: Mon Dec 03, 2007 9:31 pm    Post subject: ASP.NET Server Control and 1st Attempt at Using Product Reply with quote

Hi,

I've written an ASP.NET Server control and I'd like to use your Licensing software to protect my code. I downloaded your trial version and am attempting to use it.

Question 1:

I have two VS2005 projects: 1) a class library project containing the server control and 2) a regular test web application project. I created a licenses.licx file in the text web project as noted in your FAQ section and entered the following into the file.

SPCG.Charts.SPCG_ChartsSpider, SPCG_Charts.dll

First, I was unsure of whether I need to add the ".dll" extension.

Second, I get this error when I rebuild the test app project:

Error 1 Unable to resolve type 'SPCG.Charts.SPCG_ChartsSpider, SPCG_Charts.dll' C:\Inetpub\wwwroot\SPCG_Charts\SPCG_Charts\licenses.licx 1 SPCG_Charts



Question 2:
I imported the code from your LicenseControl.cs file into my control:


public SPCG_ChartsSpider()
{
License();

m_BackgroundBrush = new SolidBrush(m_BackgroundColor);
}

public void License()
{
// set the parameters used to validate the license
//
EncryptedLicenseProvider.SetParameters(m_LicenseParameters);
if (LicenseManager.CurrentContext.UsageMode == LicenseUsageMode.Designtime)
{
// at design time we must check the license every time or else our license may not
// get compiled into the application resources
//
if (!LicenseManager.IsLicensed(typeof(SPCG_ChartsSpider)))
{
// only show the install dialog if we haven't already done so for this form
//
throw new ApplicationException("Invalid license");
}
}
else
{
// at runtime only check the license if we haven't already done so
//
if (!_licenseChecked)
{
// show a nag screen if the control is not licensed
//
if (!LicenseManager.IsLicensed(typeof(SPCG_ChartsSpider)))
{
throw new ApplicationException("Invalid license");
}
}
}
_licenseChecked = true;;
}

As far as the LicenseParameters are concerned I wasn't sure whether I should generate my own license parameters or use the one from the sample control file. I tried both and for both the IsLicensed routine returns false.

Question 3:

I noticed the code in your documentation for Component and Control Licensing calls LicenseInstallForm. I've never called Windows From class from an ASP.NET server control. Will this work?

I intend to buy your product assuming I can get the trial version to work.

Ed Swartz

P.S.: I tried to send this email to support@infralution.com and services@infraluction.com but my email was returned as undeliverable.

P.P.S.: The Submit button does not appear when viewing your forum registration form under Firefox.
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Dec 03, 2007 9:51 pm    Post subject: Reply with quote

Question 1:

ASP.NET Server controls have to be licensed somewhat differently to Windows Forms controls. The .NET licensing framework does not support embedding runtime license keys in the resources for ASP.NET applications. This means that you normally have to provide an explicit property/method to allow the client ASP.NET application to programmatically provide the license key. See the following thread for more information:

http://www.infralution.com/phpBB2/viewtopic.php?t=914&

Question 2:

When using the evaluation you can just use the parameters from the sample code (which are generated with a password "TEST" and key strength of 7). But when you purchase and can set your own password you will need to generate your own parameters. It would probably be a good idea to do this now so you become familiar with the process.

Question 3:

No you shouldn't call Windows Forms code from your ASP.NET control. The sample project is a Windows Forms control. If no license has been installed for your control you should indicate this in some other way to the user (eg add a label with licensing info)

PS

The first email address looks OK - and we have been receiving email. The second has a typo.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
PianoPLayer



Joined: 03 Dec 2007
Posts: 2

PostPosted: Tue Dec 04, 2007 6:57 pm    Post subject: Reply with quote

Hi,

Thank you for the response. I was able to incorporate your licensing software into my ASP.NET server control as you indicated using a LicenseKey property. I purchased your software and generated my own licnese keys with the License Tracker tool and put the validation info into my server control.

I'm now ready to distribute my server control. I wasn't clear on whether I need to 1) include the Infralution.Licensing.dll in my software kit or 2)compile in the Infralution source into my server control class library and then distribute the updated class library in my software kit.
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Dec 04, 2007 9:12 pm    Post subject: Reply with quote

We recommend including the source code for the licensing classes that we provide when you purchase (EncryptedLicense, EncryptedLicenseProvider etc) directly in your project. That way you do not have distribute a separate DLL.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group