I am developing an Asp.Net web application that will access data in a list on a SharePoint 2010 server. Can anyone tell me how do I authenticate a user against SharePoint using the server side object model? What are the different possible methods that I can use use to achieve this? The question may be dumb as I am really new to SharePoint and I'm stuck with it. I know how to do it using ASP.NET web services exposed by sharepoint.
1 Answer
All users are by default Authenticated in SharePoint (unless you are using a zone with anonymous access). You don't have to do anything.
Impersonation, if that is what you actually mean, is done in the same way as in plain ol' ASP.NET.
-
Thanks for ur reply. I am developing an ASP.Net web application. But the data is present in Sharepoint lists. For some reasons i need to use server side object model. And my code will reside on the server. Now if I need to validate a user who has access to sharepoint site and I need to provide him access to my application by checking against his sharepoint credentials. How do I do it. Thanks in advance– SSGCommented Dec 5, 2011 at 9:23
-
If you're developing an application that is hosted outside of SharePoint you should use the Client Object Model or the SharePoint web services - not the SharePoint server side API (even though you can). Commented Dec 5, 2011 at 9:37