Problem With Using ASP Intrinsic objects in VB com

Results 1 to 2 of 2

Thread: Problem With Using ASP Intrinsic objects in VB com

  1. #1
    Join Date
    Dec 1969

    Default Problem With Using ASP Intrinsic objects in VB com

    Hey All,<BR>I have a problem to use the ASP Intrinsic Objects from within activeX.dll <BR>in vb(WIN2000 SERVER), First I checked the "Microsoft Active Server Pages <BR>Object Library" and "COM+ Service Type Library" in the project-<BR>&#062;references. And Then I Write In the Class Initialize event:<BR> Dim objContext As COMSVCSLib.ObjectContext<BR> Dim objResponse As ASPTypeLibrary.Response<BR> Set objContext = GetObjectContext<BR> Set objResponse = objContext("Response")<BR> objResponse.Write "COM+ TEST"<BR><BR>and when I try to execute it I Get this Error:<BR>"object or variable not set."<BR><BR>can u tell me what&#039;s wrong with my code?

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem With Using ASP Intrinsic objects in VB

    This is a little ropy but it works.<BR><BR>Private MyScriptingContext As ScriptingContext<BR>Private MyApplication As Application<BR>Private MyRequest As Request<BR>Private MyResponse As Response<BR>Private MyServer As Server<BR>Private MySession As Session<BR><BR>Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)<BR>Set MyScriptingContext = PassedScriptingContext<BR>Set MyApplication = MyScriptingContext.Application<BR>Set MyRequest = MyScriptingContext.Request<BR>Set MyResponse = MyScriptingContext.Response<BR>Set MyServer = MyScriptingContext.Server<BR>Set MySession = MyScriptingContext.Session<BR>End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts