I've seen other people reporting the System.Net.Sockets.SocketException
exception, but they largely involve web services. We're not calling any web services. In fact, this ASP.NET app is a single-tier app with the UI and data layer contained in a single assembly. To retrieve data, we manually open a connection, create a command, and execute a reader or use a data adapter to fill a data table before delivering it to the page.
A few times per month when trying to execute a command, we get System.Net.Sockets.SocketException
. I have no idea what could be causing this. As stated in the subject, we're accessing Teradata database, so we use TdConnection, TdCommand, TdDataAdapter.
cmdSolutionName = New TdCommand(sSql, Con)
daSolutionName.SelectCommand = cmdSolutionName
daSolutionName.Fill(tmpTable) 'Exception is thrown here
Does anyone know what could cause this exception when working directly with a database connection and not a web service?
I saw the same error at my work when we used .Net Remoting to connect to another host. The .Net Remoting is using TCP\IP protocol, i believe the TdCommand also use this protocol. the source of the problem that i discovered was a "Trend Micro" process, it's an antivirus that hijacks all live sockets on port 8080. maybe, your antivirus is running a scan at 'that time of the month' and killing all your communication. if not, try to think maybe of another process that can be this harmfull.