星空网 > 软件开发 > ASP.net

Visual Studio发布Web项目报错:Unable to add xxx to the Web site. Unable to add file xxx. The specified file could not be encrypted.

背景

Visual Studio下的Web项目

现象

发布时遇到Unable to add 'xxx' to the Web site.  Unable to add file 'xxx'. The specified file could not be encrypted.的报错

Visual Studio发布Web项目报错:Unable to add xxx to the Web site.  Unable to add file xxx. The specified file could not be encrypted.

原因

  1. 这些文件(文件夹)被设置为"加密"。可能因为这些文件是从Internet上下载并复制到项目下的文件夹,在被下载前就已经被启用"加密"选项
  2. 这些文件(文件夹)来自于其他计算机并被锁定

解决办法

对于由原因1造成的:

在文件管理器中定位到目标文件(文件夹),右键->属性->高级->取消加密选项,重新发布,错误解除

Visual Studio发布Web项目报错:Unable to add xxx to the Web site.  Unable to add file xxx. The specified file could not be encrypted.

对于由原因2造成的:

在文件管理器中定位到目标文件(文件夹),右键->属性,点击"解锁"按钮(如果有的话)。重新发布,错误解除

如果被锁定的是下载来的zip文件,其中所有文件默认也是被锁定的。Windows没有天生提供批量解锁多个文件的捷径(选取多个文件后右键弹出属性菜单,会发现解锁按钮不见了)。最简单快速的办法是在解压前将zip文件解锁,这样解压出来的文件就全部是非锁定的了

Visual Studio发布Web项目报错:Unable to add xxx to the Web site.  Unable to add file xxx. The specified file could not be encrypted.




原标题:Visual Studio发布Web项目报错:Unable to add xxx to the Web site. Unable to add file xxx. The specified file could not be encrypted.

关键词:Visual,Studio

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

读完这篇文章,你将谷歌SEO外链的所有技巧:https://www.kjdsnews.com/a/774436.html
OZON电商平台付款方式及收款周期、流程:https://www.kjdsnews.com/a/774437.html
本土店铺让人着迷的原因解析:https://www.kjdsnews.com/a/774438.html
注意!2月28日起Yahoo邮箱将退出中国市场,卖家抓紧更换了!:https://www.kjdsnews.com/a/774439.html
RCEP落地,对出口外贸企业有何利好?:https://www.kjdsnews.com/a/774440.html
谷歌SEM和谷歌SEO的主要区别:https://www.kjdsnews.com/a/774441.html
三亚有哪些酒店值得入住?:https://www.vstour.cn/a/366173.html
零售晚报:丽人丽妆2023年扭亏为盈 玉容初、美壹堂等自有品牌增速超40% :https://www.kjdsnews.com/a/1836649.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流