新年快乐大家发财,图片替换问题,来人指点下

tangserver 2012-01-16 11:03:57
有个图片替换功能,本地没问题,发布到服务器后报错
Access to the path 'D:\wwwroot\defaultimg\1.jpg' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\wwwroot\defaultimg\1.jpg' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
应该是权限问题,Microsoft.NET文件夹的user权限已设为完全控制
...全文
51 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ny-6000 2012-01-16
  • 打赏
  • 举报
回复
权限,权限,加得大大的,就行了.
宝_爸 2012-01-16
  • 打赏
  • 举报
回复
需要给 下列用户对于目录D:\wwwroot\defaultimg 的读写权限

IIS5(xp) ASPNET
IIS6(WIN2K3) NETWORK SERVICE
宝_爸 2012-01-16
  • 打赏
  • 举报
回复
没有权限
cm_boy 2012-01-16
  • 打赏
  • 举报
回复
自己都说是文件夹的权限问题了。
tangserver 2012-01-16
  • 打赏
  • 举报
回复
everyone要添加这个用户设置权限,自己解决了

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧