在 Visual Studio 2008 中添加 SharePoint 的 Web 引用

发布于 2024-07-08 12:53:55 字数 613 浏览 7 评论 0原文

每当我在 VS 2008 中为任何 Sharepoint Web 服务添加 Web 引用时,添加 Web 引用时的预览窗口都会显示正确的方法名称:
注意CreateFolder:

之前:替代文本http://img134.imageshack.us/img134/5286 /vs20081bq7.png

之后,CreateFolder 方法不存在

http: //img134.imageshack.us/img134/3530/vs20082be5.png

我查看了文档 MSDN 但看来我正在正确使用它。
有人可以指出我的错误吗? 谢谢

Whenever I add a web reference for any Sharepoint web service in VS 2008, the preview window while adding the web reference shows the proper method names:
Note CreateFolder:

Before: alt text http://img134.imageshack.us/img134/5286/vs20081bq7.png

And after, the CreateFolder method is not there

After http://img134.imageshack.us/img134/3530/vs20082be5.png

I looked over the documentation at
MSDN but it appears I am using it properly.
Can anybody point out my mistake?  Thanks

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

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

发布评论

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

评论(1

念三年u 2024-07-15 12:53:55

您需要在代码中创建对 Dws 对象的引用。 否则你只能看到静态方法/类型。

尝试

DocumentWorkspace dw = new DocumentWorkspace();
dw.CreateFolder();

一下,通常我需要获取对特定站点 dws 服务的引用,因此添加以下代码会有所帮助

dw.Credentials = [get the appropriate credentials, most often System.Net.CredentialCache.DefaultCredentials];
dw.Url = [basesiteurl] + "/_vti_bin/dw.asmx";

You need to create a reference to the Dws object in your code. Otherwise you can only see the static methods/types.

Try

DocumentWorkspace dw = new DocumentWorkspace();
dw.CreateFolder();

Not that normally I need to get a reference to a specific sites dws services, so adding the following code helps

dw.Credentials = [get the appropriate credentials, most often System.Net.CredentialCache.DefaultCredentials];
dw.Url = [basesiteurl] + "/_vti_bin/dw.asmx";
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文