COPY ORCHARD GET 404: System.UnauthorizedAccessException: mappings.bin的访问被拒绝

遇到CopyOrchard启动时出现'对路径“C:MyWebxxx.comApp_DataSitesDefaultmappings.bin”的访问被拒绝'的错误时,通过为应用程序池加入特定权限成功解决问题。

COPY ORCHARD 得到 404 错误,结果翻看Logs,得到的错误是:

014-07-31 17:36:46,217 [16] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
(null)
System.UnauthorizedAccessException: 对路径“C:\MyWeb\xxx.com\App_Data\Sites\Default\mappings.bin”的访问被拒绝。
   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   在 Orchard.FileSystems.AppData.AppDataFolder.CreateFile(String path)
   在 Orchard.Data.SessionConfigurationCache.StoreConfiguration(ConfigurationCache cac

fixe 的方法是为当前站点的应用程序池加入权限,如下:

C:\Users\Administrator>ICACLS C:\MyWeb\xxx.com\App_Data /grant "IIS AppPool\xxx.com":F /T

然后,一切 OK。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值