My project is a VERY simple ISAPI dll with a web service. If the virtual
folder I am using to host the ISAPI dll is protected by Low Application
Protection, everything works fine. However, if I set the application
protection of the virtual folder to Medium or High, I very frequently get
the following error when making calls to my web service:
Received content of invalid Content-Type setting: text/html - SOAP expects
"text/xml"
By doing some debugging, I have found that what is usually being returned is
the line '<html>-2147417842 (0x8001010e)</body></html>'. This line is
returned very frequently (although not every time) when I call my web
service, and with the sample EchoServ web service. The error code
reported, -2147417842, means "The application called an interface that was
marshalled for a different thread." By searching Google for this number, I
have found many posts of people having trouble with this code being returned
from IIS 5, including PHP developers. I also found links to reports from
Borland saying that this bug was fixed in Delphi 6.02, and that the problem
was in CoInitFlags not getting set to COINIT_MULTITHREADED before
Application.Initialize. However, I am using Delphi 7, and can verify that
CoInitFlags is getting set properly.
Here are some links I've found in researching:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=content+of+inv
alid+Content-Type+group%3Aborland.public.delphi.webservices.soap
http://www.google.com/search?q=2147417842&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=
0&sa=N
http://community.borland.com/article/0,1410,27949,00.html#When%20running%20y
our%20WebSnap%20app%20you%20sometimes%20get:
http://www.borland.co.jp/delphi/D602FIXES.html
http://www.remobjects.com/index.asp
Speaking of RemObjects, I downloaded their trial package and modified my
test web service client to use RemObjects. This problem does not occur with
RemObjects. However, everything so far points to this being invalid
handling of data returned from the server, so mayhaps RemObjects simply
doesn't choak on the error message, but is encountering it anyways (no
source to RemObjects so I can't check).
Any feedback is very much appreciated. I was shocked that I couldn't find a
QC record for this, so I may create one myself if I find there is not a
solution that I have simply overlooked.
><html>-2147417842 (0x8001010e)</body></html>
It seems to me that the following is true
* the HTML error message is appended to the response
by IIS to report an error that occurs after the extension
processing is complete
* the error is related to some COM threading issue which
is caused by MSXML somehow
* because it is appended to the response (and sent across
the network) the HTTP Client library will pick the error
up as the next response if both client and server are doing
keep-alive (very shoddy work by Microsoft)
* if both client and server are doing keep-alive, the buffer
will keep filling up with duplicate responses, and the client
will be matching the response to the wrong request, until
the connection is dropped (there is no unique identifier
to allow an HTTP library to match request and response
packets, the server just has to get it right)
* if you can change the COM marshalling rules, then the
problem doesn't happen (i.e. running in process)
* if you can suppress keep-alive then you can suppress the
problem
* if the client is not HTTP/1.1 compliant, and not doing
keep-alives, you won't see the problem. This is probably
the situation with the REMObjects library
* <plug> you can solve it by using IndySoap on the server
side, cause we don't use COM
* otherwise, Microsoft will need to solve it - they created
the COM mess in the first place
Grahame
IndySoap
http://www.nevrona.com/indy/soap
My system is Delphi7 pro, Win2k service pack 3, IIS 5 ??
I have my default web site properties set to Low IIS Protection and the
Virtual folder set to High Protection.
IIS Authentication Method for Anonymous user has been edited to use current
user
IIS is set to Cache ISAPI applications.
I also found that the IIS was misbehaving after installing service pack 3. I
could not reliably start and stop the web server. Uninstalling and
reinstalling the IIS cleared this problem up.
"Nate Woolls" <nwo...@maine.rr.com> wrote in message
news:3da26f38$1...@newsgroups.borland.com...
"Nate Woolls" <nwo...@maine.rr.com> wrote in message
news:3da26f38$1...@newsgroups.borland.com...
So, we are trying to run under Apache 2.x too...
"Nate Woolls" <nwo...@maine.rr.com> escreveu na mensagem
news:3da45ceb$1...@newsgroups.borland.com...
"Nate Woolls" <nwo...@maine.rr.com> wrote in message
news:3da45ceb$1...@newsgroups.borland.com...
"Nate Woolls" <nwo...@maine.rr.com> escreveu na mensagem
news:3da759b7$1...@newsgroups.borland.com...