Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Consuming local web service - ok, remote web service -problem?

Reply
Thread Tools

Consuming local web service - ok, remote web service -problem?

 
 
dgleeson422111
Guest
Posts: n/a
 
      01-26-2010
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" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form action="http://localhost/AddService/Service.asmx/Add"
method="POST">
<input name="a"></input>
<input name="b"></input>

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

</body>
</html>
---------------------------------------------------------------

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="http://tempuri.org/">30</int>
--------------------------------------------------------------

So now I have copied my service.asmx file to my web site on aspspider
and I can see the service on http://aspspider.biz/DGleeson/Service.asmx

All still OK!

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

<form action="http://aspspider.biz/DGleeson/Service.asmx/Add"
method="POST">

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
host?

Thanks for any responses.

Regards

Denis
_____________________________
http://www.CentronSolutions.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
consume local web service -ok consume remote service - Not OK dgleeson422111 ASP .Net Web Services 2 01-31-2010 08:02 PM
Error Consuming Web Service from WIndows application when WebService is using Custom Service Account ( Create an Application Pool with a Custom Identity) DNB ASP .Net Security 1 01-22-2008 09:08 PM
Error Consuming Web Service from WIndows application when WebService is using Custom Service Account ( Create an Application Pool with a Custom Identity) DNB ASP .Net Web Services 1 01-20-2008 01:47 PM
SOAP Header in a Dot Net 2.0 Web Service Client Consuming a WCF 3.0 service. Curt K ASP .Net Web Services 3 06-15-2007 10:19 PM
vs2005 consuming web service, adding web reference ? only_me ASP .Net Web Services 2 09-25-2005 12:46 PM



Advertisments