February 03, 2006

.Net licensing with Registry

1- You must use your LicenseProvider on the top of your control class like:
[LicenseProvider(typeof(MYLicenseProvider))]
2- You must check the validation of License in constractor's control class by
LicenseManager.Validate(typeof(MYControl), this);
3- You must define you specified MYLicenseProvider and override GetLicense function and read something from registry and return a valid instance of "Licence".

PS: The promise is that you define your License class and return one object of that
public class MYLicense : License {...}
PS: Another application can fill up registry for use by this control

.Net Licensing with LIC file

Microsoft solution for Control .Net Licensing (that we call FILE LICENSING)
1- You must use the
[LicenseProvider(typeof(LicFileLicenseProvider))]
on the top of your control class
2- You must check the validation of License in constructor’s control class by
LicenseManager.Validate(typeof(MYControl), this);
3- To run the application, you must use one file (with below spec.) near the executable (or dll) control.
FileName: [MYControlNamespace].[MYControlClassname].lic
Content: [MYControlNamespace].[MYControlClassname] is a licensed component.

This is the most simple microsoft solution, that can be advance!

February 01, 2006

.Net Licensing

Step by Step with .Net Licensing (for Control or Form)
If you wanna build a control (that we called NewControl) and use the .Net Licensing for that, go ahead:

1-The licensed control requests a license from the LicenseManager in its constructor.
[PS1: LicenseManager is a sealed (not inheritable) class for provides usefull properties and methods for connecting to a LicenseProvider]
license = LicenseManager.Validate(typeof(NewControl), this);
2- The our LicenseManager rerequests a licence from the LicenseProvider with GetLicense().
[PS2:We can define our LicenseProvider at the top of our class's control (that we called NewLicenseProvider)]
[LicenseProvider(typeof(NewLicenseProvider))]
public class NewControl : System.Windows.Forms.Control{ ...}
3- We must declare a NewLicenseProvider of System.ComponentModel.LicenseProvider and override the GetLicense like :public
override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)

We want to talk more about this ...
If you have a problem on this field .. come on ... post a comment

January 12, 2006

Task Manager Disabled

Error: Task Manager has been disabled by your administrator
Error: Registry Editing has been disabled by your administrator

Microsoft Solution: Start > Run > gpedit.msc > Group Policy settings > User Configuration > Administrative Templates > System > Ctrl+Alt+Del Options > Remove Task Manager > Remove Task Manager
Microsoft Solution: Modify your registry
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
  "DisableTaskMgr"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\
LocalUser\Software\Microsoft\Windows\CurrentVersion\Policies\System]
  "DisableTaskMgr"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
  "DisableTaskMgr"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon]
  "DisableCAD"=dword:00000000
But i think that you fall in virus Nice Trojan 2.0 (Trojan-Spy.Win32.VB.cs)
if you have NDDEN.EXE (c:\WINDOWS\NDDEN.exe) then you have a Persian Virus.
Here is the virus specifications:
Owner: Javad.M
Written: Visual Basic
Date: September 2004
Country: Persia(Iran)
File: C:\WINDOWS\NDDEN.exe
Size: 23,567 bytes
Registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
  "disableregistrytools"
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
  "DisableTaskMgr"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  "Microsoft PCHealth32"