Torna al Thread

Configuration WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); ConfigurationSection sezioneProt1 = WebConfig.GetSection("system.net/mailSettings/smtp/network"); if (!sezioneProt1.SectionInformation.IsProtected) { sezioneProt1.SectionInformation.ProtectSection(protectionProvider); WebConfig.Save(); Label2.Text = "MailSettings criptato con " + protectionProvider; } else Label2.Text = "MailSettings già criptato";
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5