从网络共享编辑和运行.NET项目编辑、项目、网络、NET

2023-09-03 04:23:10 作者:悲欢独自饮

由于我跑我的东西在一个虚拟机我想挽救我的数据共享的主机。但随后运行和Visual Studio中调试(网页)的应用和测试,从有问题。如何配置一切以FullTrust的时候它开始在Visual Studio中运行?

Since I run my stuff in a VM I like to save my data on shares on the host. But then running and debugging (web) applications and tests from within Visual Studio has problems. How can I configure everything to run with FullTrust when it's started in Visual Studio?

要不怎么只配置完全信任所有网络驱动器?

Or how to just configure full trust for all network drives?

我已经关闭了UAC。

推荐答案

您将不得不使用caspol命令行命令。

You'll have to use the caspol command-line command.

打开一个控制台窗口,输入以下命令:

Open up a console-window, and type this command:

caspol -machine -addgroup <group_param> -url file://yournetworkdriveletter/* FullTrust -name somename

注: group_param 是组要添加新的区域,这将是本地Intranet。您可以执行 caspol -lg ,看看有什么地方Intranet区域的号码是您的系统上。

Note: the group_param is the group to which you want to add your new zone, which will be 'Local Intranet'. You can execute caspol -lg to see what the number of the local-intranet zone is on your system.

在我的系统,它是1.2

On my system, it is 1.2

所以,你必须要执行的命令是:

So, the command you have to execute is:

caspol -machine -addgroup 1.2 -url file://driveletter/* FullTrust -name MyNewZoneName