如何从主机将 Web 服务部署到虚拟服务器?

发布于 2024-11-09 09:35:57 字数 383 浏览 0 评论 0原文

全部。首先,我很抱歉这个问题是否对超级用户更好,我无法判断。如果是的话,如果有人可以迁移它那就太好了。

无论如何,我正在使用 C# 在 Visual Studio 2008 中为 SharePoint 构建此服务。当然,我需要能够调试它才能快速构建它。不幸的是,我的操作系统是 XP Pro,它无法运行 SharePoint,因为它不是服务器操作系统。我没有重新安装操作系统(这会产生其他问题),而是使用 Virtual PC 在虚拟机中启动并运行 Server 2003 + SharePoint Server 2007。我可以从 Visual Studio 创建某种管道来让我在虚拟机内测试我的服务吗?

谢谢你!

我想我应该补充一点,这些是我得到的工具。目前,重新安装或获取新设备/软件不是一个选择。

all. First of all I am sorry if this question is better for SuperUser, I couldn't tell. If it is it would be great if someone could migrate it.

So anyway, I'm building this service for SharePoint in Visual Studio 2008 with C#. Of course I need to be able to debug it to build it fast. Unfortunately my OS is XP Pro which can't run SharePoint because it is not a server OS. Instead of reinstalling my OS (which would create other problems) I got Server 2003 + SharePoint Server 2007 up and running inside a virtual machine with Virtual PC. Is there some sort of pipe I can create from Visual Studio that will let me test my service from within the virtual machine?

Thank you!

I guess I should add, these are the tools I have been given. At this time, reinstalling or getting new equipment/software is not an option.

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

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

发布评论

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

评论(1

歌入人心 2024-11-16 09:35:57

这绝对值得 stackoverflow。毕竟这是一个与开发流程相关的问题。

所以你有两个问题,部署和调试。

对于部署来说,实际上有两种方法可以实现这一点。其一是创建一个真正的 .wsp 包,您可以通过 SharePoint 提供的机制来部署/安装/升级该包。您确实应该做好准备,因为这是最终代码应该部署的方式。问题是您只能通过连接到场的计算机执行部署/安装/升级。在这种情况下,它将是您的虚拟机。如果我必须以这种方式工作,我会编写 .wsp 创建脚本并将其复制到服务器。服务器上有另一个脚本来进行部署。是的,这比我想要的步骤要多,但它确实有效,而且不需要动脑子,所以并不是太麻烦。

第二种方法更快,但不太正确。在这种情况下,如果您所做的只是更改代码,那么您只需使用新的 DLL 来替换旧的 DLL 并弹起 IIS。您可以在构建成功操作后通过从 Visual Studio 触发的脚本远程执行所有操作。

至于调试,您当然可以远程调试。查看有关使用 Visual Studio 远程调试进程的教程。

This is definitely stackoverflow worthy. It is a development process related question after all.

So you have two issues, deployment and debugging.

For deployment, there are really two ways to approach this. One is that you create a real .wsp package that you can deploy/install/upgrade via the SharePoint provided mechanisms. You really should have this prepared since it is the way that your final code should be deployed. The trouble is that you can only perform the deploy/install/upgrade via a machine connected to the farm. In this case it would be your VM. In cases where I have had to work this way, I have scripted the creation of the .wsp and copied it to the server. On the server is another script to do the deployment. Yes it is more steps than I would like but it does work and it is pretty mindless so it isn't too much of a hassle.

The second approach would be the quicker, less correct way. In this case if all you are doing is changing the code, then you just need to get your new DLL to replace the old one and bounce IIS. You might be able to do that all remotely via script fired from Visual Studio after build succeeds action.

As for debugging, you can certainly debug things remotely. Look into tutorials on remotely debugging processes using Visual Studio.

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