ARTIFACTORY: How to solve Unable to load the service index for source in Nuget

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Abhinav Chauhan
articleNumber
000006955
FirstPublishedDate
2026-05-11T08:37:33Z
lastModifiedDate
2026-05-11

ARTIFACTORY: How to solve Unable to load the service index for source in Nuget

Introduction

When resolving NuGet packages from an upstream repository on Windows, users may encounter errors even though the package exists in Artifactory. A common scenario is when attempting to install a package using a command such as:
nuget install bootstrap
In such cases, the process may fail with an error such as:
  • “Unable to load the service index for source”
Followed by 404 (Not Found) or similar messages

This issue typically occurs when a user attempts to fetch a package that has been blocked by a curation policy in the remote repository. As a result, the local NuGet.config file may become corrupted, preventing proper package resolution.
This article will guide you through identifying the root cause and resolving the issue step by step. It will also help you understand how to restore proper NuGet functionality after configuration corruption.


Resolution


Step-by-Step Instructions

Follow these steps to resolve the issue:
  1. Close any running development tools
    • Ensure tools like Visual Studio or any CLI sessions using NuGet are closed.
  2. Delete corrupted NuGet configuration files
    • Press Windows + R to open the Run dialog
    • Type:
      %appdata
    • Navigate to the NuGet folder inside the Roaming directory
    • Delete the NuGet.config file
  1. Clear local NuGet configuration (second location)
    • Open Run again (Windows + R)
    • Type:
      %LOCALAPPDATA%\NuGet
    • Delete the NuGet.config file from this location as well
  1.   Clear the local cache by running 
nuget locals all -clear
  1. Reconfigure NuGet source (Artifactory)
    • Go to your Artifactory remote/virtual repository
    • Open the “Set Me Up” section
    • Copy the NuGet source configuration command
Add the source again using CLI or configuration, for example:
nuget sources Add -Name Artifactory -Source https://<jfrog_url>/artifactory/api/nuget/v3/<reponame>/index.json -username user -password idtoken
nuget setapikey username:IDTOKEN -Source Artifactory
  1. Retry package installation:
Based on the example above, rerun nuget install command:
nuget install bootstrap

The issue should now be resolved


Conclusion


This issue is primarily caused by a corrupted NuGet.config file, often triggered when attempting to resolve a package blocked by repository curation policies. By clearing the local configuration and re-adding the Artifactory source, you can restore proper package resolution.
If the issue persists:
  • Verify repository permissions
  • Ensure the package is not restricted by policy
  • Confirm the correct source URL and credentials