Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP uploading error...

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi everyone,

I have an app that uploads files to a server. Now, the code works in a web hotell I used until now when I changed. The error I get when the code runs is:

*********CODE*********

HTTP 500.100 - Internal Server Error - ASP error Apache
----------------------------------------------------
Technical Information (for support personnel)

Error Type:
Sun ONE ASP VBScript runtime (0x800A4001)
Function or method call not implemented: 'ChrB'
Upload_file.asp, line 134

*********END CODE*********

What's the catch? I works with other servers. Could it be that it's an Apache server? And what's "ChrB"? - Never heard of the command...!

/
 
Binary character code from an ASCII number. It's possible that the Apache server is using ChiliSoft to process ASP pages. What is the code where the error occurs?

Lee
 
Hi!

I do believe that that the server is using Chilli! What's the problem, then? (I'm not home whith servers..)

The code is (there's more, but here's the sub!):


*********BEGIN CODE**************

Private Sub getData(rawData)
Dim separator
separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1)

Dim lenSeparator
lenSeparator = LenB(separator)

Dim currentPos
currentPos = 1
Dim inStrByte
inStrByte = 1
Dim value, mValue
Dim tempValue
tempValue = ""

While inStrByte > 0
inStrByte = InStrB(currentPos, rawData, separator)
mValue = inStrByte - currentPos

If mValue > 1 Then
value = MidB(rawData, currentPos, mValue)

Dim begPos, endPos, midValue, nValue
Dim intDict
Set intDict = Server.CreateObject("Scripting.Dictionary")

begPos = 1 + InStrB(1, value, ChrB(34))
endPos = InStrB(begPos + 1, value, ChrB(34))
nValue = endPos

Dim nameN
nameN = MidB(value, begPos, endPos - begPos)

Dim nameValue, isValid
isValid = True

If InStrB(1, value, stringToByte("Content-Type")) > 1 Then

begPos = 1 + InStrB(endPos + 1, value, ChrB(34))
endPos = InStrB(begPos + 1, value, ChrB(34))

If endPos = 0 Then
endPos = begPos + 1
isValid = False
End If

midValue = MidB(value, begPos, endPos - begPos)
intDict.Add "FileName", trim(byteToString(midValue))

begPos = 14 + InStrB(endPos + 1, value, stringToByte("Content-Type:"))
endPos = InStrB(begPos, value, ChrB(13))

midValue = MidB(value, begPos, endPos - begPos)
intDict.Add "ContentType", trim(byteToString(midValue))

begPos = endPos + 4
endPos = LenB(value)

nameValue = MidB(value, begPos, ((endPos - begPos) - 1))
Else
nameValue = trim(byteToString(MidB(value, nValue + 5)))
End If

If isValid = True Then

intDict.Add "Value", nameValue
intDict.Add "Name", nameN

dict.Add byteToString(nameN), intDict
End If
End If

currentPos = lenSeparator + inStrByte
Wend
End Sub

********END CODE**************

Any suggestions..?

/Adam
 
I'm not familiar with what ChiliSoft does or doesn't do. I know there's an Apache forum here you could ask about this, and you could do a Google search to find out what quirks ChiliSoft has.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top