问题描述
Hello frens,
我是托管新手,我是第一次这样做。我需要托管一个由数据库驱动的网站。我以某种方式将网站文件从服务提供商提供给我的主机名和用户名,密码上传到托管服务器。但是关于与服务器的数据库连接,他们只向我提供了数据库名称,用户名和密码。在这种情况下,我该怎么做。
web.config中的数据库连接字符串是这样的。
< add name = myconnectionconnectionstring =Data Source = localhost; Initial Catalog = databasename; Integrated Security = true; User ID = ******; Password = *******>
因为我没有提供数据源我被要求使用本地主机但我怀疑这种连接是对的!! !请尽快回复。
此致,
Bishnu
提前谢谢
Hello frens,
i am a newbie for hosting and am doing it for the first time. I need to host a website which is database driven website. I somehow uploaded the website files to the hosted server from the host name and username, password which the service providers have provided me. But regarding the database connection to the server, they have provided me with database name, username and password only. In this case , how can i do that.
my database connection string in web.config is something like this.
<add name="myconnection" connectionstring="Data Source= localhost; Initial Catalog=databasename; Integrated Security=true;User ID=******;Password=*******">
since i am not provided with data source i have been asked to use local host but i doubt this connection is right!!! please reply asap.
Sincerely,
Bishnu
THanks in advance
推荐答案
connectionString="Data Source= localhost; Initial Catalog=databasename; Integrated Security=false;User ID=******;Password=*******"
这篇关于在asp.net中托管一个网站并连接到托管服务器以进行数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!