问题描述
当我编译应用程序并运行它(在我的计算机上)它工作正常,由
在其他计算机上抛出异常:请求获得
$ 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 ?
推荐答案
也许应用程序在其他计算机上运行的帐户
无法访问驱动器c:\
-
Bits.Bytes
这篇关于FileIOPermission的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!