This error was happened on-and-off when executing the asmx service in background schedule job in production server. In my localhost it work fine. I had try to solve this thread abortion issue by adding System.Web.HttpContext.Current.Server.ScriptTimeout to 90 seconds and longer when process the background job but it still persist. The thread abortion sometimes might occur in different stage but mostly occurs in below stack trace.
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Net.UnsafeNclNativeMethods.OSSOCK.recv(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags)
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at FirebirdSql.Data.Client.Managed.Version10.XdrStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadBytes(Int32 count)
at FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadInt32()
at FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadNextOperation()
at FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadOperation()
at FirebirdSql.Data.Client.Managed.Version11.GdsDatabase.ReadOperation()
at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadSingleResponse()
at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadResponse()
at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadGenericResponse()
at FirebirdSql.Data.Client.Managed.Version12.GdsStatement.Execute()
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
Related
I have an ASP.NET application running under .NET Framework 4.7.2.
In my application I am trying to connect to my Sharepoint site to create or rename folders.
Unfortunately I am getting below error.
I've been searching around on the internet and found a lot of articles talking about TLS but my application has TLS 1.2 by default due to the .NET Framework 4.7.2.
Does anyone would know the reason/background of the error?
(I don't have the error on my local machine (no SSL), error only occurs after deploying to my hosting environment with SSL)
This is the full error message:
Server Error in '/' Application.
An existing connection was forcibly closed by the remote host
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.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +106
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +130
[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +291
System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +32
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +156
System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +281
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +49
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +162
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +542
System.Net.TlsStream.CallProcessAuthentication(Object state) +42
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +228
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +21
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +64
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +778
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +52
System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +103
System.Net.ConnectStream.WriteHeaders(Boolean async) +388
[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
System.Net.HttpWebRequest.GetResponse() +1399
Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() +37
Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate() +514
Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest() +126
Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() +44
Axius.Presentation.Website.frmAdminProjectDossierDetail.chkDossierSharepoint_CheckedChanged(Object sender, EventArgs e) in C:\inetpub\wwwroot\Axius.Presentation.Website\frmAdminProjectDossierDetail.aspx.cs:3637
System.Web.UI.WebControls.CheckBox.OnCheckedChanged(EventArgs e) +116
System.Web.UI.WebControls.CheckBox.RaisePostDataChangedEvent() +139
System.Web.UI.WebControls.CheckBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +12
System.Web.UI.Page.RaiseChangedEvents() +132
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1559
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0
And this is the code:
using (ClientContext context = new ClientContext("https://mysite.sharepoint.com/"))
{
var passWord = new SecureString();
foreach (char c in "XXXXXXXXXX".ToCharArray()) passWord.AppendChar(c);
context.Credentials = new SharePointOnlineCredentials("my#account.com", passWord);
List oList = context.Web.Lists.GetByTitle(#"Gedeelde documenten");
FolderCollection folders = oList.RootFolder.Folders;
context.Load(folders);
context.ExecuteQuery(); //this is frmAdminProjectDossierDetail.aspx.cs:3637 visible in the error
foreach (Folder folderr in folders)
{
if (folderr.Name == "01 PROJECTEN DOCS")
{
//code continues
}
}
}
There are at least two parts of a TLS connection: version and ciphersuites. You need to check the ciphers you have on your local machine:
https://learn.microsoft.com/en-us/powershell/module/tls/get-tlsciphersuite?view=windowsserver2022-ps
Then you should check the ciphers that are available on the sharepoint site:
https://www.ssllabs.com/ssltest/
At least one of the ciphers must match in order to complete the connection.
The code below is used in a traditional asp.net web page monolith app to call a handful of microservices hosted in an amazon ec2 instance. While developing the new services, the calls were made using http. This was prior to security hardening. Now, we are calling the remote webservices using https.
Https, works on my local machine, however, when deployed to IIS on a remote DEV server, the following errors are being returned.
Dim url = "https://microservice/api/someroute"
Dim client As New HttpClient
client.DefaultRequestHeaders.Add("ClientKey", clientKey)
client.DefaultRequestHeaders.Add("Bearer", AuthenticationJwt)
client.DefaultRequestHeaders.Add("TrackingId", trackingId)
'.Result is used because the asp.net web page lifecycle is synchronous
' and in some cases, the lifecycle has completed and there is no thread to come back to
Dim response = client.GetAsync(url).Result
Changed to using HTTPS first exception:
An error occurred while sending the request. at
System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface
SecModule, String package, CredentialUse intent, SecureCredential scc)
at
System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse
credUsage, SecureCredential& secureCredential) at
System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse
credUsage, X509Certificate2 selectedCert, Flags flags) at
System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]&
thumbPrint) at
System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32
offset, Int32 count, Byte[]& output) at
System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32
offset, Int32 count) 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.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback asyncCallback, Object asyncState) at
System.Net.TlsStream.UnsafeBeginWrite(Byte[] buffer, Int32 offset,
Int32 size, AsyncCallback asyncCallback, Object asyncState) at
System.Net.PooledStream.UnsafeBeginWrite(Byte[] buffer, Int32 offset,
Int32 size, AsyncCallback callback, Object state) at
System.Net.ConnectStream.WriteHeaders(Boolean async)
Added the following code:
System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
Exception changed to:
An error occurred while sending the request.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
For the past month I've been running a web app in azure using ASP.NET MVC (.NET 4.6).
It's all been working fine until now however all the sudden I see the following exception being thrown constantly:
Microsoft.WindowsAzure.Storage.StorageException: The underlying
connection was closed: An unexpected error occurred on a receive. --->
System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a receive. --->
System.ComponentModel.Win32Exception: The client and server cannot
communicate, because they do not possess a common algorithm at
System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface
SecModule, String package, CredentialUse intent, SecureCredential scc)
at
System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse
credUsage, SecureCredential& secureCredential) at
System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]&
thumbPrint) at
System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32
offset, Int32 count, Byte[]& output) at
System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32
offset, Int32 count) 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
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand1
cmd, IRetryPolicy policy, OperationContext operationContext) in
c:\Program Files
(x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line
695 --- End of inner exception stack trace --- at
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand1
cmd, IRetryPolicy policy, OperationContext operationContext) in
c:\Program Files
(x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line
604 at
Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Exists(Boolean
primaryOnly, BlobRequestOptions requestOptions, OperationContext
operationContext) in c:\Program Files
(x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobContainer.cs:line
1406 at BoligsideUtility.ImageService.GetBlockBlob(String
containerName, String blobName) in
C:\Users\NM\Dropbox\Projects\Boligside\BoligsideUtility\ImageService.cs:line
59 at BoligsideUtility.ImageService.GetImageUrl(ResImage img) in
C:\Users\NM\Dropbox\Projects\Boligside\BoligsideUtility\ImageService.cs:line
71 at Boligside.ViewModels.ResImageVm..ctor(ResImage image) in
C:\Users\NM\Dropbox\Projects\Boligside\Boligside\ViewModels\ImageViewModels.cs:line
22 at Boligside.ViewModels.ReviewVm..ctor(Review r) in
C:\Users\NM\Dropbox\Projects\Boligside\Boligside\ViewModels\ReviewVms.cs:line
74 at Boligside.ViewModels.HomeVm.<>c.<.ctor>b__21_2(Review x) in
C:\Users\NM\Dropbox\Projects\Boligside\Boligside\ViewModels\HomeViewModel.cs:line
35 at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at
Boligside.ViewModels.HomeVm..ctor(RealestateSiteDbContext context) in
C:\Users\NM\Dropbox\Projects\Boligside\Boligside\ViewModels\HomeViewModel.cs:line
35 at Boligside.Controllers.HomeController.Index() in
C:\Users\NM\Dropbox\Projects\Boligside\Boligside\Controllers\HomeController.cs:line
129 at lambda_method(Closure , ControllerBase , Object[] ) at
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase
controller, Object[] parameters) at
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext, IDictionary2 parameters) at
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext, ActionDescriptor actionDescriptor, IDictionary2
parameters) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult
asyncResult, ActionInvocation innerInvokeState) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult
asyncResult)
The line where the exception happens is this one:
CloudBlobContainer container = BlobClient.GetContainerReference(containerName);
In this line I essentially call the azure blob API to get the container reference of the corresponding container name.
The strange thing is; I published my project again and the error disappeared.
However, the next day (today) the error reappeared.
I have a ASP.NET (VB.NET) web application (targeting .NET 4 Framework) which throws an exception intermittently when trying to invoke a web method via web reference. The web reference is the old school ASP.NET web services with the .asmx file extension.
The main web application and the web service are both on IIS 7.5 / Windows 2008 SP1. In IIS both apps are on the same website but in different application pools.
The exception states "An existing connection was forcibly closed by the remote host". This error is strange because it doesn't throw the exception the first several times when the web method is called. But when the error is thrown, it will then continue to be thrown on every following instance. Restarting the app pool in IIS fixes the error.
The data being transmitted is minimal so I don't think it is related the size of the data.
Recently we installed an F5 device that acts as a reverse proxy. The web service is now running behind this device. We did this in order to move the application to a DMZ (Demilitarized Zone). This could be the cause to this issue but if it is I am unsure how to properly configure it.
Here is my code:
_webService = New BWebService.BWebService()
_webService.Url = EnvironmentSettingsLocator.Settings.BWebServiceWsdl
If Not _webService.IsExistingUser(userId) Then
' Do Something
end if
Here is the exception:
The underlying connection was closed: An unexpected error occurred on a receive.
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 Apex3Web.BIRVWebService.BIRVWebService.IsExistingUser(Int32 userCode) in C:\Users\Ryan.DeFour.ctr\Documents\Work\TFS Source Code 2010\APEX4CMMI\APEXDevelopment\Apex3Web\Apex3Web\Web References\BIRVWebService\Reference.vb:line 501
at Apex3Web.ManageExaminee.GridViewExaminees_RowDataBound(Object sender, GridViewRowEventArgs e) in C:\Users\Ryan.DeFour.ctr\Documents\Work\TFS Source Code 2010\APEX4CMMI\APEXDevelopment\Apex3Web\Apex3Web\Forms\Examiner\ManageExaminee.aspx.vb:line 651
at System.Web.UI.WebControls.GridView.OnRowDataBound(GridViewRowEventArgs e)
at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource)
at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.GridView.DataBind()
at Apex3Web.ManageExaminee.FindCommand_Click(Object sender, EventArgs e) in C:\Users\Ryan.DeFour.ctr\Documents\Work\TFS Source Code 2010\APEX4CMMI\APEXDevelopment\Apex3Web\Apex3Web\Forms\Examiner\ManageExaminee.aspx.vb:line 539
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
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._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)
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)
The source of our issue was the newly installed F5 BigIP reverse proxy device which had SSL load balancing capabilities. The application threw exceptions during invocations to SOAP-based services (both WCF and ASMX). While speaking to an F5 representative, we were able to properly configure the device so requests would simply pass through the device instead of using the load balancing functions. This was probably not the most elegant solution, but in interest of time this is what we had to do to make it happen.
I am facing this problem a while. Sometimes (just sometimes) i am getting ThreadAbortException in Page_PreRender of one my aspx pages.
this is so odd, i get it sometimes in somedays. I am using SQLite with NHibernate in an asp.net website hosting in a shared webhost.
The exception is :
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
do you have any idea ??
It's possible that your code took too long to execute (because of too much data, or because SQLite is waiting for another thread's lock on the database).
Try increasing httpRuntime's executionTimeout in the web.config.