I want to authenticate to a an external web page from my windows phone application. I will then want to do further scraping of pages on the site but need to get past the authentication issue.
The page on the external website has a function call validateLogin which takes login name and password.
I want to call this function from my Windows Phone code passing in the required arguments. This would facilitate logging into the site and hopefully I can continue to scrape the pages.
Use the
WebBrowser
control and call theInvokeScript
method. Ensure that you setIsScriptEnabled
on theWebBrowser
control and that you specify the ID_CAP_WEBBROWSERCOMPONENT capability in WMAppManifest.xml.As a side note: Scraping web pages is rarely a robust and reliable approach of creating an application that uses a website :)