View previous topic :: View next topic |
Author |
Message |
emran834
Joined: 05 Jun 2007 Posts: 7
|
Posted: Tue Jun 05, 2007 3:28 pm Post subject: Licensing ASP.NET Server Control |
|
|
Hi,
I have purchased your source codes and now I want to do the following things.
1] I have developed an ASP.NET (2.0) Server Control.
2] In my Server Control, I have made a public property named "LicenseKey"
WHERE
3] In the get accessor of the property, I want to retrieve the LicenseKey from where it is installed. If no License is installed, it will return Empty String.
4] In the set accessor of the property, I want to install the License. In design time, within the Set Accessor, if license is not valid, a Nag Screen HTML Code will be displayed. Otherwise no Nag HTML will be displayed.
Now, in order to achieve this target, I had to go thru too much trouble about License Location path etc..etc.. How can I just make it simple to my Control Customer who use this License and control, he should not be worried about installing license in the right path. Rather my Set Accessor should do it for him..
Can you please give me a guideline to implement this scenario using your source code. I have already checked all Forum Posts and still I could not understand about it totally.
Thanks and regards. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jun 05, 2007 11:18 pm Post subject: |
|
|
Why do you need to store the license key at all? Instead have the application using the control set the LicenseKey property before it uses the control and then use the EncryptedLicenseProvider.ValidateLicenseKey method to validate the key. That way clients who write applications that use your server control don't have to distribute your license key in a file where it could be read by their customers. _________________ Infralution Support |
|
Back to top |
|
|
emran834
Joined: 05 Jun 2007 Posts: 7
|
Posted: Wed Jun 06, 2007 2:17 am Post subject: |
|
|
Hello,
Thanks a lot for your response.
Within your provided sample applications, I did not receive any sample application for ASP.NET Server Control Licensing. All you have are about Windows Application and Windows Control.
So, the way to implement license in Server Control you suggested here, can you please provide an ASP.NET Server Control License Sample Application ? Because, I am really confused about the usage of your source codes in my server control.
Thanks and regards |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jun 06, 2007 8:11 am Post subject: |
|
|
I'm sorry we don't currently have a specific Server Control sample. I'm not sure what is confusing you however. Have a look at the following code which you would add to your server control:
Code: |
Private _license As Infralution.Licensing.EncryptedLicense
Private Const LICENSE_PARAMETERS As String = "<LicenseParameters>..."
Property LicenseKey() As String
Get
If _license Is Nothing Then
Return ""
Else
Return _license.LicenseKey
End If
End Get
Set(ByVal Value As String)
Dim provider As New Infralution.Licensing.EncryptedLicenseProvider
_license = provider.ValidateLicenseKey(LICENSE_PARAMETERS, Value)
If Not _license Is Nothing Then
' enable stuff here
End If
End Set
End Property |
_________________ Infralution Support |
|
Back to top |
|
|
emran834
Joined: 05 Jun 2007 Posts: 7
|
Posted: Wed Jun 06, 2007 2:56 pm Post subject: |
|
|
Hi,
Thanks a lot for providing me the Snippet.
I would like to use this scheme and What I am guessing as follows:
For every single instance of my server control in every pages, License key needs to be provided. And every time, LicenseKey Validate method will run. So, its ok as long as it cost any performance issue. As the Web Servers are running on very high speed Processors, do you think this scheme will cost huge performance issue if user host too many instance of my control in a page ? I used the same scheme in one of my Windows Control and one of my user complained that, the Windows Form takes long time to load because of the licensekey calculation. ALthough I used Key Strength 14 for that control.
Please advice.
Thanks and regards |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jun 06, 2007 10:22 pm Post subject: |
|
|
If this is a concern make the property (and variables) shared/static then the application only needs to call them once. _________________ Infralution Support |
|
Back to top |
|
|
|