0
votes

I use Visual Studio 2019 and I program in .NET C #

So far everything has worked out great for me! But when I tried to learn something new in RAZOR PAGE I could not do CRUD.

After reading one of the answers, I deleted the entire .NUGET IN C: / users folder

I do not remember what the first error message was but I am currently stuck with an error message:

[Package source] Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream.

1

1 Answers

1
votes

Try these suggestions:

1) close VS, delete the whole nuget.config file under C:\Users\xxx\AppData\Roaming\NuGet and then restart VS to re-generate it. Then, try to install nuget packages again.

2) open powershell as Administrator, run these:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:64
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:64

Restart VS to test again.