User Id :    Password :      New Member   Forgot Password  
 
Request format is unrecognized for URL unexpectedly ending in Web Method()
Description It was about web service related error.   No. of Views     5614
  Rating     0
Author Ahsan Murshed   Posted On     16 Jul 2010
Tags Web Service    

Sample Code   Download Code

Request format is unrecognized for URL unexpectedly ending in Web Method()

Today I want to share with you a new problem which I had faced yesterday.

Problem:

It was about web service related error. I have used Web Method() in my application to fill up a country dropdown. Everything was going well but when I had used this web method it showed me an error like this:

System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetCountyList'.

Information:
After googling, I have found the solution.

This error was occured because GET and POST are disabled by default in ASP.NET 2.0 and greater. Now I would like to share this with you. From msdn I have got some relative information which may help you to get understand clearly.

The .NET-connected Web services support HTTP GET, HTTP POST and SOAP protocols. By default, in .NET Framework 1.0, all three protocols are enabled. By default, in .NET Framework 1.1 or greater, HTTP GET and HTTP POST are both disabled. This is for security reasons.

Applications that use HTTP GET or HTTP POST to invoke a Web service fail when the Web service is upgraded to .NET Framework 1.1 or greater. These applications receive a exception: System.InvalidOperationException: Request format is unrecognized.

Solution:
HTTP GET and HTTP POST may be enabled by editing the Web.config file for the vroot where the Web service resides. The following configuration enables both HTTP GET and HTTP POST:
 
 
 
 
 
 
 
 


For more info pls visits these links:
http://support.microsoft.com/default.aspx?scid=kb;en-us ;819267
http://forums.asp.net/t/1459560.aspx
http://aspadvice.com/blogs/ssmith/archive/2007/09/04/FIX-Request-format-is-unrecognized-for-URL-unexpectedly-ending-in. aspx
http://forums.asp.net/t/988377.aspx

About Author

About Author I am working as Software engineer having 4+ years of experience in Microsoft Technologies, System Design and Integration and deployment, Search Engine Optimization (SEO). I have developed web based application in asp.net/C# and database design. My Site: http://www.dotnetboss.com My blog: http://aspboss.blogspot.com Ahsan
No Photo
 
Country N/A
Company N/A
Home Page N/A

Rate this article

Rating options from poor, fair, good, very good to excelent.  
 

Comments

   
Write your comment here.
Comment
Verification Code