title: Sharepoint connection with a username and password
body: <p>i've searched during 2 days to resolve my problem but there is no way!
  in fact, i'd like to connect to sharepoint using a user's account (there is no probleme when i use anonymous connexion).
  i added a web reference of authentification and lists to use this code:</p>
  
  <pre><code>SPConnect.Authentication authSP = new SPConnect.Authentication();
  SPLists.Lists spLists = new SPLists.Lists();
  authSP.CookieContainer = new System.Net.CookieContainer();
  authSP.AllowAutoRedirect = true;
  SPConnect.LoginResult loginSP = authSP.Login("administrateur", "pass");
  if (loginSP.ErrorCode == SPConnect.LoginErrorCode.NoError)
     {
         spLists.CookieContainer = authSP.CookieContainer;
         //object list = spLists.GetList("presentationAccueil");
         SPSite oSiteCollection = SPContext.Current.Site;
         SPList listeee = oSiteCollection.AllWebs["http://vmspprod:25401"].Lists["presentationAccueil"];
      }
  </code></pre>
  
  <p>i get this erro NotInFormsAuthenticationMode when i execute </p>
  
  <blockquote>
    <p>SPConnect.LoginResult loginSP = authSP.Login("administrateur", "pass");</p>
  </blockquote>
  
  <p>is there any other method to use a user's login and password?</p>
  
  <p>Thank you in advance for your answers.           </p>