Dear All,
I have written a Web Service which is called from ASPX file(Web Form). It
works fine on the local machine. On the local machine I am using the
following command
wsdl.exe /l:cs http://localhost/ReturnEvents/Service1.asmx?wsdl
Now I want to use the same service on the Remote Server. What I think is
that the
above path should be changed as it is localhost. So I try to do something
like this
wsdl.exe /l:cs http://www.hop.man.ac.uk/ReturnEvents/Service1.asmx?wsdl
where www.hop.man.ac.uk is the server where I am trying to host my web service
But it does not compile and throws the following error:
There was an error downloading:
http://www.hop.man.ac.uk/ReturnEvents/Service1.asmx?wsdl
The request failed with HTTP status 404: Not Found
I dont know whether I going in a right direction. It works fine on the
client machine
But on the server when I change the path to my server name it throws this
error.I mean we cant use localhost in the wsdl when using Web service on the
REMOTE server. Dont know what to do. Any help would be greatly appreciated.
Cheers,
Sunil Sabir
AndyMalakov - 16 Dec 2004 18:08 GMT
We also getting 404 for
http://www.hop.man.ac.uk/ReturnEvents/Service1.asmx :-)
Other thing to check if you internet connection needs http proxy server.
Dan Rogers - 16 Dec 2004 18:49 GMT
Hi Sunil,
You shouldn't be using WSDL.exe to move a service to a different server.
Instead, after you get the server ready to run the applicaiton (e.g.
install IIS, install the .NET Framework server components), you should
publish your service implementation to the server.
The service itself is unaware of it's address. It's just code, running on
a server.
To publish, open your project in Visual Studio, and after it is loaded, use
the Publish option on the File menu to publish the right files to the
server.
Once the service is moved, the code that calls the client side proxy should
use a configuration setting to change the server/service address. If you
change the proxy property to "dynamic", you can then change the URL setting.
I hope this helps
Dan Rogers
Microsoft Corporation
--------------------
>Thread-Topic: Web Service Problem
>thread-index: AcTjlHZM9BRyGSjVTCOpn5WmnWgLPw==
[quoted text clipped - 17 lines]
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:27238
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 32 lines]
>
>Sunil Sabir
erymuzuan - 16 Dec 2004 23:21 GMT
if you look at the proxy again there's a property called URL, it's the
web service endpoint, now every time you move the service address all
you should do just change this property either directly in the proxy
file all the calling code
Mywebservice svc = new myWebService();
svc.Url = ConfigurationSetting.AppSettings["MyWebSerice.Url"];
The reason why you're getting error 404 , my guess would be the
"ReturnEvents" virtual directory is not configured at all or incorrectly
pointing to wrong folder
actually you can place the service1.asmx in wwwroot directory and the
dll in wwwroor\bin and all you have to is change the proxy Url to
http://www.hop.man.ac.uk/Service1.asmx
Regards
Erymuzuan Mustapa
> Dear All,
>
[quoted text clipped - 30 lines]
>
> Sunil Sabir