 private void protectsection(string sectionname, string provider)
private void protectsection(string sectionname, string provider)
 
     {
{ configuration config =
        configuration config = webconfigurationmanager.
            webconfigurationmanager. openwebconfiguration(request.applicationpath);
                openwebconfiguration(request.applicationpath);
 configurationsection section = config.getsection(sectionname);
        configurationsection section = config.getsection(sectionname);
 if (section != null && !section.sectioninformation.isprotected)
        if (section != null && !section.sectioninformation.isprotected)
 
         {
{ section.sectioninformation.protectsection(provider);
            section.sectioninformation.protectsection(provider); config.save();
            config.save(); }
        } }
    }
新聞熱點
疑難解答
圖片精選