license file never validates as true

J

Jon Paal

Cannot get license file to validate to "valid" - what is missing ?



'================ page file - default.aspx =============


<%@ Page Language="vb" Debug="true"%>
<%@ Import Namespace="Namespace1" %>
<script runat="server">
Sub Page_Load
'initialize the license
'----------------------------
try
Dim oThis as class1 = New Namespace1.Class1
lbl1.Text = "object created, license is valid"
catch e as exception
lbl1.Text = "<br>License is not valid.<br>Please, contact the manufacturer of the component for more information"
end try
End Sub
</script>
<asp:Label id="lbl1" runat="server" />



'================ control file - Mycontrol.vb - in App_code folder =============


Imports System
Imports System.ComponentModel
Imports System.Web.UI

NameSpace NameSpace1
' Adds the LicenseProviderAttribute to the control.
<LicenseProvider(GetType(LicFileLicenseProvider))> Public Class Class1
Inherits Control

' Creates a new, null license.
Private license As License

Public Sub New()

' Adds Validate to the control's constructor.
license = LicenseManager.Validate(GetType(Class1), Me)

' Insert code to perform other instance creation tasks here.

End Sub

Public Overrides Sub Dispose()
If (license IsNot Nothing) Then
license.Dispose()
license = Nothing
End If
MyBase.Dispose()
End Sub
End Class

End Namespace


'================ license file - Namespace1.Class1.lic - in App_code folder =============
Namespace1.Class1 is a licensed component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top