Reputation: 2732
I am getting the following error when I try to load nget:
Unable to load the service index for source https://api.nuget.org/v3/index.json. The ServicePointManager does not support proxies with the https scheme.
Also, in Linqpad, I am getting a similar error:
ServicePointManager does not support proxies with the https scheme
Does anyone have any solutions for this? I found this post, but that solution, clearing the temp folders, did not fix my problem. Please help! Thanks!
Upvotes: 1
Views: 4331
Reputation: 825
To solve this error in my case I dit not change the file in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config as others suggest since I don't use Fiddler, Instead I did navigate to C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE and opened the file devenv.exe.config ad an admin. In the file I located the section and changed is as shown below Before:
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
After:
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
<defaultProxy> <proxy usesystemdefault="False"/> </defaultProxy>
</system.net>
Upvotes: 0
Reputation: 71
Fiddler was the culprit in my case too. I had to comment proxy settings from machine.config residing in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config.
<system.net>
<!-- <defaultProxy enabled="true" useDefaultCredentials="true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false"/>
</defaultProxy> -->
</system.net>
Upvotes: 1
Reputation: 2732
Found the problem! I basically just needed to remove the proxy setting from nuget and it looks like the command line was the best place for it. Thanks to @Leo-MSFT for the helpful suggestions.
Update: [8/8/2017] The problem has reemerged but this time, my fix won't save me since its still applied. I've checked all 3 spots for the nuget proxy settings and its still not working. I have no idea what's wrong now. Grrrr!!!!
Update: [8/8/2017, part deux] Found it! I had fiddler set in the machine.config as well, so make sure to check that if you are prone to forgetfulness like I am.
<system.net>
<!-- <defaultProxy
enabled = "true"
useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>-->
</system.net>
Upvotes: 2
Reputation: 76670
The ServicePointManager does not support proxies with the https scheme.
Since you have proxy configured in the web.config, you may need to pay attention to the syntax of proxy.
You will also get this error if you set something like this in your web.config file: proxyAddress="127.0.0.1:8888"
You need list the scheme like this: proxyAddress="http://127.0.0.1:8888"
(Add http://). The only scheme that is recognized by this class is http.
Besides, since you have proxy configured in you machine, NuGet will fail to access to the server. You should add proxy settings into Nuget.Config file, goto %AppData%\NuGet\NuGet.config
, add below settings:
<config>
<add key="HTTP_PROXY" value="http://127.0.0.1:8888" />
</config>
You can refer to the NuGet Proxy Settings for more detailed info.
Upvotes: 2