URL Unexpectedly Ending Error with ASP.NET 2.0 Web Services

by admin 22. July 2006 20:30

While preparing for the first tutorial in the new web services subject that I'm tutoring I came across the following exception: "Request format is unrecognized for URL unexpectedly ending in '/ConvertTemperature'". Unfortunately Google failed me so I decided I'd post the fix I found.

Simply changing the address from "http://localhost/..." to "http://127.0.0.1/..." fixed it right up. I haven't bothered searching for the exact cause of the problem, for a change I'm happy enough with just finding a solution. I do remember coming up against a very similar problem recently so perhaps one day I'll get around to explaining this fully. In the meantime this is an adequate solution.

So next time you get the error "Request format is unrecognized for URL unexpectedly ending in '/???'" while developing asmx web services in ASP.NET 2.0 try this as a solution.

Comments (8) -

1/18/2008 1:58:40 PM #

The better solution is in modifying web.config, adding following lines
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>

solves the problem permanently

Lotas

8/14/2008 2:48:00 PM #

BalochDude

Thanks Lotas for the solution. It works.

BalochDude

9/2/2008 2:25:31 AM #

marky

Does NOT seem to work when calling a web service from ASP page. Still get the error after putting those names in the protocols.

Any ideas???

Marky

marky

9/2/2008 2:28:31 AM #

marky

I take that back. I added those names in the wrong place. Needed to put them with the web service NOT with the app calling the service. Thanks for stimulating this old cobweb mind into action.....

AHHHH

Marky

marky

6/3/2009 2:03:08 PM #

Smile simply does it, quality.

Kellie Holmes

2/17/2010 1:04:11 PM #

this is what i am looking for, thank you

edwin

3/1/2010 1:04:45 PM #

Faheem

It works for me. Thanks.

Faheem

3/5/2010 10:51:07 PM #

Alok Kumar Sharma

I have alredy add key in modifying web.config
following lines
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>

still issued is not resolved .

What are the main reason about this problem ?

Alok Kumar Sharma

Comments are closed

About Us

RikWare is a software development company based in Brisbane, Australia. Led by director, Richard Mason, RikWare focusses on solving challenging business problems promptly and effectively.

RikWare is also the owner of Aussie Bushwalking, a free, wiki-like collaboration site for bushwalkers and the creator of RikMigrations, a migration framework for .NET.

Aussie Bushwalking

Want to discover some new bushwalking ideas? Share a few of your own? Aussie Bushwalking is like Wikipedia... but for bushwalkers. Head on over. Anybody can see the walks and it's free to sign up and share your own.

 

RikMigrations

RikMigrations is a database migration library for .NET based on the migrations facility provided by Ruby on Rails. It allows simple upgrading and downgrading of databases using .NET code (such as VB or C#) either from the command line or built into your application. Unlike many other migration frameworks, RikMigrations is a stand-alone library which does not rely on a large surrounding framework.