Skip to main content
Add detail
Source Link
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

One final option is to use the SharePoint REST APIs (oData service) to read and update the list data. This option is more lightweight than the client object model and may better suit your needs if you just care about data. Here's a resource that describes how to use the REST service.

REST and LINQ | SharePoint 2010 http://msdn.microsoft.com/en-us/sharepoint/ff462048

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

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

One final option is to use the SharePoint REST APIs (oData service) to read and update the list data. This option is more lightweight than the client object model and may better suit your needs if you just care about data. Here's a resource that describes how to use the REST service.

REST and LINQ | SharePoint 2010 http://msdn.microsoft.com/en-us/sharepoint/ff462048

Clarified meaning
Source Link
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 has builtautomatically attaches Windows credentials for you. If you are using forms-inbased authentication it has facilities to set the authentication to Forms Basedmode and to add yourthe 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

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 has built-in facilities to set authentication to Forms Based and to add your credentials. 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

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

Source Link
Rob Windsor
  • 12.7k
  • 26
  • 40

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 has built-in facilities to set authentication to Forms Based and to add your credentials. 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