Skip to main content
2 of 3
Clarified meaning
Rob Windsor
  • 12.7k
  • 26
  • 40

If SharePoint is using Windows Authentication (which is the default) then all you need to do in your ASP.NET app is to attach credentials to the Web service proxy. To attach the credentials of the current user you would use something like:

proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

With that said, I would suggest that you take a look at the Client Object Model. It's much easier to use than SharePoint's SOAP Web services. For example, the Client Context object automatically attaches Windows credentials for you. If you are using forms-based authentication it has facilities to set the authentication mode and add the credentials of the forms-based user. No need to set cookies and so on.

You can get information in several places, here are two:

Microsoft SharePoint 2010 Developer Training Course http://msdn.microsoft.com/en-us/sp2010devtrainingcourse_clientobjectmodel_unit

Plualsight SharePoint 2010 Client Object Model Course (requires a subscription but you can get a free trial that will give you enough time to watch the course) http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=sp2010-client-object-model

Rob Windsor
  • 12.7k
  • 26
  • 40