Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Azure Database Named Pipes Error

Up until last night, my site (hosted by DiscountASP.net) and the SQL Azure database that it connects to were running normally.

For some reason, during the night, the site went down with a named pipe error. Error 40.

Having prefixed the server name with "tcp:" in the connection string, the error is now:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

So, just to be clear, the web.config file did not change at all between the time the website last worked and the item the named pipe error came up.

Now, the username, password and instance name are all correct since the site runs locally against the remote SQl Azure server perfectly.

I've checked the instance name and the SQl Azure access rules, ensuring that the web server's IP address is whitelisted.

Any ideas on whats wrong?

like image 525
Roberto Bonini Avatar asked Nov 13 '22 19:11

Roberto Bonini


1 Answers

If I understand this right, your local website (on-premise) can connect to SQL Azure, but your website deployed in Azure can't?

Make sure your firewall rules has the "allow other windows azure services to access this server". Checking this option off basically prevents any azure-hosted application/service from connecting to your database.

like image 161
Herve Roggero Avatar answered Dec 06 '22 12:12

Herve Roggero