当我尝试删除获取拒绝访问错误的文件夹时 [英] When i try to delete a folder getting Access denied Error

查看:85
本文介绍了当我尝试删除获取拒绝访问错误的文件夹时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

我将创建一个像winrar这样的应用程序,我能够创建一个rar文件,但是当创建rar文件时,我想删除该文件夹.当我尝试删除该文件夹时,访问被拒绝例外.任何人都可以帮助我解决此异常.

Hi Friends,

I am going to create an application like winrar, I am able to create a rar file , but when the rar file is created I want to delete the folder. When i try to delete the folder getting Access denied exception. Anyone one please help me to sort out this exception.

推荐答案

删除获取拒绝访问"异常的文件夹.
拒绝访问异常表示没有适当的安全特权.您的应用程序试图通过该帐户删除该链接的帐户没有安全访问权限以进行删除.您需要提供相同的内容才能执行此操作.
delete the folder getting Access denied exception.
Access denied exception means proper security privileges are not in place. The account through which your application is trying to delete that link does not have security access to delete. You need to provide the same in order to do it.


请尝试以下方法,

1.在USING标签内创建文件/在文件创建后关闭流
2.以管理员身份运行VWD
try following methods,

1.inside the USING tag create your file/close the stream after file creating
2.Run VWD as administrator


,您必须使用Dispose();否则您将无法访问该文件以将其删除
you have to use the Dispose(); otherwise you wont be able to access the file to delete it


这篇关于当我尝试删除获取拒绝访问错误的文件夹时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆