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.
'================ 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.