如何摆脱安全异常?

发布于 2024-07-06 10:29:47 字数 238 浏览 9 评论 0原文

我在本地工作站上启动了一个 .Net 服务器端程序,但很快它就抛出了安全异常。 我在网上搜索答案,但没有找到/有效的快速解决方案。 我只想运行我的程序。 我如何摆脱异常? 我完全信任这个程序,因为它是我的。

编辑:哦,是的,为了文件夹结构的清晰起见,我确实从映射到我自己的本地驱动器的映射文件夹运行该程序。 感谢您的回答,我明天尝试直接从我的驱动器运行它。

编辑:当我直接使用我的驱动器时,它可以工作。

I start a .Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, because its mine.

Edit: Oh, yes, I do run the program from a mapped folder that is mapped to my own local drive for the sake of clarity of folder structures. Thanks for the answers, I try tomorrow to run it directly from my drive.

Edit: When I use directly my drive, it works.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

合约呢 2024-07-13 10:29:47

.NET 3.5 SP1 更好地支持在本地 Intranet 上运行应用程序。

如果您无法以 3.5 SP1 为目标,则可以将运行应用程序的共享映射到本地驱动器,然后使用 CasPol 将该映射驱动器设置到完全受信任的位置。

.NET 3.5 SP1 has better support for running applications on the local intranet.

If you can't target 3.5 SP1, you can map the share you're running the application from to a local drive and use CasPol to set that mapped drive to a fully trusted location.

压抑⊿情绪 2024-07-13 10:29:47

作为临时措施,您可以键入...

caspol -s off

...所有 .NET 代码访问安全性都会暂停(直到您点击)。

As a temporary measure, you can type...

caspol -s off

...and all .NET Code Access Security is suspended (until you hit < enter >).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文