SharePoint Web 服务参考、WSS 3.0、Visual Studio 2010、身份验证

发布于 2024-12-18 00:24:31 字数 1440 浏览 0 评论 0原文

当尝试使用 Web 服务 API 访问 SharePoint WSS 3.0 服务器时,我们正在开发的软件服务在首次对服务器进行任何调用(选择其中任何一个,没关系)时将挂起 30-60 秒。发出第一个调用后,此后的每个请求都非常快。

这种情况发生在 SharePoint 的本地开发安装或生产 SharePoint 环境中,无论我们尝试什么,结果都是相同的。

当使用与 WSS API 相同的登录凭据通过 Web 浏览器访问 SharePoint 站点(本地开发站点和生产站点)时,身份验证过程中的延迟时间为零。

这是通过 C# 用于对 SharePoint WSS 进行身份验证的代码:

_lists = new Lists
       {
           Credentials = new NetworkCredential(UserName, Password, Domain),
           Url = string.Format("{0}/_vti_bin/Lists.asmx", BaseUrl),
           UseDefaultCredentials = false
       }; // Reference the list object.

一旦代码到达下面的行,它就会挂起 30-60 秒。

the GetList(string listName) 

_lists.GetList("TestList");

此后的任何呼叫都非常快。

最后一点。当尝试通过 Visual Studio 访问服务时,我们会收到弹出对话框,要求输入凭据、发现凭据,并且它不会进行身份验证,但我们能够检索服务列表。这种情况在生产和测试环境中都会发生。

请按添加 Web 服务的事件顺序查看图像:

添加 Web 服务:

在此处输入图像描述

接下来我们会看到三个对话框对于列表、错误和元数据,它们都没有验证。

第一个屏幕的特写:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

我们终于点击了取消。

在此处输入图像描述

并且可以看到我们可以对该服务进行的调用:

在此处输入图像描述

有人有什么想法吗?

When trying to access SharePoint WSS 3.0 server using the web services API the software service we are developing will hang anywhere between 30-60 seconds when making any call (pick anyone of them, it doesn't matter) against the server for the first time. After this first call is made , each request thereafter is very quick.

This happens on both the local dev install of SharePoint, or against the production SharePoint environment, same results no matter what we try.

When accessing the SharePoint site (both local dev and production) via a web browser using the same log in credentials used with the WSS API there is zero lag time during the authentication process.

This is the code being used via C# to authenticate to SharePoint WSS:

_lists = new Lists
       {
           Credentials = new NetworkCredential(UserName, Password, Domain),
           Url = string.Format("{0}/_vti_bin/Lists.asmx", BaseUrl),
           UseDefaultCredentials = false
       }; // Reference the list object.

Once the code hits the line below it hangs for 30-60 seconds.

the GetList(string listName) 

_lists.GetList("TestList");

Any call thereafter is extremely fast.

One last note. When trying to access the service via Visual Studio, we receive the popup dialog to enter credentials, Discovery Credentials, and it will not authenticate, but we are able to retrieve the list of services. This occurs on both the production and test environments.

Please see images in order of events for adding a web service:

Add Web service:

enter image description here

Next we get three dialog for list, error and meta data and none of them validate.

Close Up for First screen:

enter image description here

enter image description here

enter image description here

We finally hit cancel.

enter image description here

And can see the calls we can make against the service:

enter image description here

Anyone have any ideas?

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

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

发布评论

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

评论(1

听不够的曲调 2024-12-25 00:24:31

经过大约四天的搜索,我发现了一条线索。

线索是更改 SharePoint 中央管理中的身份验证,以允许除了 Windows 身份验证模式之外的匿名身份验证模式。

一旦做出改变,似乎就可以解决问题了。响应时间从 30-60 秒缩短到 1-4 秒。这不是 100%,但它使我们能够以更快的速度不断发展。

我希望这可以帮助面临同样问题的人。这是一场噩梦。我已经没有头发了。

更新:这不是 100% 修复。

After about 4 days of searching I came across a clue.

The clue was to change the authentication in the Central Admin of SharePoint to allow anonymous in addition to the Windows authentication mode.

Once that change was made it seems that might have been the fix. The response time went from 30-60 seconds to 1-4. It isn't a 100%, but it allows us to keep developing at a quicker rate.

I hope this might help someone facing the same issues. It was a nightmare. I have no hair left.

Update: This is not a 100% fix.

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