I need to create a windows application which will access SharePoint 2010 site page to stote that page in ".htm" format in local drive.
But, that SharePoint site has claim based authentication.
For accessing that site I have to provide "Username" & "Password" along with "Domain name".
So, I need help on how can I pass site credentials through windows application to get access into that site??
I have used following code but this throws exception "The remote server returned an error: (403) Forbidden".
WebRequest Request1;
HttpWebResponse Response1;
Request1 = WebRequest.Create(txtUrl.Text.ToString());
Request1.Credentials = new NetworkCredential(strUserNm.ToString(), strPassword.ToString(), StrDomain.ToString());
Request1.PreAuthenticate = true;
Response1 = (HttpWebResponse)Request1.GetResponse();
Any help will be appreciable...