This Error will occur when you try for accessing in Office 365 http://
- After Adding Web Reference
- In Solution Explorer, click Show All Files.
- Under Web Reference, expand your web service reference.
- Expand Reference.map, and then double click
Reference.cs to open the file.
- Add these class to Reference.cs file
public partial class Lists :
System.Web.Services.Protocols.SoapHttpClientProtocol
{
{
protected override System.Net.WebRequest
GetWebRequest(Uri uri)
{
{
System.Net.WebRequest wr = null;
try
{
try
{
wr =
base.GetWebRequest(uri);
wr.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED",
"f");
}
catch (Exception ex)
{
}
catch (Exception ex)
{
}
return wr;
}
return wr;
}
}
No comments:
Post a Comment