在我被毫不留情地批评和否决之前,我的公司还不允许在非开发机器上安装.NET3.5(其他机器目前使用的是 3.0)。
我在网络共享上有一个托管 exe,需要能够从那里运行。 这是.NET3.5SP1之前的常见问题,但我不知道如何解决它。 我已阅读这个问题,以及本文,以及 MSDN CAS 文章(这就像尝试阅读和理解 EULA)。 我似乎无法解决这个问题。
我尝试过签名; 以及文章中找到的其他建议。 我发现让它从网络运行的唯一方法是使其成为单击一次的应用程序并发布它; 这是不可接受的,因为它在发布的目录中创建了一堆不同的文件(这让我们技术水平较低的用户感到困惑),并在控制面板的“添加/删除程序”中创建了条目。
我只是一名开发人员,所以我无权设置/更改机器策略等。 任何人都可以给我分步说明(或指向我一个易于阅读的网站),说明需要做什么才能使这个东西从网络运行? 是否可以在不设置机器/域安全/软件策略(我无权访问)的情况下进行?
编辑
好吧……我预计会被否决; 然而,如果人们能解释为什么他们投了反对票,那就太好了。 这是一个严肃的问题,很多人似乎都遇到了问题; 而且似乎几乎没有人知道如何解决。
Before I get flamed and down-voted without mercy, my company will not allow the install of .NET3.5 on non-dev machines yet (others are currently on 3.0).
I have a managed exe on network share that needs to be able to run from there. This is a common problem with pre-.NET3.5SP1, but I cannot figure out how to solve it. I have read this question, as well as, this article, in addition to the MSDN CAS articles (which is like trying to read and understand a EULA). I cannot seem to solve this problem.
I've tried signing it; along with other suggestions found in the articles. The only way I've found to get it to run from the network is to make it a click-once application and publish it; which is unacceptable because it creates a bunch of different files in the published directory (which confuses our less-than-technical users) and creates entries in the Add/Remove Programs in the Control Panel.
I'm just a dev, so I don't have rights to set/alter machine policies and such. Can anyone give me step-by-step instructions (or point me to a easy-to-read site) on what needs to be done to enable this thing to run from the network? Is it even possible without setting machine/domain security/software policies (which I don't have access to)?
Edit
Ok... I expected to get voted down; however, it would be really nice if people would explain why they down-voted. This is a serious question that many people seem to be having a problem with; and almost no one seems to know how to fix.
发布评论
评论(2)
在 3.5 之前并且无法访问机器本身或机器/域策略,我认为你运气不好。
蛮力方法是进入“控制面板”>“ 管理工具> MS .NET Framework XX 向导 > 调整每台计算机上的.NET 安全性,并将本地 Intranet 区域的安全级别设置为 FullTrust。 此方法的安全风险在于,您现在信任 Intranet 上可用的所有 .NET 代码,但这可能不是您的组织想要的。
更简单的方法是使用开发团队的私钥(可以由 .NET 生成)对 .NET 程序集进行签名,从而为您的 .NET 程序集指定一个强名称。 然后在用户的计算机上执行一次策略安装,该策略信任使用团队密钥签名的所有程序集。 现在,您团队的所有 .NET 程序集都将受到完全信任,无论它们实际位于何处。
Pre 3.5 and without access to the machine itself or machine/domain policy, I think you're out of luck.
The brute force approach is to go to Control Panel > Administrative Tools > MS .NET Framework X.X Wizards > Adjust .NET Security on each machine and set the security level for the Local Intranet zone to FullTrust. The security risk with this approach is that now you're trusting all .NET code that's available on your intranet, which may not be what your organisation wants.
The more surgical approach is to give your .NET assemblies a strong name by signing them with your development team's private key (which can be generated by .NET). Then do a once-only install of a policy on your users' machines that trusts all assemblies signed with your team's key. Now all of your team's .NET assemblies will be fully-trusted no matter where they're physically located.
您可以创建一个非托管引导程序,在本地复制 .net 代码并启动它。 或者您可以单击一次并在另一个目录中创建快捷方式来隐藏其他文件。
You could create an unmanaged bootstrapper that copies your .net code locally and launches it. Or you can use click once and create a shortcut in another directory to hide you other files.