can someone help me how to get to the web.config file? I want to get to that to encrypt the connection string. I get blank path when I run the code below....Thank you for the help.
Code:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
' Get the file path
Dim path As String = HttpContext.Current.Request.CurrentExecutionFilePath
path = path.Substring(0, path.LastIndexOf("/"))
' Get the appSetting and connectionStrings sections
Dim config As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration(path)
Dim appSettings As ConfigurationSection = config.GetSection("appSettings")