想要远程访问 sharepoint 以使用 sharepoint api
我们在可以远程访问的计算机(例如服务器 A)上安装了 Sharepoint Server 2010。
到目前为止,我们一直在使用 sharepoint webservices 与 sharepoint 进行通信。
但现在我们想使用sharepoint.dll来编码。
我在某处读到我们需要在安装共享点服务器的同一台机器上进行编码(在本例中为服务器 A)。这是正确的吗,如果我错了,请纠正我?
这里开始问题,我们无法物理访问服务器,我们只能远程访问(使用远程桌面意味着一次只能有2个连接)。
我们是一个 5 人的团队,需要同时编码,我们应该为此做。
We have a sharepoint server 2010 installed on a machine(say server A) which we can access remotely.
Till now we were using sharepoint webservices to communicate with sharepoint.
But now we want to use sharepoint.dll to code.
i read somewhere that we need to coding on the same machine on which the sharepoint server is installed(Server A in this case). Is this correct , pls correct me if i am wrong?
Here starts the problem , We can not access the server physically, we have only remote access( using remote desktop means only 2 connection at a time).
We are a team of 5 people needs to code simutaneously, we should i do for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这是正确的,Microsoft.SharePoint.dll 是服务器对象模型,只有当您连接到服务器时才能访问它。
还有一个客户端对象模型,它允许远程执行您的代码。 http://msdn.microsoft.com/en-us/library/ee857094.aspx 但这不是您正在寻找的解决方案。
您的每个团队成员都需要在开发人员电脑/笔记本电脑上的虚拟环境中(我建议使用 VMware)安装 SharePoint。 (显然您只需安装一次,然后复制 VWware 磁盘)。
如果您自己从未安装过 Windows/SharePoint 服务器,请让安装服务器 A 的管理员来安装,因为这可能非常棘手。如果您想自己尝试,这里有一个指南: http:// /mosshowto.blogspot.com/2009/11/installing-sharepoint-2010-windows-2008.html
Yes it's correct, the Microsoft.SharePoint.dll is the server object model, which only can be accessed when you are connected to the server.
There is a client object model aswell, which allows your code to be executed remotely. http://msdn.microsoft.com/en-us/library/ee857094.aspx However this is not the solution you are looking for.
Each of your team members needs to install SharePoint in an virtual environment (i'd recommend using VMware) on your developer pc/laptop. (Obviously you will install it only once and then copy the VWware disk).
If you never installed a Windows/SharePoint server yourself, get the admin who installed Server A to do it, because it can be quite tricky. Heres a guide if you want to try yourself: http://mosshowto.blogspot.com/2009/11/installing-sharepoint-2010-windows-2008.html
这可能对你来说太晚了,但是......以防万一。
我强烈建议您在尝试此操作之前三思而后行,但您会发现这可能会对您有所帮助。
当我第一次开始使用 SP 时,我非常担心远程开发,但后来我说服 PM 有本地环境,我不需要完成我的研究。
远程编码:
然而,我开始不得不把一些工作带回家,并需要远程连接到我的工作电脑,所以我最终厌倦了延迟,并将我的笔记本电脑的 VS2010(终极版)连接到我的员工 TFS 并获取最新版本。我必须说我运行的是 win 7 64 位。
当然,当我尝试编译解决方案时,我的机器开始抱怨,因为它不知道 Sharepoint.dll 应该是什么。
就在那时,我远程连接到我的工作电脑并从 GAC 获取了该 dll。 (请参阅此处如何从 GAC 中提取 dll:http: //metahat.blogspot.com/2008/08/copy-extract-dll-from-gac.html)。然后我将其复制到我的计算机上并将其安装在我自己的 GAC 中 (gacutil -I "C:[PathToBinDirectoryInVSProject]\gac.dll")。
我不得不这样做几次,因为我们的应用程序做了一些疯狂的事情并且有很多依赖。通常,您会被告知缺少什么,您可以进入 msdn 并查看哪个程序集包含它。
好吧,毕竟我必须编译它,它的工作就像一个魅力。
部署和测试
这可以帮助您编码。现在,根据我过去共享 Websphere 应用程序服务器的经验,我敢打赌,同步一个团队以在一个应用程序服务器中部署将是一件令人头疼的事情。认为你们中的一些人能够编译但不能运行。
由于 SP 在 GAC 内有 dll,因此在不同的 Web 应用程序中运行不同版本的应用程序是一件相当复杂的事情。 (我宁愿不讨论是否可行,但如果我的想法可行,那么至少在配置管理方面是非常复杂的)
当然,您可以在服务器上共享一个文件夹,编译,将 pkg dll 复制到共享文件夹,然后使用拖放技巧将(部分)它们移动到 GAC,最后重置 iis。 (我曾经有一个脚本来完成除了拖放之外的所有操作)
我只是决定提交(可能在不同的分支中),然后从远程计算机进行部署。但主要是我决定从我的笔记本电脑上编码除特定 SP 视图组件之外的所有组件,因此我能够通过在没有 SP
DEBUG
的情况下运行我的单元测试来简单地验证所有内容
另外,如果这一切还没有让您害怕尝试,那么您可以在这里找到一些有关如何远程调试 SP2010 的说明
http:// techblog.hk.agenda-asia.com/2010/10/29/create-sharepoint-project-without-install-sharepoint-server/
嗯,这就是我对虾的了解。 :p(我写得太多了)
This may be getting to you too late, but... just in case.
I would strongly suggest you to think twice before trying this, but you'll see this may get to help you.
I was very concerned about remote development when I first started working with SP, but then I convinced the PM to have local environments and I didn't need to complete my research.
REMOTE CODING:
However, I started having to bring some work to home and needed to connect remotely to my PC at work, so I eventually got sick bored of latency and connected my laptop's VS2010 (ultimate) to my employeer TFS and got latest version. I have to remark I run win 7 64 bits.
Of course when I tried to compile the solution my machine started complaning because it didn't have an idea what that Sharepoint.dll was supposed to be.
That's when I connected remotelly to my work-pc and got from the GAC a that dll. (see here how to extract a dll from GAC: http://metahat.blogspot.com/2008/08/copy-extract-dll-from-gac.html). Then I copied that to my machine and installed it in my own GAC (gacutil -I "C:[PathToBinDirectoryInVSProject]\gac.dll").
I had to do it a few times since our app does some crazy things and had pretty much to depend on. Normally you'll be told what is missing and you can go in msdn and see what assembly contains it.
Ok, after all that I got to compile it and it worked like a charm.
DEPLOY AND TEST
That can help you coding. Now, from my past shared-Websphere-appserver experiences I can bet you sinchronizing a team to deploy in one app server will be a headache. Think that some of you will be able to compile but do not run.
Since SP has dlls inside the GAC, having different versions of your app running in different web apps is something quite complicated. (I prefeer not to discuss if it is possible, but if my idea is possible, then it is at least very complex in terms of configuration management)
Of course you can share a folder at your server, compile, copy the pkg dlls to the shared folder, then use the trick of drag and drop to move (some of) them to the GAC and finally iis reset. (I used to have a script to do it all but the drag and drop)
I simply decided to commit (perhaps in a different branch) and then deploy from the remote machine. But mainly I decided to code from my laptop all but specific SP view components, therefore I was able to simply validate that all by running my Unit tests without the SP
DEBUG
In adition, If this all didn't got you affraid enought of even trying, then you can find in here some instructions about how to get to debug remotelly your SP2010
http://techblog.hk.agenda-asia.com/2010/10/29/create-sharepoint-project-without-install-sharepoint-server/
Well, that's all i know about shrimp. :p (ment I wrote too much)