Click here to Skip to main content
15,890,527 members

Comments by Member 3020851 (Top 3 by date)

Member 3020851 24-Apr-20 9:59am View    
Thank you for your support sir,
i stopped the firewall and antivirus and internet security but still it is not working.

anyways, if it is working with you then it should work with me too. i will try to check some more options.
Member 3020851 24-Apr-20 9:37am View    
there is only one header content-type = "application/json"

i tried with xml and all other possible values of content types.
Member 3020851 24-Apr-20 9:32am View    
following is detailed exception

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
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)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at testCornAPI.Form1.Button1_Click(Object sender, EventArgs e) in E:\mssource2018\mssource\CornAPI\testCornAPI\testCornAPI_200424\testCornAPI\Form1.vb:line 55

i tried by adding following and checked with all protocols TTL to ssl3

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3

but everytime same exception.

my codes are working if i put same API on another web server with https but it does not work on azure

following is full link
https://cornapi.azurewebsites.net/api/values


Please suggest if possible, thanks