I tried to access a web method in a .asmx web service from SharePoint web service.
To add a web reference steps
http://www.codeproject.com/Articles/94235/The-request-failed-with-HTTP-status-417-Expectatio
Steps to Resolve
To add a web reference steps
- Add Service Reference
- Click Advance button in the window
- Click Add Web Reference in the next window
- Then paste the asmx path add give a reference name then click ok
http://www.codeproject.com/Articles/94235/The-request-failed-with-HTTP-status-417-Expectatio
Steps to Resolve
- We need to have this line of code before making any web requests:
System.Net.ServicePointManager.Expect100Continue = false;
Add these lines to the application's configuration file (between
<configuration>
and</configuration>
):<system.net> <settings> <servicePointManager expect100Continue="false" /> </settings> </system.net>
Now Everything goes fine.
Happy Coding :)