title: SharePoint web service reference, WSS 3.0, Visual Studio 2010, Authentication
body: <p>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. </p>
  
  <p>This happens on both the local dev install of SharePoint, or against the production SharePoint environment, same results no matter what we try.</p>
  
  <p>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.</p>
  
  <p>This is the code being used via C# to authenticate to SharePoint WSS:</p>
  
  <pre><code>_lists = new Lists
         {
             Credentials = new NetworkCredential(UserName, Password, Domain),
             Url = string.Format("{0}/_vti_bin/Lists.asmx", BaseUrl),
             UseDefaultCredentials = false
         }; // Reference the list object.
  </code></pre>
  
  <p>Once the code hits the line below it hangs for 30-60 seconds.</p>
  
  <pre><code>the GetList(string listName) 
  
  _lists.GetList("TestList");
  </code></pre>
  
  <p>Any call thereafter is extremely fast.</p>
  
  <p>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. </p>
  
  <p>Please see images in order of events for adding a web service:</p>
  
  <p>Add Web service: </p>
  
  <p><img src="https://i.stack.imgur.com/XyUFh.jpg" alt="enter image description here"></p>
  
  <p>Next we get three dialog for list, error and meta data and none of them validate.  </p>
  
  <p>Close Up for First screen:</p>
  
  <p><img src="https://i.stack.imgur.com/w5hNS.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/hLT05.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/LF4OZ.jpg" alt="enter image description here"></p>
  
  <p>We finally hit cancel.</p>
  
  <p><img src="https://i.stack.imgur.com/vzTBz.jpg" alt="enter image description here"></p>
  
  <p>And can see the calls we can make against the service:</p>
  
  <p><img src="https://i.stack.imgur.com/wwd9J.jpg" alt="enter image description here"></p>
  
  <p>Anyone have any ideas?</p>