Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm have some trouble using the GetList web service. It does work sometimes but not at the start of the day!?!

Here is my code:

    public static void ListSurveys(string serverName)
    {
        EndpointAddress endpoint = new EndpointAddress(serverName + SERVICE_SITEDATA_URL);
        SiteDataSoapClient client = new SiteDataSoapClient("SiteDataSoap", endpoint);

        _sList[] lists;
        uint count = client.GetListCollection(out lists);
        foreach (_sList list in lists)
        {
            if (list.BaseType == "Survey")
            {
                System.Console.WriteLine(list.Title + ", " + list.InternalName);

                _sListMetadata meta;
                _sProperty[] props;
                uint glc = client.GetList(list.InternalName, out meta, out props);
                System.Console.WriteLine(meta.Title);
            }
        }
    }

As you can see, I fetch all the lists using GetListCollection and then, if it is a survey, I try to get the List information using GetList. I use the List GUID as the list name. An exception is thrown. The SOAP body is shown below.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Eine Ausnahme vom Typ Microsoft.SharePoint.SoapServer.SoapServerException wurde ausgelöst.</faultstring>
      <detail>
        <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
          Die Liste ist nicht vorhanden.

          Die ausgewählte Seite enthält eine Liste, die nicht vorhanden ist. Die Liste könnte von einem anderen Benutzer gelöscht worden sein.
        </errorstring>
        <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x82000006</errorcode>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

The error message says that the list was not found and might have been deleted by someone else. This is strange because my code had fetched the GUID of the list just milliseconds earlier!

Can anyone explain what is going on here? I had the same problem yesterday and at some point it just went away. Unfortunately it came back this morning.

UPDATE As I was writing the question I had an idea. I visited the survey overview page and tried the webservice again. It worked!! Going to the list of surveys page was not enough - I had to go to the overview page itself. Seems the lists need to be 'woken up' each morning. Is this a bug?

share|improve this question
@paul: There is a small chance this related question may help, although it's about workflow: sharepointoverflow.com/questions/741/… – Alex Angas Mar 10 '10 at 11:38

1 Answer

The issue is that the application pool isn't alive yet. We have our load-balanced servers send each other a 'stay-alive' http request through a script that keeps them all immediately responsive. Examples of that are all over the place.

SP goes to sleep after 15 or 20 minutes of inactivity.

Good luck!

share|improve this answer
Did this answer the question? – Wartickler Apr 4 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.