This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > July 2006 > Proxy, and ServerHTTPRequest





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Proxy, and ServerHTTPRequest
lallous

2006-07-10, 7:11 pm

Hello

I am using IID_IXMLDOMDocument2 interface with ServerHTTPRequest enabled in
order to load XML files from HTTP locations.

I read about using the "Proxycfgc" to set appropriate proxy settings so it
works when user accesses internet through the proxy.

Is there is a way to have MSXML behave like IE's settings w/o having to
manually adjust the proxy settings either programmatically or through the
"Proxycfgc" tool.

--
Elias


Anthony Jones

2006-07-10, 7:11 pm


"lallous" <lallous@lgwm.org> wrote in message
news:%23pmcY42mGHA.3588@TK2MSFTNGP04.phx.gbl...
> Hello
>
> I am using IID_IXMLDOMDocument2 interface with ServerHTTPRequest enabled

in
> order to load XML files from HTTP locations.
>
> I read about using the "Proxycfgc" to set appropriate proxy settings so it
> works when user accesses internet through the proxy.
>
> Is there is a way to have MSXML behave like IE's settings w/o having to
> manually adjust the proxy settings either programmatically or through the
> "Proxycfgc" tool.
>


Yes don't enable ServerHTTPRequest. :)

Basically MS have provided two different HTTP stacks. Wininet and WinHTTP.

Wininet is designed for client-side use and many of it's settings are found
in the internet options dialog such as Proxy settings. It is used by IE and
by default MSXML. It also manages the temporary internet file cache and
expects to run in the context of a user profile.

WinHTTP is a more direct (or lighter) stack designed to be used server-side,
it is threadsafe, does not support a cache and does not expect to run in a
user profile. Since many internet options (like proxy settings) are stored
in the user profile WinHTTP does not use them. WinHTTP is the stack used by
the ServerXMLHTTP object and by the DOM when the ServerHTTPRequest property
is enabled.

If your app is a clientside user app where thread safety is not an issue
stop using ServerHTTPRequest. If not you need to continue to use it but
have to accept the WinHTTP is a complete separate API and does not recognise
the settings normally used to configure Wininet.

Anthony.

> --
> Elias
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews