View previous topic :: View next topic |
Author |
Message |
RobT
Joined: 09 Apr 2007 Posts: 12
|
Posted: Mon Feb 25, 2008 10:48 am Post subject: Referencing EncryptedLicense |
|
|
It's been a while since I got our web site generating license keys and I now need to move up from VS 2003 to VS 2005 and re-script accordingly.
Would you please give me the idiot's guide as to how I can reference EncryptedLicense.vb and EncryptedLicenseProvider.vb in a VS 2005 VB.NET web project? (I have the VS 2005 code versions required and would rather not make use of Infralution.Licensing.dll on the site at all.)
Regards,
Rob |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Feb 25, 2008 9:42 pm Post subject: |
|
|
It depends if you are using an ASP.NET Web Application (File->New->Project) or a Web Site (File->New->WebSite). The ASP.NET Web Application project is usually the better way to go - but you will need SP1 of VS2005 to support ASP.NET Web Application projects.
For ASP.NET Web Applications projects you can simply right click in the Solution Explorer and select "Add Existing Item...". Then browse to the source code for the licensing classes and select them. They will be included in the project. Note that the classes will now be in your projects namespace (ie don't use Infralution.Licensing to reference them)
For Web Site solutions you must add the classes to the App_Code subdirectory (if this doesn't exist you'll need to create it). The classes also need to be modified to make them public. Because Web Site solutions can't define Compilation Constants you will need to change the following code for each class:
Code: | #If PUBLIC_LICENSE_CLASS Then
Public Class EncryptedLicense
Inherits License
#Else
Class EncryptedLicense
Inherits License
#End If |
to
Code: | Public Class EncryptedLicense
Inherits License
|
_________________ Infralution Support |
|
Back to top |
|
|
RobT
Joined: 09 Apr 2007 Posts: 12
|
Posted: Tue Feb 26, 2008 11:44 am Post subject: |
|
|
Perfect! Many thanks indeed.
Rob |
|
Back to top |
|
|
|