Connecting Tech Pros Worldwide Forums | Help | Site Map

Problems with class declaration and Request/Response

Newbie
 
Join Date: Aug 2008
Posts: 10
#1: Aug 28 '08
Hi guys!
I`ve got an ASP web site that worked perfectly on a virtual server. I had to reinstall it on my computer (win XP sp2, IIS 5.1). I changed all the routes, database connection string, etc. Everything works pefrectly except 2 things:

1.) when connecting to one page of the site, error occurs:
Microsoft VBScript error '800a03ea'
Syntax error
C:\INETPUB\WWWROOT\STAGE1\../include/oreq_main_class.asp, line 17
Class ObjectRequest
^
I found a file where oreq_main_class.asp is included, deleted the include string. As a result similar error occured with another class:
C:\INETPUB\WWWROOT\STAGE1\../comps/sscomp/comp_main_class.asp, line 14
Class ObjectComponent
^
2.) The site has multiple languages, so a function with Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") is used. On another machine everything worked ok, but on my PC there`s an error '8002802b' //include/localize_main_lib.asp, line 182 , this line is

userLocale = request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

I found out that problem occurs when this function is called in global.asa file, and even if I place Response.Write("qwerty") anywhere in the function the same error is displayed. Attempt to use reponse or request object causes an error.

I`m new to asp, so please forgive me if i`m wrong :)
I would very much appreciate your help, guys!

Newbie
 
Join Date: Aug 2008
Posts: 10
#2: Aug 28 '08

re: Problems with class declaration and Request/Response


Fixed the second problem by removing localization function from global.asa. It`s not a good workaround, because on another machine it worked without modification, but that`s it.
The first problem is still being unsoved(( I have no ideas. Please help!!
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#3: Aug 30 '08

re: Problems with class declaration and Request/Response


800a03ea is a syntax error, I don't know why you would get it intermittently, or after a change in host. Could you post your code around this line?

Jared
Newbie
 
Join Date: Aug 2008
Posts: 10
#4: Sep 3 '08

re: Problems with class declaration and Request/Response


jhardman
Thanks much for the reply! an error is generated on the second line. If I exclude this file from page the same error appears when I declare any other class in other files.

<SCRIPT RUNAT="SERVER" LANGUAGE="VBSCRIPT">
Class ObjectRequest

Private iActionType
Private iObjectId
Private iDeep
Private sComponentType
Private sComponentId
Private sRequestList
Private iLanguage
Private sStartDate
Private sEndDate
Private iQueryType
Private iRoadmap
Private iEncodingType

Public Property Get ActionType()
ActionType = iActionType
End Property

Public Property Let ActionType(Value)
iActionType = Value
End Property

Public Property Get ObjectId()
ObjectId = iObjectId
End Property

Public Property Get RequestList()
RequestList = sRequestList
End Property

Public Property Let ObjectId(Value)
iObjectId = Value
End Property

Public Property Get Deep()
Deep = iDeep
End Property

Public Property Let Deep(Value)
iDeep = Value
End Property

Public Property Get ComponentType()
ComponentType = sComponentType
End Property

Public Property Let ComponentType(Value)
sComponentType = Value
End Property

Public Property Get ComponentId()
ComponentId = sComponentId
End Property

Public Property Get Language()
Language = iLanguage
End Property

Public Property Get StartDate()
StartDate = sStartDate
End Property

Public Property Get EndDate()
EndDate = sEndDate
End Property

Public Property Get QueryType()
QueryType = iQueryType
End Property

Public Property Get Roadmap()
Roadmap = iRoadmap
End Property

Public Property Get EncodingType()
EncodingType = iEncodingType
End Property

Public Property Let Language(Value)
iLanguage = Value
End Property

Public Property Let StartDate(Value)
sStartDate = Value
End Property

Public Property Let EndDate(Value)
sEndDate = Value
End Property

Public Property Let QueryType(Value)
iQueryType = Value
End Property

Public Property Let EncodingType(Value)
iEncodingType = Value
End Property

Public Sub Init2(byVal atp, byVal oid, byVal lev, byVal cid, byVal ctp, byVal lng, byVal rlist)
iActionType = atp
iObjectId = oid
iDeep = lev
sComponentId = cid
sComponentType = ctp
iLanguage = lng
sRequestList = rlist
End Sub

Public Sub Init(xml_node)
dim attribs, i
set attribs = xml_node.attributes ' XmlAttributeCollection
for i = 0 to attribs.length - 1
dim attribute, attr_name, attr_value
set attribute = attribs.item(i) ' XmlNode
attr_name = attribute.nodeName
attr_value = attribute.value
Select Case LCase(attr_name & "")
Case "atp"
if isNumeric(attr_value) then
iActionType = CInt(attr_value)
end if
Case "oid"

if isNumeric(attr_value) then
iObjectId = CInt(attr_value)
end if
Case "lev"
if isNumeric(attr_value) then
iDeep = CInt(attr_value)
end if
Case "ctp"
sComponentType = attr_value & ""
Case "lst"
sRequestList = attr_value & ""
Case "cid"
sComponentId = attr_value & ""
Case "lng"
if isNumeric(attr_value) then
iLanguage = attr_value & ""
end if
Case "sdt"
sStartDate = GetDateFromFlash(attr_value & "")
Case "edt"
sEndDate = GetDateFromFlash(attr_value & "")
Case "qtp"
iQueryType = attr_value & ""
Case "rmp"
if isNumeric(attr_value) then
iRoadmap = cint(attr_value)
end if
Case "enc"
if isNumeric(attr_value) then
iEncodingType = cint(attr_value)
end if
End Select
next
End Sub

Private Sub Class_Initialize()
iActionType = INPUT_ACTION_DEFAULT
iObjectId = -1
iDeep = INPUT_DEEP_DEFAULT
sComponentType = ""
sComponentId = ""
iLanguage = INPUT_LANG_DEFAULT
sStartDate = ""
sEndDate = ""
iRoadmap = 0
iEncodingType = 0
End Sub

Private Function GetDateFromFlash(sFlashDate)
GetDateFromFlash = ""
if sFlashDate & "" = "" then
exit function
end if
dim aValues
aValues = split(sFlashDate,",")
if ubound(aValues) >= 4 then
GetDateFromFlash = "{ ts '" & aValues(0) & "-" & LeadZero(aValues(1),2) & "-" & LeadZero(aValues(2),2) & " " & LeadZero(aValues(3),2) & ":" & LeadZero(aValues(4),2) & ":00' }"
elseif ubound(aValues) = 2 then
GetDateFromFlash = "{ ts '" & aValues(0) & "-" & LeadZero(aValues(1),2) & "-" & LeadZero(aValues(2),2) & " 00:00:00' }"
end if
End Function


End Class
Newbie
 
Join Date: Aug 2008
Posts: 10
#5: Sep 3 '08

re: Problems with class declaration and Request/Response


I installed the application back on the virtual server, and the same error occurs. Seemslike that it is not the case of host changing
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#6: Sep 3 '08

re: Problems with class declaration and Request/Response


Quote:

Originally Posted by samaelsh

I installed the application back on the virtual server, and the same error occurs. Seemslike that it is not the case of host changing

looking over your code, it sure doesn't look like vbscript. perhaps VB.NET? that could definitely cause this problem, if the server is trying to use the vbscript engine to run a vb page.

Jared
Newbie
 
Join Date: Aug 2008
Posts: 10
#7: Sep 4 '08

re: Problems with class declaration and Request/Response


Quote:

Originally Posted by jhardman

looking over your code, it sure doesn't look like vbscript. perhaps VB.NET? that could definitely cause this problem, if the server is trying to use the vbscript engine to run a vb page.

Jared

Sorry, i`m mistaken, this is vb.net. All other pages of the site wre working ok, so it is not the case of vbscript engine usage
Newbie
 
Join Date: Aug 2008
Posts: 10
#8: Sep 4 '08

re: Problems with class declaration and Request/Response


Solved the problem by simply replacing file with its old working version. everything worked fine. then replaced the new version back, this also worked. Very odd.
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#9: Sep 4 '08

re: Problems with class declaration and Request/Response


Quote:

Originally Posted by samaelsh

<SCRIPT RUNAT="SERVER" LANGUAGE="VBSCRIPT">
Class ObjectRequest

This is the problem. It should not say VBSCRIPT here. I don't know how you got it to work, but I'm glad you got it up.

Jared
Reply


Similar ASP / Active Server Pages bytes