HTTP Request 
Author Message
 HTTP Request

Hi Expert!

  I have following problem:

  I write ATL component which execute HTTP requests.

  Inside component I use MFC classes CHttpConnection,
  CHttpFile, CInternetSession.

  I use GetHttpConnection, OpenRequest, SendRequest
  and receive result HTTP file.

  A problem in using this component in ASP:
  If I run first any other asp page , in this site, after restart IIS ,
  and after this I run page ASP which use HTTP component
  all work correctly.

  If after restart IIS I run first page which use HTTP component the page
don't respond(stuck) .

  After logging I detect that component stuck after command :

  CHttpFile.SendRequest

  Thanks



Fri, 10 Oct 2003 22:24:06 GMT  
 HTTP Request
The MFC classes (CHttpConnection, etc...) are wrappers around the WinInet
library.  WinInet was designed for client-side use (Internet Explorer) and
is not supported in server-side applications.  See the following KB article
for more details:

http://support.microsoft.com/support/kb/articles/Q238/4/25.ASP

Therefore, you have 3 options:

1. You can implement your own HTTP using Winsock (means you have to write
all the grungy HTTP protocol stuff yourself - yuck).
2. Purchase a third-party HTTP component that does NOT wrap WinInet.
3. Use the relatively new ServerXMLHTTP object found in the MSXML 3.0
library (even though it's from an XML library, it's perfectly suitable for
normal server-side HTTP communication).

Personally, I'd go with #3.

Andy


Quote:
> Hi Expert!

>   I have following problem:

>   I write ATL component which execute HTTP requests.

>   Inside component I use MFC classes CHttpConnection,
>   CHttpFile, CInternetSession.

>   I use GetHttpConnection, OpenRequest, SendRequest
>   and receive result HTTP file.

>   A problem in using this component in ASP:
>   If I run first any other asp page , in this site, after restart IIS ,
>   and after this I run page ASP which use HTTP component
>   all work correctly.

>   If after restart IIS I run first page which use HTTP component the page
> don't respond(stuck) .

>   After logging I detect that component stuck after command :

>   CHttpFile.SendRequest

>   Thanks



Sat, 11 Oct 2003 01:58:02 GMT  
 HTTP Request

Quote:

> 2. Purchase a third-party HTTP component that does NOT wrap WinInet.

Do you know of any?

I've been looking for one and not found anything suitable - I need only
fairly basic server-side HTTP handling but the same codebase must support
both Win32 and a proprietary (unix-like) embedded environment (which does
at least have a sockets library).

Cheers,
 Daniel.



Sat, 11 Oct 2003 16:52:49 GMT  
 HTTP Request
check out libwww
http://www.w3.org/Library/

/johan


Quote:

> > 2. Purchase a third-party HTTP component that does NOT wrap WinInet.

> Do you know of any?

> I've been looking for one and not found anything suitable - I need only
> fairly basic server-side HTTP handling but the same codebase must support
> both Win32 and a proprietary (unix-like) embedded environment (which does
> at least have a sockets library).

> Cheers,
>  Daniel.



Sat, 11 Oct 2003 17:29:35 GMT  
 HTTP Request
I think ServerObjects (www.serverobjects.com) might have something suitable,
but it's been awhile since I've been to their site, although they ship COM
objects so that won't help your Unix dilemma.

I also have some C++ classes I built that are about 90-95% complete and
provide HTTP functionality on top of Winsock; however, it has enough Win32
API calls that would make it a bit of work to play on Unix too.

What do you need to do... just query other web servers for HTTP data?

Andy


Quote:

> > 2. Purchase a third-party HTTP component that does NOT wrap WinInet.

> Do you know of any?

> I've been looking for one and not found anything suitable - I need only
> fairly basic server-side HTTP handling but the same codebase must support
> both Win32 and a proprietary (unix-like) embedded environment (which does
> at least have a sockets library).

> Cheers,
>  Daniel.



Sun, 12 Oct 2003 10:57:37 GMT  
 HTTP Request

Quote:

> What do you need to do... just query other web servers for HTTP data?

No, to provide a simple HTTP /server/ that can respond to one or two specific
forms of POST. Very simple CGI, basically. I might also support a GET request
for a status page....?

Cheers,
 Daniel.



Mon, 13 Oct 2003 07:07:03 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. HELP: Intercepting HTTP Request, Showing Login Page, and Continuing with Original Request

2. problem sending http request.

3. problem posting http request through StreamWriter

4. XML HTTP request

5. Listing all HTTP requests from a WebBrowser control

6. HTTP Request pooling?

7. doin a http-request

8. HTTP Request

9. HTTP requests throught a proxy server???

10. Sending/Receiving HTTP requests

11. Problem with file transfer through HTTP request

12. POST/GET parameters in HTTP request

 

 
Powered by phpBB® Forum Software