代码贴全些。SqlConnection conn =new SqlConnection(ConfigurationSettings.AppSettings.Get("connstring"));这样行不行?