Answered by:
Unable to connect to webservice in the server

Question
-
Hi All,
My webservice has been hosted in my server. I am able to access it from my local machine by giving the link in internet explorer. But when i tried to acces the webservice from the application, i am getting the following error:
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
Any help Guys?
RajaDinesh Kumar M
- Edited by RajaDinesh Kumar Wednesday, November 6, 2013 10:38 AM
- Moved by Carl Cai Monday, November 18, 2013 8:20 AM not relate
Wednesday, November 6, 2013 10:38 AM
Answers
-
You'll find the Web service forum in the below link.
Wednesday, November 6, 2013 1:40 PM -
My webservice has been hosted in my server. I am able to access it from my local machine by giving the link in internet explorer. But when i tried to acces the webservice from the application, i am getting the following error:
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
How do you acces that webservice from the application? Any code?
Just according to this error, we could not get any helpful information to help you.
And you should post it in http://forums.asp.net forum to get support of webservice.
Nice day. : )
remember make the reply as answer and vote the reply as helpful if it helps.
Thursday, November 7, 2013 3:24 AM
All replies
-
try to use internet explorer control from tool box
or
use this function to grab html data
Public Function GETHTTP(ByVal adres As String) As String Dim HttpRequest As Net.HttpWebRequest Dim httpResponse As Net.HttpWebResponse Dim BodtText As String = Nothing Dim Bytes As Int32 Dim ResponseStream As Stream Dim RecvByte(Byte.MaxValue) As Byte HttpRequest = CType(Net.WebRequest.Create(adres), Net.HttpWebRequest) httpResponse = CType(HttpRequest.GetResponse(), Net.HttpWebResponse) ResponseStream = httpResponse.GetResponseStream Do While (True) Bytes = ResponseStream.Read(RecvByte, 0, RecvByte.Length) If Bytes <= 0 Then Exit Do BodtText += System.Text.Encoding.UTF8.GetString _ (RecvByte, 0, Bytes) Loop Return BodtText
End Function
Wednesday, November 6, 2013 11:00 AM -
Wednesday, November 6, 2013 11:06 AM
-
You'll find the Web service forum in the below link.
Wednesday, November 6, 2013 1:40 PM -
My webservice has been hosted in my server. I am able to access it from my local machine by giving the link in internet explorer. But when i tried to acces the webservice from the application, i am getting the following error:
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
How do you acces that webservice from the application? Any code?
Just according to this error, we could not get any helpful information to help you.
And you should post it in http://forums.asp.net forum to get support of webservice.
Nice day. : )
remember make the reply as answer and vote the reply as helpful if it helps.
Thursday, November 7, 2013 3:24 AM