Share via

NU1301 Error - Unable to Restore NuGet Package from private Artifactory Feed.

Ashwridh Puligari 0 Reputation points
2026-03-27T18:20:00.46+00:00

I am facing an issue while restoring NuGet package in my .NET solution. The restore fails with multiple NU1301 error when trying to fetch packages from a private Artifactory feed.

Error:
Severity Code Description Project File Line Suppression State

Error (active) NU1301 Failed to retrieve information about 'EnterpriseLibrary.Common' from remote source.

An error occurred while sending the request.

The underlying connection was closed: An unexpected error occurred on a send.

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

An existing connection was forcibly closed by the remote host Connexus.Security (net462), Connexus.Security (net9.0-windows) C:\Connexus_Code\Project\26M\Dev\Walmart.Connexus.Common\Source\Connexus.Security\Connexus.Security.csproj 1

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-27T18:20:13.3433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    NU1301 indicates that restore cannot access the configured package source. In this case, the private Artifactory feed is failing during the HTTPS request and the remote host is closing the connection.

    To resolve, focus on the package source configuration and connectivity:

    1. Verify the Artifactory feed URL
      • Open the NuGet.Config (or nuget.config) used by the solution (in the solution folder or user-level config) and confirm that the <packageSources> entry for the Artifactory feed has the correct URL and is reachable.
      • If this feed is no longer valid or needed, remove or disable it from the configuration and retry restore. NU1301 is raised when a configured source is unavailable.
    2. Check for failed/invalid sources
      • NU1301 is raised when IgnoreFailedSources is not enabled and a source cannot be read. Either:
        • Fix the Artifactory source (URL, DNS, SSL/TLS, proxy, firewall, or authentication), or
        • Remove that source from NuGet.Config if it is not required for this solution.
    3. Validate network and TLS/proxy settings
      • The message “An existing connection was forcibly closed by the remote host” typically indicates a network, TLS, or proxy termination issue. Ensure that:
        • The machine can reach the Artifactory URL (test via browser or curl).
        • Any corporate proxy/firewall allows outbound HTTPS to the Artifactory host.
        • TLS protocol versions and ciphers required by Artifactory are enabled on the client.
    4. Confirm credentials for the private feed
      • If the Artifactory feed requires authentication, ensure valid credentials are configured in NuGet.Config (for example, via <packageSourceCredentials> or a credential provider) and that they have not expired.
    5. Check for transient issues and retry
      • If the problem is intermittent, use the latest NuGet/.NET client and, if applicable, configure enhanced retry behavior (for CI scenarios) using the environment variables described in the NuGet.org FAQ (for example, NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT and NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS).
    6. Update NuGet client if needed
      • Ensure a current NuGet client is used, as older clients can have networking and protocol issues that affect secure feeds.

    If the Artifactory source is required and all local configuration appears correct, involve the Artifactory administrator to check server-side logs for why the connection is being closed.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.