Web service problem
-
I tried to make as simple example using web service as possible: - I created a web service project from the templated installed in VS2005 - I mark it as a virtual directory and put it under C:\Inetpub\wwwroot directory - I created a windows application, and added web reference to http://83.175.131.18/MartinezService/Service.asmx (you may try that yourself) - Then I tested it with:
privatevoid Form1_Load(object sender, EventArgs e) { MartinezService.Service s = new WindowsApplication1.MartinezService.Service(); MessageBox.Show(s.HelloWorld()); }
It worked perfectly. But when I send this windows application to my friend and ask him to execute it, he got the following error:System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Próba przeprowadzenia operacji, wykonywanej przez gniazdo, na nieosi¹galnym hoœcie (try to perform an operation on non-reachable host) at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at WindowsApplication1.MartinezService.Service.HelloWorld() in D:\C# WORKSPACE\WindowsApplication1\WindowsApplication1\Web References\MartinezService\Reference.cs:line 78 at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in D:\C# WORKSPACE\WindowsApplication1\WindowsApplication1\Form1.cs:line 21 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows