Solved

ecrypt a db sting to a dll using vs2005 and call it asp

Posted on 2008-10-08
5
176 Views
Last Modified: 2013-11-26
hi,

i have this asp db string

ExecuteMain = "Provider=sqloledb;Data Source=CIB4,1433;Network Library=DBMSSOCN;Initial Catalog=DSDB;User ID=USER;Password=123456;"

i was using a asp to vb to make a dll out of the db string and call it via a asp include page. the include page contains the following asp code.

   Dim artment
   Set artment= Server.CreateObject("DSDBCon.clsDSDBCon")
   strDataSourceName = artment.ExecuteMain
   Set artment= Nothing


how can i do this using visual studio 2005. with this i mean make the dll and and be able to make the call in asp
0
Comment
Question by:eaweb
  • 2
5 Comments
 
LVL 15

Expert Comment

by:angus_young_acdc
ID: 22668984
Are you using C# as backend code?  If so the following links (to encrypt and decrypt) will give you a good basis to start off how to make your DB connection string more secure.
http://www.codeproject.com/KB/security/DotNetCrypto.aspx
http://www.codeproject.com/KB/vb/VB_NET_TripleDES.aspx?fid=70758&fr=26#xx0xx - Includes VB code

From there would you have a hidden page, or a DLL (class library) which you would be able to call from your backend to encrypt and decrypt the string.

They are of course rather basic methods of encryption, but they should enable you to gain a better understanding and provide the means to increase the encryption level.
0
 

Author Comment

by:eaweb
ID: 22672980
hi i am using vb. i don't quite understand the links you gave me.
i created a new project class library in visual studio 2005 and in there i have written the following:

'================================
Public Class CIB1

    Function ExecuteMain()
        ExecuteMain = "Provider=sqloledb;Data Source=CURCIB3,1433;Network Library=DBMSSOCN;Initial Catalog=DSDB;User ID=DSDBUSER;Password=123456;"
    End Function

End Class
'================================

i build it and the dll is made. how can i call the string out of the dll in my classic asp code in order to connect to the db?
0
 
LVL 15

Accepted Solution

by:
angus_young_acdc earned 500 total points
ID: 22677830
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now