通过网络运行 .net 应用程序
我需要使 .NET 应用程序能够在网络共享上运行,问题是这将位于客户端的网络共享上,因此路径不会相同。
我快速浏览了 ClickOnce 和 Visual Studio 2008 中的发布选项,但它需要特定的网络共享位置 - 并且我假设该位置在执行操作时存储在某个位置。
目前,该工作是使用旧的 VB6 应用程序完成的,因此可以解决所有这些安全问题,但该应用程序编写得很差,几乎无法维护,因此确实需要放弃。
是否可以将域控制器设置为允许执行该特定的 .NET 应用程序?任何其他选择都会受到欢迎,因为我希望这个小应用程序对业务非常关键。
我应该说,客户端网络是学校,因此通常与客户端计算机一样被完全锁定,因此手动向每个客户端计算机添加例外是一个很大的禁忌。
抱歉,我忘了提及我们目前仅限于 .NET 2.0,我们计划将其升级到 4.0,但这不会立即发生。
I need to enable a .NET application to run over a network share, the problem is that this will be on clients' network shares and so the path will not be identical.
I've had a quick look at ClickOnce and the publish options in Visual Studio 2008 but it needs a specific network share location - and I'm assuming this location is stored somewhere when it does its thing.
At the moment the job is being done with an old VB6 application and so gets around all these security issues, but that application is poorly written and almost impossible to maintain so it really needs to go.
Is it possible for the domain controller to be set up to allow this specific .NET application to execute? Any other options would be welcomed as I want to get this little application is very business critical.
I ought to say that the client networks are schools, and thus are often quite locked down as are the client machines, so manually adding exceptions to each client machine is a big no no.
Apologies, I forgot to mention we're restricted to .NET 2.0 for the moment, we are planning to upgrade this to 4.0 but that won't happen immediately.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
\\someserver\randomfolder
)这将允许客户将您的部署放置在他们想要的任何位置。当用户安装时,他们的开始菜单快捷方式将指向他们放置部署的位置。
以下是 MSDN 关于该复选框的描述...
\\someserver\randomfolder
)This should allow clients to put your deployment wherever they want. When their users install, their start menu shortcut will point back to where they put the deployment.
Here's the description from MSDN about that checkbox...
清单中的部署位置必须与其部署位置相匹配。您将必须使用 UNC 路径。这个应该没有什么问题。 ClickOnce 应用程序安装在用户的配置文件下,不需要管理权限。它只需要对部署应用程序的文件共享进行读取访问。
最好的答案是为每所学校创建部署并让您设置 UNC 路径,因为这样您只需向他们发送签名的部署,他们就可以将其放在文件共享上。但如果涉及很多学校,那就是一个大问题了。
下一个答案是:谁实际将应用程序部署到每个学校,即将其放在文件共享上?有某种管理员吗?
我建议(取决于是谁)给他们 mageUI.exe 并教他们如何更改部署 URL 并重新签署清单(它会提示)。他们重新签署部署的问题是他们必须拥有证书。您可以为每所学校提供自己的证书(使用 VS 中的“创建测试证书”按钮创建,或使用 MakeCert 创建一个 [询问您是否需要更多信息])或为它们提供相同的密钥(不是很安全,但是嘿,它会起作用)。
如果您至少更新到 .NET 3.5 SP-1,则无需签名即可部署该应用程序。 (我并不是在 .NET 2.0 方面为难您,我的公司也处于同样的境地,我只是传递此信息。)
如果计算机可以访问互联网,您可能会找到一个地方来托管部署10 美元/月,并将其推送到网络服务器并让它们全部从那里安装。然后每个人都会同时获得更新,您只需将更新部署到一个位置。假设他们可以访问互联网,这将是最简单的解决方案。
The deployment location in the manifest must match the location where it is deployed. You are going to HAVE to use a UNC path. There shouldn't be any problem with this. ClickOnce applications install under the user's profile, and require no administrative privileges. It only needs read access to the file share where the application is deployed.
The best answer is to create deployments for each school and for you to set the UNC path, because then you can just send them a signed deployment and they can put it on the file share. But that's a major p.i.t.a. if there are a lot of schools involved.
The next answer is: Who actually deploys the application to each school, i.e. puts it on the file share? Is there some kind of administrator?
What I would recommend (depending on who it is) is giving them mageUI.exe and teaching them how to change the deployment URL and re-sign the manifest (it will prompt). The problem with them re-signing the deployment is they have to have a certificate. You could give each school their own certificate (created with the "create test certificate" button in VS, or use MakeCert to create one [ask if you want more info]) or give them all the same key (not very secure, but hey, it would work).
If you at least updated to .NET 3.5 SP-1, you could deploy the application without signing it. (I'm not giving you a hard time about .NET 2.0, my company is in the same position, I'm just passing this information on.)
If the computers have internet access, you could probably find somewhere to host the deployment for $10/month, and push it to a webserver and let them all install from there. Then everyone would get updates at the same time, you would only have to deploy updates to one location. This would be the simpliest solution, assuming they have internet access.
也许,这里的链接可以拯救你,如果我没记错的话,你担心驱动器号和处理 UNC 约定吗?在 CodeGuru 上查看此内容,其中包含有关如何在运行时动态映射到 UNC 共享的代码。
Perhaps, the link here could save you, if I am not mistaken, you are worried about the drive letter and handling UNC conventions? Take a look at this on CodeGuru, which contains code on how to map to a UNC share dynamically at run-time.
问题是与 .Net 框架相关的安全性。不幸的是,我在这方面没有太多经验,但也许这些链接之一会有所帮助:
The problem is Security related to the .Net framework. Unfortunately i don't have much experience in this area, but maybe one of these links will help:
可以使用 UNC 路径吗?
Can you use a UNC path?