MagicService Object

MagicService is the service which enables to run component's code under user permissions which are defferent from user permissions of main code. MagicService can be used to work with MagicCrypt component. If you try to use MagicCrypt under IIS5 with Application protection medium or high you will fail. That is because of permissions of the code. Most probably that you code will be run under IWAM_<HOSTNAME> user and this user has no permissions to connect Cryptographic Service Providers and so MagicCrypt component doesn't work. The solution is to run MagicCrypt code under other user. MagicService enable to run MagicCrypt under any user you want.
 
 

Methods

  CreateObject Method
GetLastErrorNbr Method
GetLastErrorDesc Method

 

Download
Click here to download MagicService component.

Installation

  • To register MagicService run: MagicService.exe -Reg.

Support
With any questions and/or suggestions email to support@dana-net.com.

 
 

Working with MagicService

 

CreateObject Method

Return Value: TRUE if successful; otherwise FALSE.
Syntax: object.CreateObject(objName, strUser, strPwd)
objName - object name;
strUser - specifying user name;
strUser - user password;
Note that strUser, strPwd are optional parameters.
GetLastErrorNbr Method
Returns number of the last error.
Syntax: object.GetLastErrorNbr
GetLastErrorDesc Method
Returns description of the last error.
Syntax: object.GetLastErrorDesc

Example:

To call the MagicService Object from an Active Server Page, you will need to create the object using the following code:

<%
Dim UserName
Dim UserPwd
Dim MsObject
Dim McObject

UserName = "User1"
UserPwd = "FgJtKL4pMs78gDF"
Set MsObject = Server.CreateObject("MagicService.ObjectFactory")
Set McObject = MsObject.CreateObject("MagicCrypt.SingleKey", UserName, UserPwd)
   . . .

 'put your code here
%>

Remember to enclose the code within <% %> brackets.

top


Home | FAQ | News | How to buy | Contacts | ASP MagicPerf Component | ASP MagicShell Component