zoukankan      html  css  js  c++  java
  • Application_Start事件中修改配置文件内容 dodo

    string configFile =  System.Web.HttpContext.Current.Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath + "dnt.config");
       XmlDocument xDoc = new XmlDocument();
       xDoc.Load(configFile);
       XmlNodeList xnl = xDoc.GetElementsByTagName("Dbconnectstring");
       //xnl[0].InnerText = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath("bbs/database/access_db.config") + ";Persist Security Info=True;";
       xnl[0].InnerText = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath + "bbs/database/access_db.config") + ";Persist Security Info=True;";
       xDoc.Save(configFile);
  • 相关阅读:
    python virtualenv
    ICMP
    正则表达式
    tcpdump命令
    vim命令
    IP网际协议
    链路层
    python模块学习 logging
    Angular2+如何去除url中的#
    angular5懒加载之模块划分
  • 原文地址:https://www.cnblogs.com/zgqys1980/p/607212.html
Copyright © 2011-2022 走看看