0
I’m using Visual Studio 2015
, C#
and database SQL Server Azure
and developing a project Windows Forms
.
Everything works perfectly, only when I spend a certain time without running my application to test, I get the error:
Instance-specific or network error when connecting to SQL Server. The server was not found or not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Preview: Named Pipes Provider, error: 40 - Unable to open connection to SQL Server) --->
System.ComponentModel.Win32Exception (0x80004005)
: The network path was not found
error appears on line:
private void Form1_Load(object sender, EventArgs e)
{
-> this.usuarioTableAdapter.Fill(this.estoqueDataSet.Usuario);
}
So I need to open the Server Explorer
, click on my Data Connection
and click on the refresh
then it’s normal again.
I’m so new at Visual Studio
how much in the Azure
and I want to know if this is normal, if there is a risk of it happening when my client is using my program and if there is a way to "disable" this shutdown.
Follow my firewall configuration:
@Guilhermenascimento as I do to find this file?
– Italo Rodrigo
is a windows Forms, not web
– Italo Rodrigo
is true. And how is the connection configuration (
"Data Source=????
)?– Guilherme Nascimento
Data Source=.database.windows.net;Initial Catalog=stock;Persist Security Info=True;User ID=;Password=***
– Italo Rodrigo
Just set this in one place or another place with another variable that uses the same value? Just to be sure. Also checks if at the time the error occurs
O caminho da rede não foi encontrado
SQL Server service is still running.– Guilherme Nascimento
Boy, I’m afraid I can’t tell you about the other variables. as for the SQL Server running it is, because the Azure service (as far as I know) is always online
– Italo Rodrigo
found this here -> Data Source=.database.windows.net;Initial Catalog=stock;Integrated Security=False;User ID=;Password=*******;Connect Timeout=60;Encrypt=False;Trustservercertificate=True;Applicationintent=Readwrite;Multisubnetfailover=False
– Italo Rodrigo
It could be anything, if you can give more details. Take a look at the firewall, or if you have an "Anti-ddos"
– Guilherme Nascimento
thanks so I’ll keep testing here. thanks anyway ^^
– Italo Rodrigo
I’ll change the connect Timeout=60 to a larger number and see if it solves ;)
– Italo Rodrigo
@Italorodrigo changing the Timeout is not the best way. We have to solve the cause of it. And not the responsible for treating the problem.
– Thiago Lunardi