Discussion:
HttpSenRequest, stop during processing
(too old to reply)
Francis Llacer
2008-05-22 13:37:02 UTC
Permalink
Hi,

In my application, I use following Wininet functions :
InternetOpen,
InternetConnect,
HttpOpenRequest,
HttpSendRequest.

In my case, a call to HttpSendRequest take about five seconds (that's
normal) and I would like to implement a function witch can stop or kill this
request.
I tried to call HttpEndRequest on the handle given to HttpSendRequest during
the five seconds but it doesn't stop the HTTP request.

Is it possible ?
Some idea ?
Volodymyr M. Shcherbyna
2008-05-22 15:36:32 UTC
Permalink
Microsoft recommends two solutions for this problem.

1. Move to async model of WinInet
OR
2. Close handle by using InternetCloseHandle(..) on a pending operation
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Francis Llacer
Hi,
InternetOpen,
InternetConnect,
HttpOpenRequest,
HttpSendRequest.
In my case, a call to HttpSendRequest take about five seconds (that's
normal) and I would like to implement a function witch can stop or kill this
request.
I tried to call HttpEndRequest on the handle given to HttpSendRequest during
the five seconds but it doesn't stop the HTTP request.
Is it possible ?
Some idea ?
Francis Llacer
2008-05-23 09:09:01 UTC
Permalink
Thanks for your answer.
I've got another one :
I use Wininet to reach my website and authenticate a user. That's OK.
But when I want to perform an action, where authentication is needed, my
website reject me because it can't retrieve the session variable in "Session
object" of my form-based authentication IIS server (session variable contain
user authenticated information).
I use InternetConnect to keep a Handle for the HTTP session, but it seems
that's not enough...
Post by Volodymyr M. Shcherbyna
Microsoft recommends two solutions for this problem.
1. Move to async model of WinInet
OR
2. Close handle by using InternetCloseHandle(..) on a pending operation
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Francis Llacer
Hi,
InternetOpen,
InternetConnect,
HttpOpenRequest,
HttpSendRequest.
In my case, a call to HttpSendRequest take about five seconds (that's
normal) and I would like to implement a function witch can stop or kill this
request.
I tried to call HttpEndRequest on the handle given to HttpSendRequest during
the five seconds but it doesn't stop the HTTP request.
Is it possible ?
Some idea ?
Volodymyr M. Shcherbyna
2008-06-03 13:47:55 UTC
Permalink
With "keep alive" flag?
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Francis Llacer
Thanks for your answer.
I use Wininet to reach my website and authenticate a user. That's OK.
But when I want to perform an action, where authentication is needed, my
website reject me because it can't retrieve the session variable in "Session
object" of my form-based authentication IIS server (session variable contain
user authenticated information).
I use InternetConnect to keep a Handle for the HTTP session, but it seems
that's not enough...
Post by Volodymyr M. Shcherbyna
Microsoft recommends two solutions for this problem.
1. Move to async model of WinInet
OR
2. Close handle by using InternetCloseHandle(..) on a pending operation
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Francis Llacer
Hi,
InternetOpen,
InternetConnect,
HttpOpenRequest,
HttpSendRequest.
In my case, a call to HttpSendRequest take about five seconds (that's
normal) and I would like to implement a function witch can stop or kill this
request.
I tried to call HttpEndRequest on the handle given to HttpSendRequest during
the five seconds but it doesn't stop the HTTP request.
Is it possible ?
Some idea ?
Loading...