问题描述
Configurationconfig=System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/Web.config");AppSettingsSectionappSection=(AppSettingsSection)config.GetSection("appSettings");//appSection.Settings["fff"].Value=this.TextBox1.Text.Trim();//修改appSection.Settings.Add("dfdfd","mmmmmmmmmmmmmmmm");//添加config.Save();现在的问题是,一执行到Save()时就会抛出异常:法为请求的Configuration对象创建配置文件。不明白什么原因?请求帮助谢谢
时间: 2024-11-08 22:26:27