Discussion:
HttpSendRequest returning ERROR_ALREADY_EXISTS
(too old to reply)
John D.
2008-06-27 18:37:07 UTC
Permalink
Hello,

I am transfering data from a client to server via calls to HttpSendRequest.
The server returns success or any errors via XML returned after the
HttpSendRequest call. Usually this has no problems, but our Japanese
customers are encountering sporadic errors and I've traced it down to
HttpSendRequest failing and GetLastError reports ERROR_ALREADY_EXISTS (183).

What could cause HttpSendRequest to return ERROR_ALREADY_EXISTS? I'm also
looking for how to get around it. Our server side components don't seem to
think that there was any problem, so I'm guessing that the call made it to
the server and something caused a problem on the way back. I'm not sure I
can retry the call since as far as the server is concerned, it already
succeeded.

Any help will be appreciated.

John
Volodymyr M. Shcherbyna
2008-06-28 13:59:06 UTC
Permalink
Usually HttpSendRequest sets errors basing on wininet INTERNET_ERROR_BASE
define, which is 12000 for WinInet. So I suspect that this error was not
directly set by HttpSendRequest function. Sounds like something between
wininet and nic is blocking connection in illegal way, so that the upper
client (wininet) has no idea about cause of failure. Can you get
coniguration of clients machine? I.e., list of all software, all lsps, all
drivers installed? Having the configuration, you may test your code with
components which are installed on clients machine. Usually I encounter
problems coming from third party firewalls.
--
Volodymyr, blog: http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
Post by John D.
Hello,
I am transfering data from a client to server via calls to
HttpSendRequest.
The server returns success or any errors via XML returned after the
HttpSendRequest call. Usually this has no problems, but our Japanese
customers are encountering sporadic errors and I've traced it down to
HttpSendRequest failing and GetLastError reports ERROR_ALREADY_EXISTS (183).
What could cause HttpSendRequest to return ERROR_ALREADY_EXISTS? I'm also
looking for how to get around it. Our server side components don't seem to
think that there was any problem, so I'm guessing that the call made it to
the server and something caused a problem on the way back. I'm not sure I
can retry the call since as far as the server is concerned, it already
succeeded.
Any help will be appreciated.
John
John D.
2008-06-30 17:06:01 UTC
Permalink
This error is coming from one of our customers sites. I can try to get the
configuration, but I don't believe that will solve the issue. From what I
have heard, the user is running behind a proxy server so I believe your
assumtion is correct. However, I'm looking for a way to handle the error
since I can't count on the validity of the customers network. It is strange,
although not unheard of, that most of the sends work and the problem occurs
only sporadically.

There are two things that I'm looking at:
1. Can I do something programatically before the call to ensure that I don't
get the error?
2. If not, then what would the recommended procedure be to handle the errors
when they do occur?

In case of an error, would the best thing be to assume that the entire
request had failed, dump the current hRequest, create a new request with
OpenRequest and retry the HttpSenRequest? Or is there something that can be
done with the current hRequest?

Thanks,
John
Post by Volodymyr M. Shcherbyna
Usually HttpSendRequest sets errors basing on wininet INTERNET_ERROR_BASE
define, which is 12000 for WinInet. So I suspect that this error was not
directly set by HttpSendRequest function. Sounds like something between
wininet and nic is blocking connection in illegal way, so that the upper
client (wininet) has no idea about cause of failure. Can you get
coniguration of clients machine? I.e., list of all software, all lsps, all
drivers installed? Having the configuration, you may test your code with
components which are installed on clients machine. Usually I encounter
problems coming from third party firewalls.
--
Volodymyr, blog: http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
Post by John D.
Hello,
I am transfering data from a client to server via calls to
HttpSendRequest.
The server returns success or any errors via XML returned after the
HttpSendRequest call. Usually this has no problems, but our Japanese
customers are encountering sporadic errors and I've traced it down to
HttpSendRequest failing and GetLastError reports ERROR_ALREADY_EXISTS (183).
What could cause HttpSendRequest to return ERROR_ALREADY_EXISTS? I'm also
looking for how to get around it. Our server side components don't seem to
think that there was any problem, so I'm guessing that the call made it to
the server and something caused a problem on the way back. I'm not sure I
can retry the call since as far as the server is concerned, it already
succeeded.
Any help will be appreciated.
John
Loading...