指定尝试通过 LinqToSharepoint 连接到 Sharepoint 2010 时要使用的用户
我有一个 Sharepoint 2010,我必须与它交换信息。我看了一下 Caml 查询,但它对我来说真的很混乱,然后我看了 LINQ to sharepoint。这非常适合我需要做的事情!
我通过 SPMetal.exe 生成了代码,其中包含一个 xml 配置文件,该文件使 SPMetal 只生成我感兴趣的列表的代码。
但是,生成代码后,我看不到任何可以指定凭据的地方。我的应用程序必须询问这些问题并尝试与它们建立联系。通过 caml 查询,我使用 NetworkCredentials 执行此操作,并将它们分配给上下文,但我在生成的数据上下文上没有看到任何 Credentials 属性。
那么我如何指定一个用户来发出这些请求呢?
一些精度:我想做一个连接到 64 位服务器的 32 位客户端。除了从服务器的GAC获取dll之外,我没有找到任何其他方法。
谢谢
I've a Sharepoint 2010 with which I've to exchange information. I took a look on Caml queries, but it really to messy for me, then I watched the LINQ to sharepoint. This was perfect for what I needed to do!
I generated my code through SPMetal.exe, with an xml config file which makes SPMetal to generate only the code for the list which interest me.
But, once the code is generated, I don't see any place where I can specify credentials. My application has to ask theses and try to connect with them. With caml queries, I was doing this with NetworkCredentials, and assigning them to the context, but I don't see any Credentials properties on the generated datacontext.
So how can I specify an user to use to make these requests?
Some precisions: I would like to do a 32 bit client which connect to a 64 bits server. And I didn't found any other way than get dll from the GAC of the server.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回应是……这是不可能的。正如 JamesLove 所说,LinqToSharepoint 并未设计为在服务器以外的其他地方运行。那么它就不能用于从客户端访问服务器:(
The response is... This isn't possible. Like JamesLove said, LinqToSharepoint hasn't been designed to run in another place than the server. Then it cannot be used to access to the server from a client :(