Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 20th, 2006, 09:37 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default Microsoft VBScript runtime error '800a01a8'

Hi All,

I am trying to encrypt the query string from page to page...so the calling page must encrypt the query string, and the called page must decrypt it...

When I run it without encryption (same code), I have no problems. When I try with the encrypted query string, I get the following message...

Microsoft VBScript runtime error '800a01a8'
Object required: 'objSharedCrypto'
/shared/includes/Crypt.asp, line 52

This is where we are decrypting...
Code:
Dim QSColl, strRequestQS
Set QSColl = RequestQS2()

rptid = QSColl("rptid")
dataid = QSColl("dataid")
If dataid = "" Then dataid = rptid
DataSession = "RPT-" & dataid
strUDBId = Session("VMAccount")
This is the RequestQS2 function I am calling
Code:
Function RequestQS2()
    Dim objQS, key
    Dim objQSDict
    Dim strQS        ' Set to Request.QueryString.

    strQS = Request.QueryString
    If EncryptedQS() Then
        Set objQS = DecryptToQS(strQS, Salt())
        'Set objQSDict = Server.CreateObject("Scripting.Dictionary")

        'For Each key In objQS
        '    objQSDict.Add LCase(key), objQS(key)
        'Next
        Set RequestQS2 = objQS

        Set objQS = Nothing
        Set objQSDict = Nothing
    Else
        Set RequestQS2 = Request.QueryString
    End If
End Function
Which in turn calls on the DecryptToQS function below if the query string is indeed encypted

Code:
Function DecryptToQS(ByVal Str, ByVal Salt)
    If EncryptedStr(Str) Then
        ' Remove Prefix.
        Str = Right(Str, Len(Str) - Len(QSPrefix()))
        Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)    
        Else
        DecryptToQS = Str
    End If
End Function
this is line 52 in shared/includes/crypt.asp
Code:
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)
on the first line of Crypt.asp there is the following declaration
Code:
Dim objSharedCrypto
Set objSharedCrypto = Server.CreateObject("Crypto.QueryString")
So I am not sure what the problem is, I've used the function with other pages, and it works fine...something is happening with this particular page however.

Any ideas or suggestions?

I appreciate the help

Thanks

  #2 (permalink)  
Old July 21st, 2006, 11:43 AM
Authorized User
 
Join Date: Jul 2006
Location: , , .
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default

I've figured it out....I had an include statement which was already creating the object...I just had to move the include from the bottom of the script to the top



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript runtime error '800a01a8' - FIXED buddyz Classic ASP Databases 2 September 13th, 2006 10:55 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Professional 1 July 21st, 2006 11:42 AM
Microsoft VBScript runtime error '800a01a8' object stevesole Access ASP 9 June 7th, 2004 08:13 PM
Microsoft VBScript runtime error '800a01a8' gmoney060 BOOK: Beginning ASP 3.0 1 June 2nd, 2004 01:18 PM
Microsoft VBScript runtime error '800a01a8' dlgee Classic ASP Basics 4 January 25th, 2004 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.