确定你webconig里面的都写对了<connectionStrings> <remove name="LocalSqlServer" /> <add name="SqlConnStr" connectionString="user id=xx;password=xx;initial catalog=database_name;data source=.\sqlxxxx" /> </connectionStrings><appsettings> <add key="connstring" value="uid=xx;pwd=xx;database=batabase_name;server=(local)" /> </appsettings> |