读取配置文件信息
string configPath = Request.CurrentExecutionFilePath;
string configPath1 = configPath.Substring(0, configPath.LastIndexOf("/"));
Response.Write(configPath1 + "<br>");
Response.Write(configPath+"<br>");
System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(configPath1);
System.Web.Configuration.AuthenticationSection authentication = config.GetSection("system.web/authentication") as System.Web.Configuration.AuthenticationSection;
Response.Write(authentication.Mode.ToString()+"<br>");
System.Configuration.ConfigurationSection appSetting = config.GetSection("appSettings");
Response.Write(Server.HtmlEncode( appSetting.SectionInformation.GetRawXml()));