1

I have an ASP.NET Core application using Identity for authentication/authorization that I'm trying to configure as a NuGet server. The NuGet server piece works great if I remove any Authorize attributes from the controllers that back the API endpoints, but when I add the attributes back in, they don't work as an authenticated feed.

I add the feed with the following command line:

dotnet nuget add source https://localhost:7228/nuget/v3/index.json 
       --name myfeed --username "<<uname>>" --password "<<pwd>>" 

This reports success and adds the relevant entries into NuGet.config but when I attempt to restore any packages from the feed I get:

Unable to load the service index for source https://localhost:7228/nuget/v3/index.json.
Response status code does not indicate success: 404 (Not Found).

I'm not sure if it's just impossible to use Identity as the backing authentication mechanism for something like NuGet or if there is some other mechanism through which I need to add the credentials?

1 Answer 1

0

Basically 404 error indicated that requested resources is not found, please check /nuget/v3/index.json. Please check that endpoint has been setup properly and missing middleware. Please double check it on your end.

Sign up to request clarification or add additional context in comments.

3 Comments

No, it's not that. Removing the [Authorize] tag immediately restores working operation.
Great to hear that. Well done!
That’s the problem though. I want the feed to use Identity for authentication???

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.