FileIOPermission的 [英] FileIOPermission
问题描述
当我编译应用程序并运行它(在我的计算机上)它工作正常,由
在其他计算机上抛出异常:请求获得
$ b的许可$ b类型''System.Security.Permissions.FileIOPermission,mscorlib,
Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089''失败。
异常发生在:DirectoryInfo currentDir = new
DirectoryInfo(" C:\\");
我该怎么办?允许在其他计算机上运行此应用程序而不是
mine?
When I compile the application and run it (on my computer) it works fine, by
on the other computers exception is thrown: "Request for the permission of
type ''System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' failed."
Exception occurs at this: DirectoryInfo currentDir = new
DirectoryInfo("C:\\");
What should I do to allow running this application on other computers than
mine ?
推荐答案
您正在另一台计算机上运行的可执行文件吗?计算机实际上是在机器上还是在网络驱动器上?这可能会导致代码运行时出现问题
少用priveledges。
Luke
http://blog.lukesmith.net
Emil < em ****** @ pl.plwrote in message
news:en ********** @ nemesis.news.tpi.pl ...
Is the executable you are running on the other computers actually on that
machine or on a network drive? This can cause problems as the code is run
with less priveledges.
Luke
http://blog.lukesmith.net
"Emil" <em******@pl.plwrote in message
news:en**********@nemesis.news.tpi.pl...
当我编译应用程序并运行它(在我的计算机上)它工作正常,
在其他计算机上抛出异常:请求获得许可
类型''System.Security.Permissions.FileIOPermission,mscorlib,
Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089''
失败。
异常发生在:DirectoryInfo currentDir = new
DirectoryInfo(" C:\\ ;);
如果允许在其他计算机上运行此应用程序而不是
我的怎么办?
When I compile the application and run it (on my computer) it works fine,
by on the other computers exception is thrown: "Request for the permission
of type ''System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089''
failed."
Exception occurs at this: DirectoryInfo currentDir = new
DirectoryInfo("C:\\");
What should I do to allow running this application on other computers than
mine ?
可执行文件在该机器上打开。
Emil
UzytkownikLuke Smith < stuffNOSPAM @ lukesmithDOTnetnapisal w wiadomosci
新闻:D1 ******************************** ** @ microsof t.com ...
The executable is ON that machine.
Emil
Uzytkownik "Luke Smith" <stuffNOSPAM@lukesmithDOTnetnapisal w wiadomosci
news:D1**********************************@microsof t.com...
您在其他计算机上运行的可执行文件是否实际上在该机器上或在一个网络驱动器?这可能会导致代码运行时出现问题
少用priveledges。
Luke
http://blog.lukesmith.net
Emil < em ****** @ pl.plwrote in message
news:en ********** @ nemesis.news.tpi.pl ...
Is the executable you are running on the other computers actually on that
machine or on a network drive? This can cause problems as the code is run
with less priveledges.
Luke
http://blog.lukesmith.net
"Emil" <em******@pl.plwrote in message
news:en**********@nemesis.news.tpi.pl...
>当我编译应用程序并运行它(在我的计算机上)它工作正常,
在其他计算机上抛出异常:请求
类型''System.Security.Permissions.FileIOPermission,
mscorlib,Version = 2.0.0.0,Culture = neutral,
PublicKeyToken = b77a5c561934e089''的权限。'
异常发生在:DirectoryInfo currentDir = new
DirectoryInfo(" C:\\");
我该怎么做才能允许在其他应用程序上运行此应用程序电脑比我的电脑好吗?
>When I compile the application and run it (on my computer) it works fine,
by on the other computers exception is thrown: "Request for the
permission of type ''System.Security.Permissions.FileIOPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'' failed."
Exception occurs at this: DirectoryInfo currentDir = new
DirectoryInfo("C:\\");
What should I do to allow running this application on other computers
than mine ?
2006年12月30日星期六00:46:02 + 0100,Emil写道:
On Sat, 30 Dec 2006 00:46:02 +0100, Emil wrote:
当我编译应用程序并运行它(在我的计算机上)它工作正常,
在其他计算机上异常是抛出:请求
类型''System.Security.Permissions.FileIOPermission,mscorlib,
Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089''失败的许可。 ;
异常发生在:DirectoryInfo currentDir = new
DirectoryInfo(" C:\\");
如果允许在其他计算机上运行此应用程序而不是
mine,我该怎么办?
When I compile the application and run it (on my computer) it works fine, by
on the other computers exception is thrown: "Request for the permission of
type ''System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' failed."
Exception occurs at this: DirectoryInfo currentDir = new
DirectoryInfo("C:\\");
What should I do to allow running this application on other computers than
mine ?
也许应用程序在其他计算机上运行的帐户
无法访问驱动器c:\
-
Bits.Bytes
http:/ /bytes.thinkersroom.com
这篇关于FileIOPermission的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!