Hello together,
we are facing a problem since we upgraded from 2009 to 2015. The Service Tier is sometimes crashing when a user try to open a attachment.
Short explanation:
We have a little "strange" attachment logic because of security concerns from the controlling team. All attachments are stored on a central file share.
On this file share only a NAS user has access to it. If the User want to open an attachment a entry in a table will be created. in this entry the Nas will upload the attachment and then the client will open the attachment from the DB.
An on this open process the Service tier crash's and we have to restart it.
Has anyone a idea how we can fix this problem?
Server instance: XXXXXXX
Tenant ID: default
Session type: RoleTailoredClient
Session ID: 73
User: XXXX\XXXXX
Type: System.InvalidOperationException
Message: Exception has been thrown by the target of an invocation.
StackTrace: at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args)
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233079
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args)
Source: mscorlib
HResult: -2146232828
Type: System.Data.SqlClient.SqlException
ClientConnectionId: d69624cb-34c3-4673-989c-b230df4a68f3
Class: 20
LineNumber: 0
Number: -1
Server: XXXXXX\XXXXXXX
State: 0
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByteArray(Byte[] buff, Int32 offset, Int32 len, Int32& totalRead)
at System.Data.SqlClient.SqlDataReader.TryGetBytesInternalSequential(Int32 i, Byte[] buffer, Int32 index, Int32 length, Int32& bytesRead)
at System.Data.SqlClient.SqlDataReader.TryGetBytesInternal(Int32 i, Int64 dataIndex, Byte[] buffer, Int32 bufferIndex, Int32 length, Int64& remaining)
at System.Data.SqlClient.SqlDataReader.GetBytesInternal(Int32 i, Int64 dataIndex, Byte[] buffer, Int32 bufferIndex, Int32 length)
at System.Data.SqlClient.SqlDataReader.GetBytes(Int32 i, Int64 dataIndex, Byte[] buffer, Int32 bufferIndex, Int32 length)
at Microsoft.Dynamics.Nav.Runtime.BlobReaderStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at Microsoft.Dynamics.Nav.Runtime.NavSqlCommand.GetBlobDataFromreader(Boolean isCompressed, Int32 resultIndex, NavBLOB navBlob)
at Microsoft.Dynamics.Nav.Runtime.NavSqlBlobCommand.ExecuteGetBlobCommand(MutableRecordBuffer record)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteCommandAndCacheOnSuccess[T](NavSqlCommandCacheKey commandKey, Func`1 createFunc, Func`2 executeFunc)
at Microsoft.Dynamics.Nav.Runtime.NavSqlBlobCommand.GetBlob(NCLMetaTable table, NavDatabase database, Int32 companyIndex, FieldList blobMetaFields, MutableRecordBuffer record, Boolean locking)
at Microsoft.Dynamics.Nav.Runtime.NavSqlBlobCommand.GetBlob(NCLMetaTable table, NavDatabase database, Int32 companyIndex, FieldList blobFields, IRecordBuffer record, DataLockState lockState)
at Microsoft.Dynamics.Nav.Runtime.SqlTableDataProvider.GetBlobContent(GetBlobContentProviderRequest request)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.CalcFields(DataError errorLevel, NCLMetaField[] fields, Boolean onlyFieldsSourcedFromVirtualTables)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.CalcFields(DataError errorLevel, Int32[] fields)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.AttachmentHasValue_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.AttachmentHasValue(INavRecordHandle attStore, Boolean getCurrentRec, Boolean calcBLOBField)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.OpenAttachment_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.OpenAttachment(INavRecordHandle attStore)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.ShowAttachment_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.ShowAttachment(INavRecordHandle attLinkInfo)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50115.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Page50124.ShowAttachment_a45_OnAction_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Page50124.ShowAttachment_a45_OnAction()
HResult: -2146232060
0