79350235

Date: 2025-01-12 16:15:33
Score: 0.5
Natty:
Report link

Replace the 2nd part of the conditional after || on line #37 in Default.aspx

 ServiceResolver.Current.Resolve<Nuget.Server.Core.Infrastructure.ISettingsProvider>().GetBoolSetting("allowRemoteCacheManagement", false))

with this:

ConfigurationManager.AppSettings["allowRemoteCacheManagement"]=="false"

Sometimes, too sophisticated is too sophisticated. This is an example of releasing untested code: something that should be considered shameful but which became mainstream.

Then replace "false" with "true" on line 114 of Web.config, to allow remote cache management.

Alternatively, remove the check for remote requests altogether because it does nothing of value for us: the local nuget server is meant to be accessed remotely, so restricting it to localhost serves no purpose because a so restricted server does nothing more than a local folder set up as nuget server in VS. Some solutions are overengineered, and this one is too.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: NoMeGusto