Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

2 Answers 2

SharePoint is nothing more than an ASP.NET application.

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

http://odetocode.com/articles/162.aspx

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

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
add comment

Your Answer

 
discard

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.