Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top