Login  
Search All Forums
Dart Home | PowerTCP WebServer for ActiveX | Custom Development Reply | PowerTCP WebServer for ActiveX Topics | Forums   
AuthorForum: PowerTCP WebServer for ActiveX
Topic: DOM.Load fails after receiving xml file
todro

From: Waiblingen, Germany
Posts: 6
Member Since: 10/22/03
posted October 22, 2003 7:44 AM

Hi,

when I try to load a received xml file (posted via HTTP POST) directly from the request object into a DOM (MSXML 2.6,3.0,4.0), I get an error C00CE558 (can't find any infos about this error).

If I save the request object via a dartstream object to a file, I can load the file into the DOM without problems. Only inside the webserver POST function it doesn't.

This is how the code looks:

' Loading the file directly works (just to make sure), no error
MsgBox DOM.Load("c:\temp\xmlin.xml")

' Saving the file for later verification
Dim fs As New DartStream
fs.FileMode = createAlways
fs.Filename = "c:\temp\dartstream.xml"
fs.Write Request.Body.ReadString

' The failing load
DOM.async = False
MsgBox (DOM.Load(Request))
  
Any ideas ? Any help really appreciated.

Regards,

Torsten
todro

From: Waiblingen, Germany
Posts: 6
Member Since: 10/22/03
posted October 24, 2003 7:15 AM

Hi,

just an addition as it's either a POWERTCP or msxml bug. If I save the incoming request body to file first and then reload it instead of loading it directly, everything is OK but this can't be the solution.

Dim fs As New DartStream
fs.FileMode = createAlways
fs.Filename = "c:\temp\dartstream.xml"
fs.Write Request.Body.ReadString

' The failing load
DOM.async = False
' saving an re-loading helps
DOM.Load fs.filename

According to microsoft the occuring error means:

"XML document must have a top level element."

Therefore I would see the request object of the webserver tool to be a possible spot of failure.

Any comments ?

Regards,

Torsten

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted October 24, 2003 9:17 AM

I think you may have to set the position of the Request.Body back to 0 before reading from it again.

todro

From: Waiblingen, Germany
Posts: 6
Member Since: 10/22/03
posted December 3, 2003 5:42 PM

Hi,

thanks but that doesn't work.

Meanwhile either the IDE or the standalone executable crashes without any further message.

I tracked down 2 different problems:

a.) using the response.body dartstream seems to cause problems when used with MSXML.LOAD. This happens occasionally, mainly when using the stream directly. The number of crashes seems to be lower but no 0 when using a response.body.readstring instead of using the stream directly like XMLDOM.LOAD(REQUEST)

b.) based on the webserver sample the application crashes. I used bug trapper to find out that the problem comes from different places: first it was a problem with lvwsessions although I didn't make any changes to this part. After removing the listbox lvwsessions and all related code the system still crashes. The strange thing is that sometimes even bugtrapper can't spot the source line and refers to a problem in dartwebserver.dll.

In an other message an other problem (which also causes crashes) is mentioned which was fixed in 1.08.07. I downloaded the latest webservertool.exe but it has only 1.08.04. Were can I download the latest update ?

Just to mention, the problem happens not only on the developing system but also on other computers.

Any ideas how to narrow this problem down ?

Regards,

Torsten
todro

From: Waiblingen, Germany
Posts: 6
Member Since: 10/22/03
posted December 3, 2003 5:43 PM

should be request.body.readstring
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 3, 2003 7:20 PM

This forum was written using the WebServer tool and it hasn't crashed in over a year.

You can get the latest DLL by getting the update from http://www.dart.com/downloads/update.exe

At that point if you are still having problems, you will need to write a program that demonstrates how to cause the crash. Please make sure you remove all the XML stuff to eliminate that as the cause.

todro

From: Waiblingen, Germany
Posts: 6
Member Since: 10/22/03
posted December 4, 2003 6:45 AM

Hi Tony,

thanks but the update.exe from this link only contains the old version 1.8.0.4 od the dartwebserver.dll from 11/25/02. You can verify that by looking in the setup file with update.exe /x

In the thread http://support.dart.com/postings?topicid=2933&search=1 you mentioned that the URL crash bug is removed in any dartwebserver.dll 1.8.0.7 or higher.

What am I missing ?

Regards,

Torsten
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 4, 2003 11:09 AM

It still hasn't been released. Please contact support at support@dart.com and request a beta version of the WebServer DLL. As soon as they approve it, I will email you one.
Reply | PowerTCP WebServer for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX