In this SharePoint 2013 tutorial, we will discuss how to resolve the below issue which comes while running a console application using visual studio 2015/2017 to connect to a SharePoint Online site.
We were doing some SharePoint list operation using a console application using visual studio 2015. But while running the code we got the below exception in the ExecuteQuery method which says:
An unhandled exception of type ‘System.Net.WebException’ occurred in Systme.dll.
Additional information: The remote server returned an error: (407) Proxy Authentication Required. The full error looks like below:
The remote server returned an error 407 Proxy Authentication Required
To resolve the issue we have changed the proxy settings like below:
Go to internet options in IE and click on Connections tab -> LAN settings. And here do the below things.
- Check Automatically detect settings
- Uncheck Use automatic configuration script
- Uncheck Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).
Refer fig below:
You may like following SharePoint visual studio tutorials:
- Get all lists and document libraries programmatically using CSOM in SharePoint Online
- Create subsite in SharePoint 2013 Online programmatically using CSOM
- Copy list items from one site collection to another programmatically using CSOM in SharePoint Online
- How to Use CAML Query for Boolean field for SharePoint 2013/2016/Online Object Model CSOM
- How to create index in SharePoint online list using CSOM .Net managed object model code?
- How to add lookup column programmatically using csom in SharePoint online Office 365?
- SharePoint online Read CSV file from document library using .Net managed client object model csom
- Create and Delete a User Custom Action Using CSOM in SharePoint 2013
- Create Update Delete a list using Client Object Model CSOM in SharePoint 2013
Hope this SharePoint tutorial helps to resolve The remote server returned an error 407 Proxy Authentication Required error which comes in SharePoint Online.
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.