黑马程序员技术交流社区
标题:
sql server数据库连接的问题
[打印本页]
作者:
靳石磊
时间:
2013-1-24 12:08
标题:
sql server数据库连接的问题
web程序在vs中调试可以连接数据库,为什么用iis打开网站就连接失败呢?连接字符串如下:
string str = "data source=localhost;integrated security=trueI;database=firstdb";
作者:
许庭洲
时间:
2013-1-24 12:20
检查IIS是否配置好;
aa.JPG
(44.99 KB, 下载次数: 28)
下载附件
2013-1-24 12:19 上传
作者:
朱京辉
时间:
2013-1-24 12:58
1.最大的可能是IIS配置错误,建议修改设置
2.连接数据库字符串错误,建议使用vs自身的连接向导,生成正确的连接字符串,后比较,查出错误
作者:
靳石磊
时间:
2013-1-24 17:43
已解决,字符串有错误
作者:
yangaidongcumt
时间:
2013-6-10 19:36
Sql Server身份验证方式:string connStr="Data Source=.; User Id=sa;Password=123456; Initial Catalog=Test";windows 身份验证方式:string connStr="Data Source=.;Integrated Security=True; Initial Catalog=Test";
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2