"The server <server name> is either unavailable or your connection has been lost. Do you want to attempt to reconnect".
Service: MicrosoftDynamicsNavServer
User: <user name>
Type: System.ObjectDisposedException
Message: Cannot access a closed file.
StackTrace:
at System.IO.__Error.FileNotOpen()
at System.IO.FileStream.Flush()
at Microsoft.Dynamics.Nav.Types.FileBufferedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Stream.Dispose()
at Microsoft.Dynamics.Nav.Runtime.NavStreamProvider.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Runtime.TreeObject.Dispose()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.InternalHostDispose()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.DisposeAllChildren()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Runtime.TreeObject.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Runtime.TreeObject.Dispose()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.InternalHostDispose()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.DisposeAllChildren()
at Microsoft.Dynamics.Nav.Runtime.NavCompany.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Runtime.TreeObject.Dispose()
at Microsoft.Dynamics.Nav.Service.Connection.GlobalTriggerCloseCompany()
at Microsoft.Dynamics.Nav.Service.NSService.<>c__DisplayClass43.<CloseConnection>b__41(Connection connection)
at Microsoft.Dynamics.Nav.Service.NSService.ExecuteOperation[T](String operationName, ServiceOperation`1 operation, Connection connection, Boolean revertLanguageChanges, WindowsIdentity impersonationIdentity)
Source: mscorlib
IF NOT UPLOADINTOSTREAM(Text001, '', 'All Files (*.*)|*.*', ltxtImportFileName, lstmInLocal) THEN EXIT; ImportMFOData.SETSOURCE(lstmInLocal); ImportMFOData.IMPORT;Then no error occurs (but this means I lose my request page).