R – CC.Net Access Denied Error

continuous integrationcruisecontrol.netiis-7

I have CruiseControl.Net setup as my continuous integration environment. I've been working on adding a Visual Studio 2008 Web Deployment Project to my solution but I'm getting a weird "access denied" error and I can't figure out why.

I have CC.Net running under its own account on my server which is a member of the administrators group, so the CC.Net service should have access to everything it needs. The problem is when I trigger a build from the web interface the build fails with the error:

C:\Program Files
(x86)\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(667,5):
error : Access is denied.

The particular task on that line is the "CreateVirtualDirectory" task to create an IIS virtual directory for my asp.net application.

What's weird is if I open a command prompt on my build server running as the exact same user account the CruiseControl service is running as and run my build script everything builds successfully – including the creation of the IIS virtual directory. It's only when a build is initiated through the web interface that it fails.

I don't understand what the difference is between the two since presumably they are both running as the same user with the same privileges.

Suggestions?

Best Answer

Is it possible that the virtual folder it is trying to create already exists? Another thought - when you run from a command line, it is possible you have different environment variables or drive mappings that CC.Net wouldn't have?

Related Topic