Wednesday, December 22, 2010

Request format is unrecognized for URL unexpectedly ending exception in web service.

Recently I was getting error when I am calling web service using Java script. I searching on net and debugging I have found following things.

Any web service support three kinds of protocol HttpGet,HttpPost and SOAP. In framework 1.0 it was enabled by default but after 1.0 framework it will not be enabled by default due to security issues and WS-Specifications. So we have to enabled them via putting configuration settings in web.config. Here is the code for that.

<configuration>
<system.web>
<webservices>
<protocols>
<add name="HttpGet"></add>
<add name="HttpPost"></add>
</protocols>
</webservices>
</system.web>
</configuration>
Hope this will help you. Stay tuned for more. Till that Happy programming!!!.

Technorati Tags: ,,,

Shout it
Share:

1 comment:

  1. Thanks a lot :) I have spent on this problem 2 hours. In the server, where I host my web service, all was fine. But client always got error that can not recognize the URL.

    Vahag.

    ReplyDelete

Your feedback is very important to me. Please provide your feedback via putting comments.

About Me
My Photo

Full Stack Developer,Blogger,Microsoft Mvp, Mentor, Life long learner, 10+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC,Web Forms,C#,AngularJs,Golang
Mvp profile
Subscribe to my blog

Enter your email address:

Follow us on facebook
Blog Archive
Total Pageviews