views:

246

answers:

2

I am using Visual Studio 2008 and trying to publish a Web Application Project, but it keeps failing when trying to add files in the project. Below is a sample of the message;

Publishing folder JavaScript... Unable to add 'JavaScript/hoverIntent.js' to the Web site. Unable to add file 'JavaScript\hoverIntent.js'. The specified file could not be encrypted.

This happens for image files too. I am lost as to why it is happening. I should add that I am using Windows 7 build 7100, not sure if this is casuing the issue??

Any help greatly appreciated

A: 

This blog post at BlackMarble is suggesting that you may have the target directory set to use encryption. Sounds like the exception you're seeing is the inability for the VS publish process to handle that.

To get around this problem:

  • use VS to publish to an intermediate directory. Somewhere on your PC perhaps.
  • copy the files yourself (with a batch file maybe) to the server

That's a workaround, at least.

p.campbell
A: 

I know this is an old topic, but I found it when I googled for the same problem.

My solution was to remove the "Encrypt" flag from Windows Explorer for the files listed (Right click -> Properties -> Advanced)

Brage Rønning Tukkensæter