有个图片替换功能,本地没问题,发布到服务器后报错
Access to the path 'D:\wwwroot\defaultimg
.jpg' is denied. Access to the path
Access to the path 'D:\wwwroot\defaultimg
有个图片替换功能,本地没问题,发布到服务器后报错
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权限已设为完全控制
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权限已设为完全控制
5 个解决方案
#1
自己都说是文件夹的权限问题了。
#2
没有权限
#3
需要给 下列用户对于目录D:\wwwroot\defaultimg 的读写权限
IIS5(xp) ASPNET
IIS6(WIN2K3) NETWORK SERVICE
IIS5(xp) ASPNET
IIS6(WIN2K3) NETWORK SERVICE
#4
权限,权限,加得大大的,就行了.
#5
everyone要添加这个用户设置权限,自己解决了
.jpg' is denied. Access to the path