Last post May 04, 2011 05:04 AM by asheejtk
May 04, 2011 02:54 AM|mightymolgan|LINK
I'm trying to make a small packagemanager for my website. And I'm looking at this blogpost:
But I get "Access to the path 'NuGet\Cache' is denied." when trying to test it. I've added ASP.NET account so it has full rights on c:\inetpub, and still same error.
public void TestInstall(string packageID)
var rep = PackageRepositoryFactory.Default.CreateRepository(new PackageSource("http://testserv.test.se/nuget", "Default"));
var packagemgr = new PackageManager(
var package = rep.FindPackage(packageID);
I can't find the folder on the server where I've published the files to.
Whats needed to be done to make this work? I'm trying to install a package to a newly created instance in the IIS. And that app-pool has full rights to c:\inetpub on that server.
I would appreciate any help.
If add "Packages" so URL is:
I get error:
The request URI is not valid. Since the segment 'Packages' refers to a collection, this must be the last segment in the request URI. All intermediate segments must refer to a single resource.
May 04, 2011 05:04 AM|asheejtk|LINK
As the error clearly says you don't have permission to use/create the folder.
Normally web application runs under ASP.NET user acoount and this account doesn't have any file permission in your system.
So you have to give permission to this user account or you can enable impersonation.
I would suggest you to enable impersonation instead of giving more permission to ASP.NET account due to security issue.
Create a new user account with local admin rights and have an entry in your web.config like below.
<identity impersonate = "true" userName = "Username" password = "password"></identity>