Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypting connection string in classic asp

Is it possible to store encrypted connection string so it can be used from server-side vbscript? Was there an equivalent of web.config in 'the good old days'?

like image 486
grega g Avatar asked Dec 18 '25 16:12

grega g


2 Answers

As I dust off the ol' memory banks...

I recall that in classic ASP systems, we would put the connection string (and most other config settings) in the Windows registry, in a custom registry key for the web app. We'd use a COM DLL to read the settings.

You can encrypt the connection string that is stored in the registry, but you will have to roll your own encryption/decryption.

So the answer is yes, it is definitely possible, but there is no easy tooling built into the framework to encrypt/decrypt on the fly, you have to do it yourself.

like image 67
Guy Starbuck Avatar answered Dec 21 '25 02:12

Guy Starbuck


.Net has all the encryption and decryption code built in so the easiest way to encrypt the string is to use the .Net encryption/decryption functions. Create a .Net component that does the decription and a COM callable wrapper for it which should register it. Then call it from your ASP page.

like image 25
user46669 Avatar answered Dec 21 '25 02:12

user46669