consume local web service -ok consume remote service - Not OK

Discussion in 'ASP .Net Web Services' started by dgleeson422111, Jan 26, 2010.

  1. Hi Guys

    Im trying to figure something out about web services. I created the
    simplest web service on my local machine to add two numbers.

    I can consume the service using a proxy but need to understand the
    details of HTTP POST operation.

    So using the code below in a web site from VS2005 all is fine on my
    local machine.

    <%@ Page Language="C#" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    <html xmlns="" >
    <head runat="server">
    <title>Untitled Page</title>
    <form action="http://localhost/AddService/Service.asmx/Add"
    <input name="a"></input>
    <input name="b"></input>

    <input type="submit" value="Enter"> </input>


    We get the following response and you can see an answer of 30 on the
    second line as the parameters given were 20 and 10.

    <?xml version="1.0" encoding="utf-8" ?>
    <int xmlns="">30</int>

    So now I have copied my service.asmx file to my web site on aspspider
    and I can see the service on

    All still OK!

    Now I modify my web site code above to use the (now) remote web
    changing the action line as below

    <form action=""

    Now I get the following web page error.

    Server Error in '/DGleeson' Application.

    Request format is unrecognized for URL unexpectedly ending in '/Add'.

    What are the differences now that the web service is on the aspspider

    Thanks for any responses.


    dgleeson422111, Jan 26, 2010
    1. Advertisements

  2. dgleeson422111

    sdunnin Guest

    sdunnin, Jan 28, 2010
    1. Advertisements

  3. Many thanks

    Yes there was no HTTP POST interface to the web service

    a few lines in web.config fixed that.


    dgleeson422111, Jan 31, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.