佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 769|回复: 1

用asp.net delete file时遇到的小问题

[复制链接]
发表于 29-1-2007 11:05 AM | 显示全部楼层 |阅读模式
当我用一下的code来delete我server的file时,出现以下的msg

我知道问题所在,但我的情况是。。 所有的files都是透过我的asp.net application来upload上server的,总不能每一次upload都要用FTP program来grant access to the file 吧


              Server Error in '/' Application.
Access to the path 'stephy_shine_s.gif' is denied.
Description:An unhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'stephy_shine_s.gif' is denied.

ASP.NETis not authorized to access the requested resource. Consider grantingaccess rights to the resource to the ASP.NET request identity. ASP.NEThas a base process identity (typically {MACHINE}\ASPNET on IIS 5 orNetwork Service on IIS 6) that is used if the application is notimpersonating. If the application is impersonating via <identityimpers/>, the identity will be the anonymous user(typically IUSR_MACHINENAME) or the authenticated request user.

Togrant ASP.NET access to a file, right-click the file in Explorer,choose "Properties" and select the Security tab. Click "Add" to add theappropriate user or group. Highlight the ASP.NET account, and check theboxes for the desired access.

Source Error:

An unhandledexception was generated during the execution of the current webrequest. Information regarding the origin and location of the exceptioncan be identified using the exception stack trace below.

      
   
回复

使用道具 举报


ADVERTISEMENT

发表于 29-1-2007 02:35 PM | 显示全部楼层
你只要设那Directory就可以了,
那么文件会inherit这directory的设定
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT


本周最热论坛帖子本周最热论坛帖子

ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 26-8-2025 09:13 PM , Processed in 0.118245 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表