I'm trying, unsuccessfully, to connect my website to MySql on Aruba server.
I always get this error:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I'm using this connection string now:
<add name="OfferteConnectionString1" connectionString="Data Source=example.org;User ID=xxxx;password=yyyy" providerName="System.Data.SqlClient"/>
I've also tried this:
<add name="OfferteConnectionString1" connectionString="Server=example.org;Database=Sql702732_1;Uid=xxxx;Pwd=yyyy;" providerName="System.Data.SqlClient"/>
Please check your connection string and get it straight which DBMS you are using .
Connection string SQL Server
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;
Connection string MySQL
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
You have declared you are using MySQL however your connection string defines
providerName="System.Data.SqlClient
If everything is correct then i will suggest you to check some settings as suggested in this Blog
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.