SQL Server 2008 R2 Connection issue on OpenShift with C# code

-1

I have deployment of C# code on openshift where it is unable to connect to SQL Server 2008 R2 database (SQL Server 2008 R2 RTM v10.50.1600) and getting the error shown below. The same code works fine with SQL Server 2012.

My connection string is

"SQLNumberingConnection": "server=X4.X6.XXX.XX,12110;database=XYZ;User ID=nnum;Password=XXX;Integrated Security = false;MultipleActiveResultSets=False;Encrypt=False;TrustServerCertificate=True;Connect Timeout=1000" 

And this is the error I get:

System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 35 - An internal exception was caught)

System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer.

System.Net.Sockets.SocketException (104): Connection reset by peer

at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) in //src/System.Net.Sockets/src/System/Net/Sockets/NetworkStream.cs:line 292
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) in /
/src/System.Net.Sockets/src/System/Net/Sockets/NetworkStream.cs:line 298
at System.Data.SqlClient.SNI.SslOverTdsStream.ReadInternal(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token, Boolean async)
at System.Data.SqlClient.SNI.SslOverTdsStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslStream.FillBufferAsync[TReadAdapter](TReadAdapter adapter, Int32 minSize) in //src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 1449
at System.Net.Security.SslStream.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer) in /
/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 1356
at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 753
at System.Data.SqlClient.SNI.SNIPacket.ReadFromStream(Stream stream)
at System.Data.SqlClient.SNI.SNITCPHandle.Receive(SNIPacket& packet, Int32 timeoutInMilliseconds)
at Airbus.ADNS.LoggingService.Logging.LogExceptionInDB(Exception ex, String userID, String controllerName, String actionName)
at Airbus.ADNS.BusinessLogic.ExceptionHandler.ExceptionHandler.OnException(ExceptionContext context)
at Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.OnExceptionAsync(ExceptionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)

c#
sql-server
asp.net-core
containers
openshift
asked on Stack Overflow Feb 9, 2021 by Ankit Mathur • edited Feb 9, 2021 by marc_s

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0