Solved

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

Posted on 2008-10-08
5
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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