Re: 405 error is because of what?
<shrikant.gurav11@gmail.com> wrote in message
news:bbb214dc-62ff-491a-98fc-51b45b673235@i3g2000hsf.googlegroups.com...
Hello,
I am try to connect web server but if i have all acesses
(INTERNET_OPEN_TYPE_DIRECT) then it is ppossible to get and post the
data but if I use INTERNET_OPEN_TYPE_PROXY then it is not possible to
get the data.
i am giving it Proxy name and port like proxy:port, and giving user
name and password also but still 405 ect error r comming.
Is this comming because method with i am using is wrong or server will
send me this because of the Server will not allow this type of GET /
POST using PROXY.
What are the basic need to acusse Web server unsing WININET
Here's the code I've used with a proxy:
CInternetSession isession ("TestClient");
CHttpFile *pFile = NULL;
TRY
{
if ( !strProxyAddress.IsEmpty() ) // this is the proxy address
{
// set proxy server
INTERNET_PROXY_INFO ProxyInfo;
ProxyInfo.dwAccessType = INTERNET_OPEN_TYPE_PROXY;
ProxyInfo.lpszProxy = strProxyAddress;
ProxyInfo.lpszProxyBypass = strProxyAddress;
DWORD dwSize = sizeof(ProxyInfo);
VERIFY ( isession.SetOption ( INTERNET_OPTION_PROXY, &ProxyInfo,
dwSize ) );
}
-- David