accsess database on host
-
Hi, I have bought hosting and I put there all my web project,in folder App_Data I have database which I have created in SQLExpress. Problem is that I cant connect in databse which is in host,in localhost works good without problem. My connection string in webconfig file is
<add name="DBConn" connectionString="Server=www.mydomainname.com;Database=myDatabaseName;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
I get errorA 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)
How can I make connection string to access in database.
-
Hi, I have bought hosting and I put there all my web project,in folder App_Data I have database which I have created in SQLExpress. Problem is that I cant connect in databse which is in host,in localhost works good without problem. My connection string in webconfig file is
<add name="DBConn" connectionString="Server=www.mydomainname.com;Database=myDatabaseName;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
I get errorA 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)
How can I make connection string to access in database.
fattycode wrote:
This should be the url. Check with your hosting provider regarding the Server name/ipaddress.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
fattycode wrote:
This should be the url. Check with your hosting provider regarding the Server name/ipaddress.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
www.mydomainname.com I used only to explain problem,that is not my real domain name. I tried too most of connection strings from www.connectionstrings.com but still is not working :((
-
Hi, I have bought hosting and I put there all my web project,in folder App_Data I have database which I have created in SQLExpress. Problem is that I cant connect in databse which is in host,in localhost works good without problem. My connection string in webconfig file is
<add name="DBConn" connectionString="Server=www.mydomainname.com;Database=myDatabaseName;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
I get errorA 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)
How can I make connection string to access in database.
i think u have to provide the access credentials to the database in the connection string.
-
Hi, I have bought hosting and I put there all my web project,in folder App_Data I have database which I have created in SQLExpress. Problem is that I cant connect in databse which is in host,in localhost works good without problem. My connection string in webconfig file is
<add name="DBConn" connectionString="Server=www.mydomainname.com;Database=myDatabaseName;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
I get errorA 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)
How can I make connection string to access in database.
-
i think u have to provide the access credentials to the database in the connection string.
-
try this sample connection string
Data Source=yourdataserver;Initial Catalog=databasename;Persist Security Info=True;User ID=DBusername;Password=DBpassword
just replace the values from the actual value.