http-status-code-407

Proxy authentication required (http error 407) with WinHttpRequest and proxy with integrated Windows authentication and https

二次信任 提交于 2020-06-16 17:08:53
问题 I'm trying to access an external website from my company network using WinHttpRequest from VBA. The company has a proxy server that requires integrated Windows authentication. The following code works if I try to access a URL with plain http, but I get http status code 407 - proxy authentication required if I try to access a URL with https. What do I need to do to make the code work with https? Sub a() Dim w As New WinHttp.WinHttpRequest 'set proxy w.SetProxy 2, "myproxy:8080" 'use integrated

Proxy authentication required (http error 407) with WinHttpRequest and proxy with integrated Windows authentication and https

橙三吉。 提交于 2020-06-16 17:08:32
问题 I'm trying to access an external website from my company network using WinHttpRequest from VBA. The company has a proxy server that requires integrated Windows authentication. The following code works if I try to access a URL with plain http, but I get http status code 407 - proxy authentication required if I try to access a URL with https. What do I need to do to make the code work with https? Sub a() Dim w As New WinHttp.WinHttpRequest 'set proxy w.SetProxy 2, "myproxy:8080" 'use integrated

Proxy authentication required (http error 407) with WinHttpRequest and proxy with integrated Windows authentication and https

我只是一个虾纸丫 提交于 2020-06-16 17:06:32
问题 I'm trying to access an external website from my company network using WinHttpRequest from VBA. The company has a proxy server that requires integrated Windows authentication. The following code works if I try to access a URL with plain http, but I get http status code 407 - proxy authentication required if I try to access a URL with https. What do I need to do to make the code work with https? Sub a() Dim w As New WinHttp.WinHttpRequest 'set proxy w.SetProxy 2, "myproxy:8080" 'use integrated

407 Authentication required - no challenge sent

人走茶凉 提交于 2019-12-18 13:37:27
问题 Update: If you've just arrived at this question, the general gist is that I'm trying to make a HttpWebRequest via a proxy, and I'm getting a 407 from our strange proxy server. IE,Firefox,Chrome all manage to negotiate the proxy sucessfully, as do Adobe Air applications. It may be important that the Google Chrome web installer actually fails and we have to use an offline installer. Thanks to Ian's link I've got it getting through to the next stage. It is now sending a token back to the proxy,

The remote server returned an error: (407) Proxy Authentication Required

半腔热情 提交于 2019-12-17 17:35:15
问题 I'm getting this error when I call a web service: "The remote server returned an error: (407) Proxy Authentication Required". I get the general idea and I can get the code to work by adding myProxy.Credentials = NetworkCredential("user", "password", "domain"); or by using DefaultCredentials in code. My problem is that the call to the web service works in production without this. It seems like there is a non code solution involving Machine.config, but what is it? At the moment I can't get to

Configuring Fiddler to use company network's proxy?

一世执手 提交于 2019-12-17 15:36:17
问题 I'm trying to get Fiddler to work with my company's proxy. Every external request is returning 407. So far I've tried adding oSession.oRequest["Proxy-Authorization"] = "YOURCREDENTIALS"; to the customized rules where I used my USERNAME:PASSWORD in base64. Still no luck. Any ideas? Thanks. 回答1: Note: There is an answer with a higher voting available. Because of SO sorting it is below the accepted answer. I had the same problem, too, and solved it like this: Started Fiddler with it's standard

Proxy Basic Authentication in C#: HTTP 407 error

一笑奈何 提交于 2019-12-17 04:52:31
问题 I am working with a proxy that requires authentication, i.e., in a browser if I try to open a page it will immediately ask for credentials. I supplied same credentials in my program but it fails with HTTP 407 error. Here is my code: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); IWebProxy proxy = WebRequest.GetSystemWebProxy(); CredentialCache cc = new CredentialCache(); NetworkCredential nc = new NetworkCredential(); nc.UserName = "userName"; nc.Password = "password"; nc

The remote server returned error: (407) Proxy Authentication Required

大城市里の小女人 提交于 2019-12-12 08:49:59
问题 I use this code with .NET 3.5 and receive error "The remote server returned an error: (407) Proxy Authentication Required." using (WebClient client = new WebClient()) { WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultCredentials; try { string webPageStr = client.DownloadString(URL); Console.WriteLine("OK"); } catch (Exception ex) { Console.WriteLine("FAIL"); Console.WriteLine(ex.Message); } } However, this code works smoothly with .NET 4.0 as this line is sufficient to pass

HttpClient 4.2.2 and proxy with username/password

白昼怎懂夜的黑 提交于 2019-12-04 14:47:38
问题 I have a problem with HttpClient 4.2.2 and proxy with username/password. HttpClient works in this way: List item Send request without proxy stuff (however I set proxy parameters for each request) Get response from Squid with 407 error Send request with proxy stuff It's very strange behavior, Is it possible to add info about proxy to each request? I've tried to add hardcoded "Proxy-Authorization" header to each request and it works fine, why HttpClient can't do the same? Java code

The remote server returned an error: (407) Proxy Authentication Required

这一生的挚爱 提交于 2019-11-28 04:03:10
I'm getting this error when I call a web service: "The remote server returned an error: (407) Proxy Authentication Required". I get the general idea and I can get the code to work by adding myProxy.Credentials = NetworkCredential("user", "password", "domain"); or by using DefaultCredentials in code. My problem is that the call to the web service works in production without this. It seems like there is a non code solution involving Machine.config, but what is it? At the moment I can't get to the production box's machine.config file to see what that looks like. I tried updating my machine.config