SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to login programatically to a SharePoint app and get the HTML code of specific page within that website. Is there a way how I can do that programatically?

I am having problems with the part where I need to pass the login parameters and access the url I need to get the html code.

share|improve this question

SharePoint is nothing more than an ASP.NET application.

Here is a brief article covering screen scrapes, and passing authentication via HTTPWebRequest.

share|improve this answer
Excellent link! – Tom Halladay Jul 29 '11 at 17:30

SharePoint is a lot more than just an ASP.Net web application. It is primarily an object model, within this there are many methods, classes and handlers, which are best accessed by way of the WCF web services.

Accessing SharePoint can be achieved through HTTPWebRequest / Response methods. I would suggest this creates a static link by the URL, which may not suit the requirement. For this reason you can use the SharePoint Web Service to enumerate sites, sub-sites and contents.

The Lists Web service provides methods for working with SharePoint lists, content types, list items, and files. Access this Web service, by creating a Web reference to http://site/_vti_bin/Lists.asmx

This is only one aspect of the available services, refer to MSDN for more.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.