Posted on: 10/13/2007 6:37:20 PM | Views : 777

I have some code that is exactly the same as the code used in the "Tips and Tricks" Video to encrypt the connection string section of a web.config file.
 Imports System.Web.Configuration Partial Class director_webp Inherits System.Web.UI.Page Protected Sub EncryptConfig(ByVal bEncrypt As Boolean) Dim path As String = "~" Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration(path) Dim appSettings As ConfigurationSection = config.GetSection("connectionStrings") If bEncrypt Then appSettings.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider") Else appSettings.SectionInformation.UnprotectSection() End If config.Save() End Sub
 The code works correctly in a Visual Studio Website Project, but when I convert the site to a Web appl ...

Go to the complete details ...