Server Error in '/' Application.

Received an unexpected EOF or 0 bytes from the transport stream.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.

Source Error:


Line 241:            if (defaultimgpath.Substring(0, 7).ToLower().CompareTo("http://") != 0)
Line 242:                defaultimgpath = "http://" + defaultimgpath;
Line 243:            str = new MemoryStream(Client.DownloadData(defaultimgpath));
Line 244:
Line 245:           //process.ResizeImage(bmp, XMax, YMax);

Source File: d:\Vhost\store.oblibene.cz\www\app_code\watermark.cs    Line: 243

Stack Trace:


[IOException: Received an unexpected EOF or 0 bytes from the transport stream.]
   System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +5400338
   System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) +102
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +181
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +49
   System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +137
   System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +143
   System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +99
   System.Net.TlsStream.CallProcessAuthentication(Object state) +47
   System.Threading.ExecutionContext.runTryCode(Object userData) +80
   System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
   System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) +102
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +68
   System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +746
   System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +58
   System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +26
   System.Net.ConnectStream.WriteHeaders(Boolean async) +124

[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +287
   System.Net.WebClient.DownloadData(Uri address) +106
   System.Net.WebClient.DownloadData(String address) +29
   WaterMark.watermarkbyimage(String watermarkconfigpath, String imagepath, Int32 XMax, Int32 YMax, String ext, String& statMsg) in d:\Vhost\store.oblibene.cz\www\app_code\watermark.cs:243
   watermarkimage.ProcessRequest(HttpContext context) in d:\Vhost\store.oblibene.cz\www\watermarkimage.ashx:90
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062