G
Guest
I'd like the administrator for my web site to be able to select between a
'Production' back-end or a 'Backup' backend.
There are 2 values in the Web.Config file, but I know that the point that it
connects using the web.config information is already too late.
My current connection is setup as follows:
Public Shared Function GetMembershipConnection() As SqlConnection
'Return New SqlConnection(GetConnectionString)
Return New
SqlConnection(DecryptConnectionString(GetConnectionString))
End Function
Public Shared Function GetConnectionString() As String
Dim sMemberCon As String =
ConfigurationManager.ConnectionStrings("SQLConn").ConnectionString
Return sMemberCon
End Function
What I would like to do is, change a value in an xml file and use this as a
pre-check to determine what connection string to use SQLConn or SQLConn2
But I've never worked with XML in this manner ...
'Production' back-end or a 'Backup' backend.
There are 2 values in the Web.Config file, but I know that the point that it
connects using the web.config information is already too late.
My current connection is setup as follows:
Public Shared Function GetMembershipConnection() As SqlConnection
'Return New SqlConnection(GetConnectionString)
Return New
SqlConnection(DecryptConnectionString(GetConnectionString))
End Function
Public Shared Function GetConnectionString() As String
Dim sMemberCon As String =
ConfigurationManager.ConnectionStrings("SQLConn").ConnectionString
Return sMemberCon
End Function
What I would like to do is, change a value in an xml file and use this as a
pre-check to determine what connection string to use SQLConn or SQLConn2
But I've never worked with XML in this manner ...