SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

Cannot access a disposed object 'System.Net.Sockets.NetworkStream'

Open lierdakil opened this issue 6 years ago • 3 comments

I'm getting the following error regularly:

The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error:
Cannot access a disposed object.
Object name:
'System.Net.Sockets.NetworkStream'

when using with Common.DatabaseProviderTypes.MSSQLSERVER.

I should note that I'm accessing a remote MSSQL instance here, so there might be some network connectivity issues. But this reaction is less than ideal. Maybe handling connectivity issues and reconnecting is a good idea?

lierdakil avatar Aug 15 '17 06:08 lierdakil

I've been using a remote MSSQL from Azure like a year now without this kind of problem. So we'll need more info about this...

Thorium avatar Aug 15 '17 11:08 Thorium

Huh. Interesting. I neglected to mention that I'm running F# on Linux via mono. I'll try to see if changing that makes a difference and get back to you.

lierdakil avatar Aug 15 '17 12:08 lierdakil

So the network connection was lost? You can do simple manual reconnection like this: https://github.com/fsprojects/SQLProvider/issues/397#issuecomment-296618798

Thorium avatar Feb 04 '20 12:02 Thorium