1个回答
展开全部
数据库连接字符串配置正确吗?
打开Web.config文件,检查一下数据库连接配置。
比如:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</configSections>
<dataConfiguration defaultDatabase="default"/>
<connectionStrings>
<add name="default" connectionString="Server=192.168.101.100;Database=DBName;User ID=test;Password=test" providerName="System.Data.SqlClient"/>
</connectionStrings>
.......
</configuration>
打开Web.config文件,检查一下数据库连接配置。
比如:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</configSections>
<dataConfiguration defaultDatabase="default"/>
<connectionStrings>
<add name="default" connectionString="Server=192.168.101.100;Database=DBName;User ID=test;Password=test" providerName="System.Data.SqlClient"/>
</connectionStrings>
.......
</configuration>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询