Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Fail : aspnet_client\system_web\4_0_30319

I have a build step that is part of my deployment configuration. My coworker told me it had worked once in a blue moon

I kept on getting this error consistently when I ran this build step:

Deleting dirPath (qa.comedy.net\aspnet_client\system_web\4_0_30319). [15:22:22]: 

[VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.\We
\Microsoft.Web.Publishing.targets(3588, 5): Web deployment task failed.((3/28/2012 3:22:22 PM) An error occurred when the request was processed on the remote computer.)

Attempt to perform an unauthorized operation on file '4_0_30319'.

It seems that it is trying to delete the folder aspnet_client\system_web\4_0_30319 , but has no permission to.

we run this build on a virtual machine.

Any suggestions on how to resolve this?

All help is greatly appreciated.

Thanks

like image 968
doglin Avatar asked Mar 28 '12 20:03

doglin


4 Answers

I had this issue deploying as site with msdeploy and teamcity. I resolved it by deleteing these folders from my website aspnet_client\system_web\4_0_30319

like image 187
Dan Avatar answered Nov 01 '22 05:11

Dan


Yes you can delete this folder and the next deploy will work, but with the next windows update that runs the asp.net registration tool as part of it's install will add this folder back to all asp.net sites on IIS (with the incorrect permissions) - so your deployment will fail again. You can avoid this by

  • Giving the deploy user elevated privileges (not a great solution for obvious reasons)
  • Add the folder structure to your SC so it gets deployed instead of the deployment trying to delete it (not ideal, but easiest)
  • Stop automatic windows updates (not sensible)
  • You might be able to do something like this http://blog.richardszalay.com/2012/12/18/demystifying-msdeploy-skip-rules/ to ignore the folder in deployment (I've not tried this)
like image 41
MemeDeveloper Avatar answered Nov 01 '22 06:11

MemeDeveloper


As MemeDeveloper mentions in their answer, one way to fix this is to simply ignore that directory. Indeed, this is the easiest fix and doesn't require adding anything to your source control repository or build output. Just add the following to your msdeploy.exe command:

-skip:Directory="aspnet_client"

like image 37
Kenny Evitt Avatar answered Nov 01 '22 04:11

Kenny Evitt


I wasn’t using TeamCity but I think I also had this issue. I was trying to deploy to Discount ASP.NET using VS2010 WebDeploy. After reading what doglin and Dan posted, I found I could workaround this problem by checking the “Leave extra files on destination (do not delete)” box. That may not be an option for everyone but it worked for me.

like image 31
Shawn Eary Avatar answered Nov 01 '22 04:11

Shawn Eary