Asynchronous web service access problem.
-
I have created one very simple web service say helloWorld which accepts one string and concate with "Hello" word.and its located in my localhost only. Here is some behavour with it. (1) i can access this web service synchronously without an issue.like Dim webServ As New localhost.Service Response.Write(webServ.HelloWorld(TextBox1.Text)) (2)now i am trying to call it asynchronously. Like this Dim ar As IAsyncResult = webServ.BeginHelloWorld(TextBox1.Text, Nothing, Nothing) While (True) If ar.IsCompleted Then Exit While End If End While Response.Write(webServ.EndHelloWorld(ar)) (3) Now this code is executes file on the other machine i have ,but is not been able to call on my machine.I am receiving following error on the execution of above code. The attempted operation is not supported for the type of object referenced " at System.Net.Sockets.Socket.get_ConnectEx() at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)" System.Net.WebException = {"Unable to connect to the remote server"} (4) i done long googling but could'nt get the exact solution. (5) I also tried by removing my framework 2.0 ,visual studio 2005 and IIS as well. (6) Some blogs says its network error,i also tried by repairing my network drivers but problem persists as it is. (7) Some blogs also suggested that i do have third party network protocols and that may causes the blocking of Http Request for async. call.then i also removed all such softwares from my machine,but the same result. I am very frustated with this issue and hampered my development. Any kind of help is most welcomed. lots thanks in advance.