We are working in private repository for our own private nuget packages in ASP.NET Project . We are in a position to change the nuget feed for every customer. But nuget packages are located in a location which is specified in Web.Config.
Is there a possibility to change the location dynamically through routing(URL) ? i have refferd this blog http://blog.maartenballiauw.be/post/2011/05/09/Using-dynamic-WCF-service-routes.aspx even though the packages url refers the path given in the webconfig file
public static void MapNugetRoutes(RouteCollection routes)
{
var factory = new DataServiceHostFactory();
var serviceRoute = new ServiceRoute("nuget/packages/getpackages/{platform}", factory, typeof(Packages));
serviceRoute.Defaults = new RouteValueDictionary { { "serviceType", "odata" } };
serviceRoute.Constraints = new RouteValueDictionary { { "serviceType", "odata" } };
routes.Add("nuget", serviceRoute);
}
<appSettings>
<add key="requireApiKey" value="true" />
<add key="apiKey" value="" />
<add key="packagesPath" value="~/NugetPackages/" />
<add key="enableSimpleMembership" value="false" />
<add key="" />
</appSettings>
the "NugetPackages" is my local repositary address , i need to access the repositary privately , like there are several folders inside that above location, i need dynamically access that folders NugetPackages/folder1, NugetPackages/folder2 like this, Is it possible?
thanks in advance..