Proxy Authentication error
I have a connection made to the internet :-
remoteFile = session.OpenURL(urlPath, 1 ,
AfxMessageBox("Received Exception from OpenURL()");
// Handle exception
This all works fine, and then I wish to download the file using :-
if (remoteFile == NULL)
cout << "Error in OpenURL";
cout << "Ok in OpenURL";
// Read from file
while (nBytesRead = remoteFile->Read(inBuf, sizeof(inBuf)))
When I run the software at home all works fine and the file (Excel) is downloaded successfully.
However, at work I'm getting Proxy Authentication error, i.e. the software cannot go out through the gateway.
The Windows Administrator tells me that if I can type the URL in IE browser and a pop-up comes up with Save As, Open etc, and later the file is downloading, then it must be my process. However, as I said this works at home ok.
Also, I should mention that when I use the same process at work (or home) to point to URLs ending with .html (obviously no dialog boxes appear), then all ok.
FYI: whether I try to download the file manually or using the automated process - in both cases I'm logged to the server as the same user who has permissions to download files from the Internet.
Any ideas what it might be ? Is OpenURL, or remoteFile->Read works differently from html to Excel files ?
Last edited by ami; 09-06-2009 at 03:02 PM.
you need to also give your proxy username and proxy password to your call
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
LPCTSTR pstrUserName = NULL,
LPCTSTR pstrPassword = NULL
Your browser might be configured to take this automatically...
Life is a short warm moment -
Death is the long cold rest.
By vrijdag in forum VB Classic
Last Post: 12-30-2006, 06:43 AM
By Khalizan in forum VB Classic
Last Post: 11-28-2001, 02:32 AM
By Andrew McLellan in forum Java
Last Post: 05-09-2001, 06:34 PM
By Chris.G in forum VB Classic
Last Post: 11-13-2000, 04:16 PM
By Murray Foxcroft in forum Web
Last Post: 11-02-2000, 03:42 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL