By aghaux


2012-02-28 22:33:01 8 Comments

I am trying to connect to a SSL Secured Webservice with my ASP.NET (C#) application. On my local machine everything works well, but on my server the folling error appears.


**System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. --->

System.IO.IOException: The decryption operation failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted**

--- End of inner exception stack trace --- at System.Net.Security._SslStream.ProcessReadErrorCode(SecurityStatus errorCode, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer) at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) --- End of inner exception stack trace --- at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Skuldabrefaafleidur.Skyrsla(SkyrslaRequest SkyrslaRequest) in d:\builds\36\Securities\D_SIFeedDaemon_1.0\Sources\SIFeedDaemon\Models\Skuldabrefaafleidur.cs:line 44 at SIFeedDaemon.Services.DaemonProgram.SendDataToWebService(SkyrslaType pSkyrslaType) in d:\builds\36\Securities\D_SIFeedDaemon_1.0\Sources\SIFeedDaemon\Services\DaemonProgram.cs:line 163] - [beee4c0b-3a49-40ff-ad86-d14ba37b2bf5]

I already granted the access for ASP.NET(NETWORK_SERVICE on server) to certificates store on the local machine by using winhttpcertcfg.exe. I'm running windows 7 with .net 4 and server is windows server 2008 with .net 4 support.

Thx in advanced

agh

0 comments

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] C# : System.Net.WebException: The underlying connection was closed

  • 2017-09-08 10:10:50
  • user1168608
  • 1072 View
  • 2 Score
  • 2 Answer
  • Tags:   c# .net rest http

3 Answered Questions

[SOLVED] System.IO.IOException: The handshake failed due to an unexpected > packet format?

  • 2011-03-03 09:21:56
  • TheLearner
  • 35334 View
  • 18 Score
  • 3 Answer
  • Tags:   c# wcf

2 Answered Questions

0 Answered Questions

Error on production server

0 Answered Questions

WCF service - connection was forcibly closed by the remote host

  • 2014-06-12 13:32:11
  • SelvirK
  • 2419 View
  • 0 Score
  • 0 Answer
  • Tags:   c# asp.net .net wcf

0 Answered Questions

PowerShell + HttpWebRequest throws exception

1 Answered Questions

2 Answered Questions

[SOLVED] Accessing Webservice which is hosted on https server

1 Answered Questions

How do access a secure website within a sharepoint webpart?

Sponsored Content