Hi me using the following code for calling webservice funtion but it give error .this code me using on single alone pc mean not connect to network.
Error deail : unable to connect to the remote server
localhost.WebService webSevice = new FirstSmartDeviceProject.localhost.WebService();
webSevice.Url = "http://localhost/2005/WebService.asmx";
string ss = webSevice.Openconnection();
Loading
Sam HobbsPosted Jun 28, 2011, 11:02 PM
Imtiaz KhanPosted Jun 28, 2011, 4:57 AM
Sam HobbsPosted Jun 27, 2011, 1:15 PM
Can you ping that server? Do you know how to ping? You can go to a command prompt window and use the ping command with the url as a parameter, as in:
Imtiaz KhanPosted Jun 27, 2011, 7:21 AM
following is try catch error msg and my firewall is already set off.
{System.Net.WebException: Could not establish connection to network.
at System.Net.HttpWebRequest.finishGetResponse()
at System.Net.HttpWebRequest.GetResponse()
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse()
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse()
at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
at DeviceApplication1.localhost.WebService.HelloWorld()
at DeviceApplication1.Form1.button1_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at DeviceApplication1.Program.Main()
}
Sam HobbsPosted Jun 24, 2011, 3:31 PM
Are you sure the firewall is allowing the connection? It might be not allowing it.