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 as follows, but I still get the 407 error.
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<bypasslist>
<clear />
</bypasslist>
<proxy proxyaddress="myproxy:9000"
usesystemdefault="false"
bypassonlocal="true"
autoDetect="False" />
</defaultProxy>
</system.net>
This article features error number Code 407, commonly known as Proxy Authentication Required described as The web request must be authorized before it can take place.
About Status Codes
When you receive web error codes, you may either be having client or server issues. The problem could be related to browser or settings that are blocking your connection, or it can be any other issues related to the server you are trying to access.
To explain the problem further, here are some useful information about web error codes, their symptoms, causes and repair methods.
Definitions (Beta)
Here we list some definitions for the words contained in your error, in an attempt to help you understand your problem. This is a work in progress, so sometimes we might define the word incorrectly, so feel free to skip this section!
- Authentication — Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be.
- Proxy — A proxy is a device or program that stands between two or more interconnected programs or devices
- Request — A request is a message sent by a source to another object.
- Required — Required is an HTML attribute of an input element that forces that the input be supplied.
- Web — Use this tag for general questions related to all aspects of the world wide web
Symptoms of Code 407 — Proxy Authentication Required
Web error codes are also known as http status codes. There are five different classes of http status codes and they always start with the following digits, depending on what kind of error was encountered by the user. These are also the symptoms of the error that the user is experiencing. To explain further, here are the status codes.
4xx: Client Error
This error is sent back to the user when it is a client-side error. The user receives notifications of a bad request, content not found or unauthorized access to the content or something to that effect.
400 — Bad Request
401 — Unauthorized
402 — Payment Required
403 — Forbidden
404 — Not Found
405 — Method Not Allowed
406 — Not Accepted
407 — Proxy Authentication Required
408 — Request Timeout
409 — Conflict
410 — Gone
411 — Length Required
412 — Precondition Failed
413 — Request Entity Too Large
414 — Request-URI Too Long
415 — Unsupported Media Type
416 — Request Range Not Satisfied
417 — Expectation Failed
(For illustrative purposes only)
Causes of Proxy Authentication Required — Error 407
4XX codes are caused by the user or settings from the user’s side. The request was not understood by the server because of wrong address bar entry, incorrect syntax, unstable connection or erroneous OS.
Repair Methods
There are particular troubleshooting steps for particular Web Error codes. However, there are also generalized repair methods users can perform when faced with these kinds of errors.
If a repair method works for you, please click the upvote button to the left of the answer, this will let other users know which repair method is currently working the best.
Please note: Neither ErrorVault.com nor it’s writers claim responsibility for the results of the actions taken from employing any of the repair methods listed on this page — you complete these steps at your own risk.
Method 5 — Uninstall Extensions
- Sometimes, additional Extensions may give you Web Error Codes.
- Uninstall Extensions you recently installed by going to your browser settings and then clicking More Tools.
- You will see extensions than had been installed on your browser, choose the latest addition which you suspected caused the problem you are having.
Method 7 — Other techniques
- You may also check for any unwanted characters on the codes and script by Debug Application Codes and Scripts. If you don’t have any idea how to do it, you may check this resource to do that.
- You may also try to Refresh website. Sometimes, the error you are getting is an old error which has not gone away and a simple refresh by clicking F5 may do the job.
Method 4 — Uninstall Recent Updates
For Windows 7
- Search for Windows Updates on the search bar.
- Click enter when it comes up on the search results.
- Check recent updates and click Uninstall updates on recent dates when the error began happening.
For Windows 8 and Windows 10
- Press the window key and the letter X simultaneously to open Settings
- When you get to Windows settings, click Update & Security.
- Click view installed update history, then Uninstall updates.
Method 2 — Check the Logs
- If you want to check log files, you may do so by first ensuring that you are logged into the web server computer as an Administrator.
- Click Start, then Settings, then click Control Panel.
- Open Administrator Tools and then double-click Internet Services Manager.
- Select the website from the list of different served sites.
- Right click the website and then point your mouse to Properties.
- Select Website tab and then click Properties. On it, you will see General Properties tab. On the bottom of the window, you may see the location of the log files generated.
- Open log files using WordPad, any text file viewer or Microsoft Word.
- Here, you should be able to analyze where you got the errors while accessing a server.
Method 1 — Clear Browser Cache
When accessing a site, data gets stored in the browser cache. Sometimes, you have tried fixing a web error but the same message appears on your browser. In such cases, you need to clear your browser cache to get rid of the annoying message. Here are ways to do that in different kinds of browsers:
- On Google Chrome
- Open Chrome and click the three dots on the upper right portion of your browser
- Click More Tools and then Click Clear browsing data.
- You may choose to delete everything or just a certain browsing period.
- Check the boxes beside Cookies and other site data and Cached images and files.
- Finally, click Clear data.
- On Edge
- Click the … it is the rightmost button just beneath the close button.
- Scroll down and Click Settings.
- Look for Clear browsing data, and click Choose what to clear button.
- It will give you option to choose which type of data you want to clear, just put a check mark on the items you want to include, then click Clear.
- On Mozilla
- Go to History menu and select Clear Recent History.
- You may click the Alt button if the menu bar is hidden.
- You will see a dropdown menu where you can select the period or range you want to delete, click your selection.
- You can click on Details to choose what to clear, whether it be the entire cache or other items.
- Once selected, click Clear now and then reboot the browser to let changes take effect.
Method 3 — Check Requested URL
- There are also times when you manually enter the URL of a site you wish to explore. If you are getting errors after doing this, check the URL you just entered on the address bar if you are indeed accessing the correct address. If not, correct the items you typed incorrectly.
Method 6 — Check for Server Configuration
- This troubleshooting is normally handled by the site admin. If that is you, then you need to have an understanding of Web server configurations.
- You may check which web server is running your site by using URL or domain checkers. You just need to enter the site address and analyze the results that you will get.
- You may also check for broken links by right clicking the webpage and clicking on Inspect. This should give you the code to the site on the right side. You may check each anchor text and see if the links connected to them are still live.
Other languages:
Wie beheben Fehler 407 (Proxy-Authentifizierung erforderlich) — Die Webanfrage muss autorisiert werden, bevor sie stattfinden kann.
Come fissare Errore 407 (Autenticazione proxy Richiesta) — La richiesta web deve essere autorizzata prima che possa aver luogo.
Hoe maak je Fout 407 (Proxy Authenticatie Vereist) — Het webverzoek moet worden geautoriseerd voordat het kan plaatsvinden.
Comment réparer Erreur 407 (Authentification par proxy requise) — La requête Web doit être autorisée avant de pouvoir avoir lieu.
어떻게 고치는 지 오류 407 (프록시 인증 필요) — 웹 요청이 수행되기 전에 승인되어야 합니다.
Como corrigir o Erro 407 (Autenticação de proxy necessária) — A solicitação da web deve ser autorizada antes de ocorrer.
Hur man åtgärdar Fel 407 (Proxy-autentisering krävs) — Webbegäran måste godkännas innan den kan äga rum.
Как исправить Ошибка 407 (Требуется проверка подлинности прокси) — Веб-запрос должен быть авторизован, прежде чем он может быть выполнен.
Jak naprawić Błąd 407 (Uwierzytelnianie proxy wymagane) — Żądanie sieciowe musi zostać autoryzowane, zanim będzie mogło zostać zrealizowane.
Cómo arreglar Error 407 (Se requiere autenticación de proxy) — La solicitud web debe estar autorizada antes de que pueda realizarse.
About The Author: Phil Hart has been a Microsoft Community Contributor since 2010. With a current point score over 100,000, they’ve contributed more than 3000 answers in the Microsoft Support forums and have created almost 200 new help articles in the Technet Wiki.
Follow Us:
Last Updated:
23/12/22 09:20 : A Android user voted that repair method 5 worked for them.
This repair tool can fix common computer problems such as blue screens, crashes and freezes, missing DLL files, as well as repair malware/virus damage and more by replacing damaged and missing system files.
STEP 1:
Click Here to Download and install the Windows repair tool.
STEP 2:
Click on Start Scan and let it analyze your device.
STEP 3:
Click on Repair All to fix all of the issues it detected.
DOWNLOAD NOW
Compatibility
Requirements
1 Ghz CPU, 512 MB RAM, 40 GB HDD
This download offers unlimited scans of your Windows PC for free. Full system repairs start at $19.95.
Article ID: ACX01631EN
Applies To: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000
Speed Up Tip #37
Easy Way to Clean Install Windows:
If your computer constantly freezes and does not respond quickly, maybe it’s time to do a clean install of your Windows operating system. Overloaded system packed with tons of programs can only be remedied with a fresh operating system install. Look for various ways to do this the fastest and most efficient way.
Click Here for another way to speed up your Windows PC
Errors in Alphabetical Order: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Microsoft & Windows® logos are registered trademarks of Microsoft. Disclaimer: ErrorVault.com is not affiliated with Microsoft, nor does it claim such affiliation. This page may contain definitions from https://stackoverflow.com/tags under the CC-BY-SA license. The information on this page is provided for informational purposes only. © Copyright 2018
Errors are one of the most frustrating aspects of running a WordPress site. Some problems like HTTP Error 407 can make your content inaccessible, leading to a drop in sales or conversions.
Luckily, there are some easy steps you can take to resolve this issue, plus tools to help you debug your site. By identifying the root cause of the problem, you can implement the right fix and hopefully prevent it from happening again in the future.
In this article, we’ll take a closer look at the HTTP 407 error and its causes. Then, we’ll show you how to fix it on the client side and server side. Let’s get started!
Check Out Our Video Guide To Fixing HTTP Error 407 “Proxy Authentication Required”
What Does “407 Proxy Authentication Required” Mean?
The “407 Proxy Authentication Required” error occurs when the server is unable to complete a request. This happens due to a lack of authentication credentials when a proxy server is used between the client and server. Essentially, the proxy is unable to authenticate the client.
Since there are multiple parties involved, it can be tricky to identify the exact cause of the problem. It may even be caused by the proxy itself, meaning there is no fix on your end.
However, there are some things that you can do to try to resolve the communication with the proxy.
Note that this problem may also be related to the generic 400 Bad Request error.
Inaccessible content can mean a drop in sales or conversions… but luckily, there are some easy steps you can take to resolve this frustrating error 💪Click to Tweet
What Causes the HTTP Error 407?
HTTP errors happen when a client requests to connect to a server and fails. Anytime a web browser attempts to access an online server through the HTTP protocol, there is a conversation between the client and server. HTTP codes are used to handle that conversation, sending success and failure messages back and forth.
HTTP error 407 is similar to error 401, which occurs due to unauthorized access. The only difference is that error 407 fails authentication with a proxy rather than a direct server connection.
Client authentication is part of the process of establishing a secure connection. One component of this communication is the exchange of a digital certificate. This certificate may be tied to the digital ID of a person, company, program, or individual machine. Servers can approve or deny requests based on the data within a digital certificate and grant or withhold access to connect.
In many cases, a simple connection delay, typo, or code contradiction can lead to a digital ID being misunderstood and rejected. Alternatively, you might not have access to the server.
How To Fix the “407 Proxy Authentication Required” Error
Since there are three different parties involved, you may need to try a few different solutions to resolve HTTP error 407. You may have access to the client and server, but the proxy is likely out of your control.
Hopefully, you’re using an Application Performance Monitoring (APM) software that caught the error before it became a larger problem. There are several powerful APM tools that can help you identify and resolve errors on your site, including our Kinsta APM tool. You can access this from the MyKinsta dashboard.
Now, let’s look at how to identify the cause of HTTP error 407 and resolve the issue. As always, it’s a good idea to perform a backup before making changes to your site.
Fixing a Client-Side Issue
Checking for client-side issues is probably the quickest and easiest place to start. To rule out any oddities, you can try to connect from a different browser or device. For instance, if you get a 407 error on your computer but not your phone, there may be an issue with the device’s digital ID or security program.
If you’ve made changes to your site recently, you may want to undo them and test the connection again. Otherwise, if you have reason to believe it could be a client-side issue, you can try the following steps.
Step 1: Check the URL
First, you’ll want to make sure that you’re entering the correct URL. This may sound silly, but a minor typo can lead to the HTTP 407 error. Therefore, you’ll want to double-check the URL, clear your cache, and try revisiting the website.
Better yet, try using a search engine to pull up the page you’re looking for, rather than typing in the URL directly. If you’re still receiving an authentication error, there is likely an issue on the back end.
Step 2: Deactivate Your Plugins
If you’ve recently made any changes that seem to coincide with the error, that is a good lead to pursue. If the error is happening on your own website, you might want to take a look at any recent plugins, themes, or extensions you have added or updated.
If you’re still able to access your dashboard, go to the Plugins page and deactivate all of your plugins:
Then, try to connect to the site again to see if the error persists. If not, you may have found the source of the problem.
Now, reactive your plugins one at a time and keep refreshing the page. If HTTP error 407 only occurs when a certain plugin is active, there may be some issue with the coding that is preventing you from accessing the proxy server.
If you’re unable to access the WordPress dashboard, you’ll need to connect to your site via a File Transfer Protocol (FTP) client like FileZilla. Once you enter your credentials and connect to your site, navigate to public_html > wp-content and locate the plugins folder.
Then, right-click on the folder and select Rename:
By renaming this folder, you’ll automatically deactivate all plugins on your site. Now, check to see if the error has disappeared. If it has, you can rename the folder back to plugins and log into your WordPress dashboard to reactive your plugins one by one until you find the culprit.
You might want to check to see if there is an update available for the glitchy plugin, as this may resolve the issue. If not, consider reaching out to the developer to see if they’re aware of the problem and if they’re working on a solution.
Step 3: Review and Roll Back Recent Changes
If you can’t find any issues on the client-side that could be causing the problem, the last thing you can do before moving on is to run a restoration. If you can revert the site to a previous instance before the error cropped up, this will determine if the problem was caused by a recent change or an external source.
If possible, run a backup before rolling back so you can return to the current version if the error persists. Otherwise, you may revert back and still encounter the problem, then have to redo your work to return your site to its previous state.
If the error no longer occurs after restoring a backup, this may indicate that a recent modification to your site is causing the issue. If you can think of any likely culprits, you can try testing them first. Otherwise, you’ll need to redo any updates incrementally and check to see if the error returns as a result of a specific change.
Fixing a Server-Side Issue
If none of the above steps resolved HTTP error 407, you may be dealing with a server-side issue. If you have other sites on your server, you can check to see if they are experiencing the same error. This will help confirm if the error is present on a particular site only or if it’s originating on the server.
Let’s look at a few troubleshooting steps to help you resolve error 407 on the server side.
Step 1: Review Error Logs
Error logs record activity on your website and server, including any errors that occur. These logs can show you which connection requests are successful and which are failing.
To access your error logs, open your site’s root folder from your FTP. Then, select the logs folder. Here, you’ll see two options: nginx and php. These folders contain error logs that you can view:
Nginx handles serving, proxying, and caching. Note that if your host uses a different server, the name of this file will be different. Meanwhile, PHP is the scripting language that WordPress runs on. If you search either log for error 407, it may shed some light on why it’s happening and when it started.
Step 2: Check Server Config Files
A common cause for a proxy authentication error is an unexpected redirect. This may look suspicious to a proxy server, causing it to deny access. Therefore, you’ll want to check your web server’s configuration files to see if there are any unintentional redirect instructions.
You can do this by checking the .htaccess file. Using an FTP client, go to your website’s root folder and click on the app folder. Then, select public and you should see the .htaccess file:
Open this file and look for any lines of code that include the term “redirect” or are rewriting URLs. If any of these look suspicious or unnecessary, consider removing them (you may want to make a copy of the file first). Then, check to see if error 407 is still present when you try visiting your site.
Since this code is probably in your .htaccess file for a reason, removing it may cause aspects of your site to stop functioning. However, if this code is the cause of HTTP error 407, you will need to address it. We recommend contacting your hosting provider for assistance.
Step 3: Debug App or Scripts
One last thing you can try is debugging your site. If you’ve recently added custom code or new plugins, there’s a chance that a simple bug could be causing authentication issues. The free Query Monitor can help you comb through the code to look for anything suspicious.
Before you get started, we recommend that you clone your site to a staging environment. This can be easily done using DevKinsta. Then, you can safely try to isolate the events that are triggering error 407.
If you need a little help, you can enable WordPress debugging to get a better look at what is going on. You can also turn on the WordPress debug log to track bugs for you to review later.
Learn how to fix this frustrating error (and keep it from happening again) with help from this guide ✅Click to Tweet
Summary
HTTP Error 407 usually happens when the server is unable to complete a request as the client lacks proper authentication credentials for a proxy server. Since this error can prevent users from accessing your site, you’ll want to fix it straight away.
If the problem occurs on the client side, you can try deactivating your plugins and rolling back recent changes to resolve the issue. If it happens on the server side, you’ll need to check your server configuration files, review your application logs, and debug your apps or scripts.
Either way, the simple fixes above should clear the HTTP error 407, and you will be able to move forward.
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275 PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
Что такое Proxy Authentication Required или Error 407? – это сбой в работе прокси сервисов, которые используются в программах VPN, например, FriGate. Кроме того, ошибка 407 может возникнуть в ряде других программ, которые подключаются к сети через прокси лист: Visual Studio, Key Collector и другие. Однако, наибольшее беспокойство доставляет ошибка HTTP 407 при работе с бесплатными VPN сервисами.
Как исправить Error 407 Proxy Authentication Required? Как настроить компьютер, чтобы решить проблему? Есть ли аналоги программ, которые работают без Proxy? Что делать, если status code 407 Proxy Authentication Required не исчезает? К слову, эта ошибка очень похожа на ошибку 401, только в этом случае ошибка на вашей стороне, а не на стороне сервера. Посмотрите подробный отчет для действий.
Вы спокойно ищите нужную информацию в своем браузере и тут натыкаетесь на ошибку 407. Окошко может иметь разные уведомления, но чаще всего все сводится к следующему: «The request with HTTP status 407: Proxy Authentication Required”. Данное уведомление сообщает, что между вами и сервером возникла ошибка. Причем ошибка 407 возникает только на стороне клиента, т.е. пользователя.
Ошибка 407 FriGate
Чаще всего проблема возникает при использовании плагина FriGate – дополнения, которое работает с помощью прокси. Для чего оно у вас стоит? Скорее всего, вы пытаетесь зайти на сайт, который заблокирован провайдером, роскомнадзором или другими органами, которые контролируют интернет трафик. FriGate – это посредник между вашим браузером и сайтом, который вы хотите открыть. Работает он по принципу VPN. Подключаясь к нему, вы создаете видимость подключения из другой страны.
Например, вы хотите попасть на сайт, который закрыт провайдером. Устанавливая FriGate вы подменяете свое настоящее местоположение фиктивным. Провайдер видит трафик, но обращение идет на посторонний сервер. Не будем углубляться в детали – суть одна, FriGate не работает, и вы видите ошибку 407. В чистом браузере ошибка http 407 возникнуть просто не может. Она возникает только ввиду не работающего соединения с прокси.
Что делать, если в браузере возникла ошибка 407? Как устранить Error 407 Authentication Required? Ниже список шагов, которые актуальны именно для проблемы, которая возникла на стороне браузера.
- Если вы использовали платный прокси – выйдите из аккаунта и войдите снова;
- Если вы использовали FriGate – отключите плагин и удалите его из браузера. Затем установите более свежие и обновляемые VPN сервисы. На крайний случай можно использовать платные VPN или установить браузер Opera? Перейти в приватный режим и включить кнопку VPN в адресной строке. Эффект тот же – ошибка 407 вас больше не затронет.
- Если в браузере чисто – закройте программу VPN. Возможно сервер с прокси сегодня не доступен или сама программа перестала корректно работать.
- Установите для теста бесплатную версию платных прокси серверов или VPN сервисов. Если проблема устранена – отлично, проблема ясна.
- Используйте платные прокси. Стоит это дёшево и если есть на, то необходимость, можно потратить в месяц 1$ для стабильности в трафике.
- Пройдите на сайт определения IP адреса. Если у вас выдает ваш стандартный местный ip адрес – у вас проблемы с VPN 100%.
ВАЖНО: Ошибка 407 возникает ТОЛЬКО со стороны вашего компьютера. Сайт, на который вы не можете зайти тут не при чем! Ошибка возникает ТОЛЬКО если у вас установлены дополнения, прокси сервисы или VPN.
Не нужно «лечить» компьютер перезагрузкой или переустановкой системы. Когда у вас болит палец на ноге, вы же не лечите проблему свечами от геморроя? Так и здесь. Таблетка от проблемы и шаги к исправлению ошибки 407 Proxy Authentication Required указаны выше. Ни реестр, ни система, ни антивирус тут ни при чем. Действуйте.
-
Ошибка 407 в программах, работающих через Proxy
Предположим вы – вебмастер. У вас установлена программа Key Collector, которая работает через прокси для безопасности аккаунтов в Яндекс и Google. Кроме того, программа использует прокси лист для ускорения работы парсера. Вы купили прокси и ввели их в настройках. Другие программы работают по аналогичному принципу. В настройках вы прописываете адрес и данные авторизации.
Что означает ошибка 407 Proxy Authentication Required в программах? На самом деле все просто – либо вы ошиблись при вводе данных авторизации оплаченных прокси, либо ваш прокси лист закончился. Например, вы купили прокси 1 января до 1 марта. Естественно, что вы получите ошибку 407, если сегодня 2 марта. А еще, вы могли попытаться купить прокси как можно дешевле и получили не самый отзывчивый прокси сервер.
Для подобных программ стоит покупать проверенные прокси. Также следует не забывать, что на работе некоторые администраторы ставят защиту от использования подобных программ и прокси. Поэтому, если вы решили «подрабатывать» на работе – займитесь своими прямыми задачами.
Мы помогли вам решить вопрос? Удалось ли вам исправить HTTP 407 Proxy Authentication Required? Если остались вопросы – напишите нам в комментариях с деталями проблемы. В идеале прикрепить скриншот с ошибкой, чтобы наш специалист помог разобраться с проблемой.
When I try to install a software using Ubuntu Software center I get:
Failed to download repository information
Check Your Internet connection
When I try to do a apt-get install something, I get:
407 Proxy Authentication Required
I use a proxy server that requires a user-name and a password.
I have set my systems proxy manually, by plugging in the required numbers in the Networks proxy and applied it system wide. I guess the problem now is plugging in my user-name and password.
When I use INTERNET via Mozilla, it specifically asks me for my user-name and password.
Braiam
66.2k30 gold badges174 silver badges262 bronze badges
asked Dec 19, 2011 at 14:24
For your apt-get to work, you should edit your apt config file:
sudo -H gedit /etc/apt/apt.conf
And add Acquire::http::Proxy "http://username:password@proxyhost:port/";
The syntax shown above should be strictly followed.
This configuration may fail if your username or password has an ‘@’ in it.
You can also add proxy configuration for other protocols such as FTP.
Update: If your username or password has ‘@’ in it you can replace it with %40
Example:If your password is @123 enter it as %40123.
For other characters see this Percent-encoding
answered Dec 21, 2011 at 0:51
jaseemjaseem
6714 silver badges7 bronze badges
5
First set your proxy setting via Linux wizard use option manually and apply setting systemwide just like this wizard box.
Add your proxy environment. These are just example settings…
Open your command prompt login and edit the apt.conf file:
sudo vi /etc/apt/apt.conf
There are already 4 lines of code starting with Acquire key word, edit it like this:
Acquire::http::Proxy "http://username:password@proxyhost:port/";
Acquire::https::Proxy "https://username:password@proxyhost:port/";
Acquire::ftp::Proxy "ftp://username:password@proxyhost:port/";
Note
If your Password contains special characters like @,$,! (e.g. Password: P@ssword) then replace the special characters by their hex code equivalents with % prefix like this:
Acquire::http::Proxy "http://username:p%40ssword@proxyhost:port/";
@==>%40
$==>%24
!==>%21
answered Dec 17, 2013 at 9:16
user226173user226173
2813 silver badges2 bronze badges
2
If you’re behind an enterprise proxy that’s running NTLM authentication, you could use CNTLM:
$ sudo apt-get install cntlm
$ sudo vi /etc/cntlm.conf
Change the default settings (domain, username, password and proxy). Then restart the service:
$ sudo /etc/init.d/cntlm restart
You can now use localhost:3128 (default CNTLM port) as the system-wide proxy for Ubuntu.
Check http://cntlm.sourceforge.net/ for docs.
answered Jun 10, 2013 at 9:42
theogfxtheogfx
511 silver badge2 bronze badges
1
If your user name is separated by space then use:
export http_proxy='http://Pankaj Kumar Pandit:ABCD@192.168.1.1:3128/'
If your user name is not separated by space then use:
export http_proxy=http://Pankaj_Kumar_Pandit:ABCD@192.168.1.1:3128/
The difference is the addition of opening and closing '.
answered Jul 9, 2012 at 8:25
1
I think this tutorial should help you.
Click on Network tab select Manual Proxy Configuration option and enter your proxy server,port details.If you have username,password click on Authentication to enter these details click on ok
(from http://www.ubuntugeek.com/how-to-configure-ubuntu-desktop-to-use-your-proxy-server.html)
To invoke it for all programs launched in a shell I would suggest you either add it to your /etc/bash.bashrc using gksudo gedit /etc/bash.bashrc to apply it system-wide for all bash sessions or to your user-space ~/.bashrc.
As far as Synaptic goes, in the Preferences under the Network tab you seem to be able to set authentification for your proxies. This appears to be specific to Synaptic, though.
answered Dec 19, 2011 at 14:46
bkzlandbkzland
7964 silver badges7 bronze badges
4
One nice alternative is to use Synaptic Package Manager, where you can specify system independent proxy settings and also store username and password.
However, this won’t change proxy for Software Center.
answered Feb 17, 2013 at 20:34
igniteignite
8,6963 gold badges37 silver badges58 bronze badges
In the latest versions of Ubuntu, you can use System Settings > Network > Network Proxy, and when you click "apply system wide" it modifies proxy settings in different places, at least including the /etc/apt/sources.list file, HOWEVER…
It does not have any mechanism to prompt for authentication. No idea why no one has made that part of it yet, but because of this, if you need authentication, you need to put your password and username there too in this format:
username:password@proxy.address
If your password or user name has any special characters in it, including @ or # or ! or whatever, you probably are going to have to use the HTML-ized character code for any of those special characters. See this page for how you can that: http://www.obkb.com/dcljr/charstxt.html
answered Aug 6, 2013 at 21:53
I have made a python script to set the proxy settings in Ubuntu
Assume the following setting, you need to replace at relevant places
- proxy_address 172.16.26.214
- proxy_port 3128
- proxy_username king
- proxy_password queen
I have made a video which takes you through all the steps:
Steps are Detailed here:
- First click on Dash
- In Search Box Enter «Proxy» (Without Quotes)
- Click on «Network» under Applications
- Select «Network Proxy»
- Select Manual
- Enter the proxy address and proxy port
- Apply. Enter your system password to confirm
Download the script setproxy.py
https://pastebin.com/MbBHta8g
Let’s say you have saved the setproxy.py in the Downloads folder
- Open terminal
Type - cd ~/Downloads
General Command:
sudo python setproxy.py proxy_address proxy_port proxy_username proxy_password
For our example
- sudo python setproxy.py
172.16.26.2143128kingqueen
In case of simple proxy Without authentication the command is:
- sudo python setproxy.py
172.16.26.2143128
In case you have python 3 and above run using python2.7
so the commands will look like
- sudo python2.7 setproxy.py
172.16.26.2143128 - sudo python2.7 setproxy.py
172.16.26.2143128kingqueen
answered Jan 3, 2015 at 20:47
1
You can also try the following commands.
For http connection — export:
http_proxy="http://username:password@proxy_server_address:port_no"
For https connection — export:
https_proxy="https://username:password@proxy_server_address:port_no"
And likewise for ftp and other connections.
v2r
9,19911 gold badges47 silver badges51 bronze badges
answered Jun 29, 2014 at 7:20
In my case, I saved apt.conf created based on jaseem’s answer, to home directory instead of /etc/apt and specified the -c option in the apt command.
$ sudo apt -c=~/my-apt.conf update
You can also specify the configuration file path in the environment variable APT_CONFIG.
$ export APT_CONFIG=~/my-apt.conf
$ sudo apt update
answered Apr 2, 2021 at 7:53
cubickcubick
1335 bronze badges
Привет, читатель блога ZametkiNaPolyah.ru! Продолжим знакомиться с протоколом HTTP в рубрике Серверы и протоколы и ее разделе HTTP протокол. Эта запись целиком и полностью посвящена ошибка клиента при взаимодействие по HTTP протоколу. Мы с тобой рассмотрим коды ошибок клиента HTTP. Вообще, коды ошибок клиента в HTTP протоколе могут быть расширены любым сервером, мы рассмотрим только коды ошибок клиента, которые указаны в стандарте HTTP 1.1. Сперва, как и обычно при рассмотрение кодов HTTP протокола, мы дадим общее описания кодам ошибок клиента, а затем рассмотрим по отдельности каждый из 18 HTTP кодов ошибок клиента.
HTTP коды ошибок клиента
Общая информация о HTTP кодах ошибок клиента
Содержание статьи:
- Общая информация о HTTP кодах ошибок клиента
- HTTP код ошибки 400, код ошибки 401, код ошибки клиента 402, код ошибки 403, HTTP код ошибки клиента 404, ошибка клиента 405
- HTTP код ошибки 406, код ошибки 407, HTTP код ошибки клиента 408, код ответа сервера 409, код ошибки 410, код ошибки клиента 411, HTTP код 412
- HTTP код ошибки клиента 413, код ошибки клиента 414, ошибка клиента 415, ошибка 416, HTTP код 417
HTTP коды ошибок клиента говорят пользователю о том, что ему не удалось получить запрашиваемый ресурс, указанный в URI (запись про URI в HTTP), по вине самого пользователя или клиента, например, пользователь ошибся при вводе URL в браузере, в этом случае сервер даст ответ с кодом состояния 404. Все коды ошибок HTTP клиента начинаются с четверки. HTTP сервер всегда в случае ошибки клиента отправляет вместе с кодом состояния пояснения того, почему произошла ошибка, за исключение тех случаев, когда используется HTTP метод HEAD.
Давайте для удобства рассмотрения сведем в одну таблицу все коды ошибок HTTP клиента в одну таблицу. И не будем забывать, что в основе протокола HTTP лежит модель взаимодействия клиент-сервер, которая делит обязанности приложений на клиентские и серверные, рассматриваемый протокол довольно строго придерживается данной модели, и у нас есть специальные коды ошибок, которые происходят по вине серверных приложений и есть коды ошибок, которые происходят по вине человека или клиентского приложения, которым человек пользуется.
| Код ошибки HTTP клиента | Описание кода ошибки HTTP клиента |
| 400 Bad Request | Код состояния ошибки HTTP клиента 400: плохой запрос Такой код состояния ошибки клиента вы можете увидеть тогда, когда сервер не понял ваш запрос из-за синтаксической ошибке в HTTP запросе. |
| 401 Unauthorized | Код состояния ошибки HTTP клиента 401: не авторизован Такой код состояния ошибки клиента вы можете увидеть в том случае, если для доступа к ресурсу требуется аутентификация по соображениям безопасности HTTP сервера. |
| 402 Payment Required | Код состояния ошибки HTTP клиента 402: требуется оплата Этот код состояния ошибки клиента на данный момент пока не используется, он предназначен для платных сервисов, а не для хостингов и интернет-провайдеров. |
| 403 Forbidden | Код состояния ошибки HTTP клиента 403: запрещено Такой код состояния ошибки клиента вы увидите в том случае, когда сервер вас прекрасно понял, но отказывается вам предоставлять доступ к ресурсу из-за того, что у вас недостаточно прав доступа. |
| 404 Not Found | Код состояния ошибки HTTP клиента 404: не найдено Самый популярный код состояния ошибки клиента. Вы его можете увидеть в том случае, когда ошиблись, вводя URL в браузере. |
| 405 Method Not Allowed | Код состояния ошибки HTTP клиента 405: метод не дозволен Данный код состояния ошибки клиента можно увидеть в том случае, когда вы используете метод запроса, запрещенный в настройках HTTP сервера. |
| 406 Not Acceptable | Код состояния ошибки HTTP клиента 406: не приемлем Этот код состояния вы увидите в том случае, когда HTTP сообщение вашего клиента содержит неправильные параметры для указанного в нем URI. |
| 407 Proxy Authentication Required | Код состояния ошибки HTTP клиента 407: требуется установления подлинности через прокси-сервер Если вы видите этот код состояния ошибки клиента, то вам нужно пройти аутентификацию на прокси-сервере. |
| 408 Request Timeout | Код состояния ошибки HTTP клиента 408: истекло время ожидания запроса Этот код состояния ошибки HTTP клиента вы увидите тогда, когда сервер устал ждать от вас сообщение. |
| 409 Conflict | Код состояния ошибки HTTP клиента 409: конфликт Такой код состояния ошибки клиента будет появляться очень редко, когда будет происходить конфликт действий между двумя пользователями. |
| 410 Gone | Код состояния ошибки HTTP клиента 410: удален А этот код состояния ошибки клиента будет показан сервером в том случае, когда ресурс был доступен по указанному URI, но теперь его там нет. |
| 411 Length Required | Код состояния ошибки HTTP клиента 411: требуется длина Этот код состояния ошибки клиента появляется в том случае, когда серверу нужно обязательно указывать поле заголовка Content-Lenght |
| 412 Precondition Failed | Код состояния ошибки HTTP клиента 412: предусловие неверно Сервер вернет HTTP ответ с таким кодом состояния в том случае, когда он не смог выполнить ни одно из условий из запроса клиента. |
| 413 Request Entity Too Large | Код состояния ошибки HTTP клиента 413: объект запроса слишком велик
А такой код ошибки клиента можно увидеть в том случае, когда тело (HTTP объекты и тело сообщения) запроса слишком большое и сервер его получить не смог.
|
| 414 Request-url Too Long | Код состояния ошибки HTTP клиента 414: URI запроса слишком длинный Такой код ошибки клиента сервер выдаст в том случае, если URI запроса слишком длинный. |
| 415 Unsupported Media Type | Код состояния ошибки HTTP клиента 415: неподдерживаемый медиа тип Сервер может выдать такой код состояния ошибки клиента в том случае, если не захочет работать с указанным типом данных (типы данных в HTTP) тем методом, который указан в запросе клиента |
| 416 Requested Range Not Satisfiable | Код состояния ошибки HTTP клиента 416: запрашиваемый диапазон не достижим Данный код и ошибки клиента говорит нам о том, что диапазон фрагмента (единицы измерения в HTTP) в поле заголовка Range указан неверно. |
| 417 Expectation Failed | Код состояния ошибки HTTP клиента 417: ожидаемое неприемлимо Код состояния ошибки клиента 417 появится в том случае, если сервер не сможет удовлетворить значению, указанному в поле заголовка Expect. |
Далее мы рассмотрим более подробно коды ошибок HTTP клиента.
HTTP код ошибки 400, код ошибки 401, код ошибки клиента 402, код ошибки 403, HTTP код ошибки клиента 404, ошибка клиента 405
HTTP код ошибки клиента 400: Bad Request или неверный запрос. Сервер вернет ответ с кодом ошибки 400 в том случае, когда обнаружит, что HTTP запрос клиента содержит синтаксическую ошибку.
HTTP код ошибки клиента 401: Unauthorized или не авторизован. Код ошибки клиента 401 сервер отправляет в том случае, когда для доступа к ресурсу требуется авторизация, при этом ответ HTTP сервера должен (читай про требования HTTP протокола) включать поле заголовка WWW-Authenticate и перечень условий для аутентификации клиента, после чего клиент может повторить запрос к серверу с полем Authorization, в котором будут указаны все необходимые данные для авторизации.
HTTP код ошибки клиента 402: Payment Required или требуется оплата. Данный код ошибки клиента зарезервирован для будущего использования и предназначен для оповещения клиента о том, что для доступа к ресурсу ему необходимо произвести оплату. Обратите внимание: данный код ошибки клиент не используется ни хостингами, ни интернет-магазина, ни даже интернет-провайдерами.
HTTP код ошибки клиента 403: Forbidden или запрещено. HTTP код ошибки клиента 403 отправляется сервером в том случае, когда он отказывается выполнить ваш запрос, причин на то могут быть разными. При этом сервер не должен сообщать является ли эта мера временной или постоянной. Одной из причин появления HTTP кода 403 может быть то, что у пользователя недостаточно прав доступа к ресурсу.
HTTP код ошибки клиента 404: Not Found или не найдено. HTTP код ошибки клиента 404 – самый популярный код ошибки клиента, код ошибки 404 видел, наверное, каждый. Ведь для того, чтобы увидеть код ошибки 404 достаточно ввести неверный URL.
HTTP код ошибки клиента 405: Method Not Allowed или метод не дозволен. Код ошибки 405 сервер отправляет клиенту в том случае, когда для ресурса, указанного в URI, нельзя применить метод, указанный в запросе клиента. Код ошибки 405 появляется в основном из-за конфигураций безопасности сервера, когда администратор преднамеренно запрещает выполнение тех или иных методов HTTP запросов на сервере. При этом ответ сервера с кодом ошибки 405 должен содержать поле заголовка Allow, в котором будут указаны доступные метода для ресурса.
HTTP код ошибки 406, код ошибки 407, HTTP код ошибки клиента 408, код ответа сервера 409, код ошибки 410, код ошибки клиента 411, HTTP код 412
HTTP код ошибки клиента 406: Not Acceptable или не приемлем. Код ошибки 406 говорит клиенту о том, что введенный URI не приемлем с теми характеристиками, которые были указаны в HTTP заголовке (читай про параметры HTTP протокола). Если метод запроса был отличным от метода HEAD, то серверу нужно включить в тело сообщения список доступных характеристик для данного URI. Формат HTTP объекта определяется медиа типом в поле заголовка Content-Length и в зависимости от клиента и его возможностей подходящий вариант запроса может быть выбран автоматически, этот код применяется при обсуждении содержимого в HTTP.
HTTP код ошибки клиента 407: Proxy Authentication Required или требуется установление подлинности через прокси-сервер. HTTP код ошибки клиента 407 появится в том случае, когда клиенту для доступа к указанному ресурсу необходимо авторизоваться на прокси-сервере. Когда возникает код ошибки 407 прокси-сервер должен возвратить поле заголовка Proxy-Authenticate содержащее вызов (challenge), применяемый прокси-сервером для запрошенного ресурса. Код ошибки 407 аналогичен по своему действию с кодом 401.
HTTP код ошибки клиента 408: Request Timeout или истекло время ожидания запроса. Код ошибки 408 возникает в том случае, когда клиент не произвел запрос в течение того времени, которое сервер готов ждать, но клиент может повторить запрос.
HTTP код ошибки клиента 409: Conflict или конфликт. Код ошибки клиента 409 возникает в том случае, когда происходит конфликт между несколькими клиентами при доступе к одному ресурсу. Код ошибки 409 показывается клиенту только в том случае, когда тот может устранить конфликт и повторить свой запрос. HTTP ответ сервера должен предоставить максимум информации для пользователя, чтобы он устранил конфликт, и код 409 больше не появлялся. Чаще всего ошибка 409 появляется при использование метода PUT.
HTTP код ошибки клиента 410: Gone или удален. HTTP код ошибки клиента 410 будет отправлен сервером в том случае, когда ресурс удален и сервер не знает, где искать копию ресурса или его новую версию. В том случае, когда у сервера есть информация о том, что ресурс может быть восстановлен, ему не следует показывать ошибку 410, а лучше показать код ошибки 404.
HTTP код ошибки клиента 411: Length Required или требуется длина. Код ошибки 411 будет показан клиенту в том случае, когда серверу для корректной обработки запроса требуется длина содержимого. Клиент может повторить запрос, если добавит допустимое поле заголовка Content-Length, содержащее длину тела сообщения (message-body) в сообщении запроса.
HTTP код ошибки клиента 412: Precondition Failed или предусловие неверно. Код ошибки 412 будет выслан клиенту сервером в том случае, когда сервер не может выполнить условия, указанные в заголовке HTTP запроса.
HTTP код ошибки клиента 413, код ошибки клиента 414, ошибка клиента 415, ошибка 416, HTTP код 417
HTTP код ошибки клиента 413: Request Entity Too Large или объект запроса слишком большой. Код ошибки 413 появляется в том случае, когда объект, передаваемый в запросе клиента слишком большой и сервер его не может обработать. Сервер может закрыть соединение (здесь написано про HTTP соединения), чтобы не дать клиенту возможность продолжить запрос. Если такая ситуация временная, то сервер в своем сообщении вместе кодом ошибки 413 передает поле заголовка Retry-After, в котором указывает время, через которое запрос может быть повторен.
HTTP код ошибки клиента 414: Request-URI Too Long или запроса слишком длинный. Сервер отправляет сообщение с кодом ошибки 414 в том случае, когда URI, указанный в запросе слишком длинный. Ошибка 414 обычно возникает тогда, когда клиент пытается передать кучу параметров методом GET, а следовало бы использовать метод POST.
HTTP код ошибки клиента 415: Unsupported Media Type или неподдерживаемый медиа тип. Код ошибки 415 сервер отправляет в том случае, когда он отказывается обслуживать запрос из-за некорректного типа данных для ресурса, который указан в URI: когда метод выбранный в запросе не соответствует типу данных ресурса.
HTTP код ошибки клиента 416: Requested Range Not Satisfiable или запрашиваемый диапазон не достижим. Сервер отправит сообщение с кодом ошибки 416 в том случае, когда в поле заголовка запроса Range был указан неверный диапазон фрагмента.
HTTP код ошибки клиента 417: Expectation Failed или ожидаемое неприемлемо. Код ошибки 417 появляется в том случае, когда сервер не может удовлетворить значению Expect, которое указано в заголовке HTTP запроса.
Мы рассмотрели коды ошибок HTTP клиента, давайте перейдем к последнему классу кодов состояния — HTTP коды ошибок серевра. Позволю себе напомнить, что в HTTP еще есть информационные коды состояния, успешные коды состояния и коды перенаправления. А если тебе нужна информацию обо всех кодах состояния, обратись к справочнику HTTP кодов состояния, в котором есть полное описание всех кодов.
Не забывайте делиться своим мнением в комментариях и оставлять отзывы, это поможет сделать нашу работу лучше, с уважением ZametkiNaPolyah.ru!
Comments
karelz
changed the title
Simple .NET app throws (407) Proxy Authentiation Required. Related to https://github.com/PowerShell/PowerShell/issues/9495#issuecomment-627207665
Simple .NET app throws (407) Proxy Authentiation Required
May 12, 2020
karelz
added
documentation
Documentation bug or enhancement, does not impact product or test code
and removed
untriaged
New issue has not been triaged by the area owner
labels
May 12, 2020
msftbot
bot
locked as resolved and limited conversation to collaborators
Dec 13, 2020










