Showing posts with label Webpart Debugging. Show all posts
Showing posts with label Webpart Debugging. Show all posts

Friday, 27 July 2012

The request failed with HTTP status 417: Expectation failed when SharePoint calling .asmx web service

I tried to access a web method in a .asmx web service from SharePoint web service.
To add a web reference steps
  1. Add Service Reference
  2. Click Advance button in the window
  3. Click Add Web Reference in the next window
  4. Then paste the asmx path add give a reference name then click ok
After this I tried to call the web method but it gives the  The request failed with HTTP status 417 error  I tried with Google finally I found a link in Code Project
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 :)  

Friday, 1 July 2011

How to rectify the IIS error occured at the time of debug a web part

Steps
  1. start->run type 'inetmgr' to open IIS manager
  2. Click the domain name and select your application pool the click advanced settings
  3. In the property window     
  • Set Ping Enabled to False.
  • Set Ping Maximum Response Time to a value that is larger than 90 seconds.
              

How to enable debugging in visual studio 2010 for a web part

Steps:
  1. Set break point as you needed.
  2. Debug -> Attach Process 
  3. A window appears select any wpw3.exe then click ok then click confirm
  4. Start Debug