<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp) in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59533#M34116</link>
    <description>&lt;P&gt;The version is fine now.&lt;/P&gt;&lt;PRE&gt;using System.Net; 
using System.Security.Authentication;&lt;/PRE&gt;&lt;P&gt;In the function where you make your web request, try:&lt;/P&gt;&lt;PRE&gt; const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
 const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
 ServicePointManager.SecurityProtocol = Tls12;&lt;/PRE&gt;</description>
    <pubDate>Fri, 25 Aug 2017 01:53:54 GMT</pubDate>
    <dc:creator>NexusSoftware</dc:creator>
    <dc:date>2017-08-25T01:53:54Z</dc:date>
    <item>
      <title>Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59510#M34093</link>
      <description>&lt;P&gt;I have downloaded the AuthorizeNet solution from github, which contains a project CoffeeShopWebApp.&amp;nbsp; After changing the API Login and Transaction Key values in web.config, I built the solution successfully on my pc (Visual Studio 2013).&amp;nbsp; However, when I run the CoffeeShopWebApp (debug is enabled), after clicking on the button to purchase the coffee (using test credit card info), I get this error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Received an unexpected EOF or 0 bytes from the transport stream.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;STRONG&gt;Description: &lt;/STRONG&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Exception Details: &lt;/STRONG&gt;System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Source Error:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;Line 71:             // post data is sent as a stream
Line 72:             StreamWriter myWriter = null;
&lt;FONT color="red"&gt;Line 73:             myWriter = new StreamWriter(webRequest.GetRequestStream());&lt;/FONT&gt;Line 74:             myWriter.Write(postData);
Line 75:             myWriter.Close();&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;BR /&gt;&lt;STRONG&gt;Source File: &lt;/STRONG&gt;c:\Users\Bob\Documents\farodegracia\AuthorizeNet-C_sharp\sdk-dotnet-master\sdk-dotnet-master\Authorize.NET\AIM\Gateway.cs&lt;STRONG&gt; &amp;nbsp;&amp;nbsp; Line: &lt;/STRONG&gt;73&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Stack Trace:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;[IOException: Received an unexpected EOF or 0 bytes from the transport stream.]
   System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +5391218
   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.HttpWebRequest.GetRequestStream(TransportContext&amp;amp; context) +1880801
   System.Net.HttpWebRequest.GetRequestStream() +13
   AuthorizeNet.Gateway.SendRequest(String serviceUrl, IGatewayRequest request) in c:\Users\Bob\Documents\farodegracia\AuthorizeNet-C_sharp\sdk-dotnet-master\sdk-dotnet-master\Authorize.NET\AIM\Gateway.cs:73
   AuthorizeNet.Gateway.Send(IGatewayRequest request, String description) in c:\Users\Bob\Documents\farodegracia\AuthorizeNet-C_sharp\sdk-dotnet-master\sdk-dotnet-master\Authorize.NET\AIM\Gateway.cs:119
   AuthorizeNet.Gateway.Send(IGatewayRequest request) in c:\Users\Bob\Documents\farodegracia\AuthorizeNet-C_sharp\sdk-dotnet-master\sdk-dotnet-master\Authorize.NET\AIM\Gateway.cs:42
   CoffeeShopWebApp.Order.btnOrder_Click(Object sender, EventArgs e) in c:\Users\Bob\Documents\farodegracia\AuthorizeNet-C_sharp\sdk-dotnet-master\sdk-dotnet-master\CoffeeShopWebApp\Order.aspx.cs:40
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;STRONG&gt;Version Information:&lt;/STRONG&gt;&amp;nbsp;Microsoft .NET Framework Version:2.0.50727.8669; ASP.NET Version:2.0.50727.5491 &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 21:34:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59510#M34093</guid>
      <dc:creator>farodegracia9</dc:creator>
      <dc:date>2017-08-23T21:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59512#M34095</link>
      <description>You will probably want to upgrade your .Net Framework version to at least 4.5, preferably 4.6, in order to more easily make TLS 1.2 connections.</description>
      <pubDate>Wed, 23 Aug 2017 22:31:35 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59512#M34095</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-08-23T22:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59530#M34113</link>
      <description>&lt;P&gt;Still getting the same error after upgrading and rebuilding the project.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;STRONG&gt;Version Information:&lt;/STRONG&gt;&amp;nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2053.0 &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I go to the properties page of the project in Visual Studio 2013, there is a drop down to select the target framework.&amp;nbsp; I selected .NET Framework 4.5, so I don't know why the version information above (which appears at bottom of error page) shows version 4.0.30319&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 00:55:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59530#M34113</guid>
      <dc:creator>farodegracia9</dc:creator>
      <dc:date>2017-08-25T00:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59533#M34116</link>
      <description>&lt;P&gt;The version is fine now.&lt;/P&gt;&lt;PRE&gt;using System.Net; 
using System.Security.Authentication;&lt;/PRE&gt;&lt;P&gt;In the function where you make your web request, try:&lt;/P&gt;&lt;PRE&gt; const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
 const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
 ServicePointManager.SecurityProtocol = Tls12;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Aug 2017 01:53:54 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59533#M34116</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-08-25T01:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Received an unexpected EOF or 0 bytes from the transport stream. (CoffeeShopWebApp)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59535#M34118</link>
      <description>&lt;P&gt;Yes, that worked and thanks.&amp;nbsp; I am wondering why sample code (CoffeeShopWebApp project) was included in the AuthorizeNet download from github that won't run without some modification.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 20:18:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Received-an-unexpected-EOF-or-0-bytes-from-the-transport-stream/m-p/59535#M34118</guid>
      <dc:creator>farodegracia9</dc:creator>
      <dc:date>2017-08-25T20:18:58Z</dc:date>
    </item>
  </channel>
</rss>

