Configuration config = WebConfigurationManager.OpenWebConfiguration(context.Request.ApplicationPath);
 AppSettingsSection appSettings = (AppSettingsSection)config.GetSection("appSettings");
 if (dbName == "TestWeb")
   {
  appSettings.Settings["SQLServer"].Value = "server=192.168.1.7;database=TestWeb;uid=web;pwd=web";
   appSettings.Settings["DBOName"].Value = "WebDB";
           }不报错,但是也不上。