473,472 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DB Connection String Problem

bob
Hi,

I am trying to encrypt my connection string in the app.config file. I am
using Base64 encryption, I just want to hide it from casual users. I keep
getting file not found error. However when I just use the connection string
in plain text I can connect fine. The only difference between the two is
the @ sign is used in front of the connection string (plain) when I view
them in the command window (see below). Any ideas?
? this.connectionString "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;" ? this.connectionString

@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"
Nov 17 '05 #1
3 1775
bob wrote:
Hi,

I am trying to encrypt my connection string in the app.config file. I am
using Base64 encryption, I just want to hide it from casual users. I keep
getting file not found error. However when I just use the connection string
in plain text I can connect fine. The only difference between the two is
the @ sign is used in front of the connection string (plain) when I view
them in the command window (see below). Any ideas?

? this.connectionString
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"

The way you use '\' is not consistent to me, sometimes, you use "\\",
sometimes you use "\".

I believe if you use @ , you should use single '\', otherwise, you use "\\".
? this.connectionString


@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"

Nov 17 '05 #2
Consider that base64 is not encryption but encoding.

"bob" <bo***@bob.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

I am trying to encrypt my connection string in the app.config file. I am
using Base64 encryption, I just want to hide it from casual users. I keep
getting file not found error. However when I just use the connection
string
in plain text I can connect fine. The only difference between the two is
the @ sign is used in front of the connection string (plain) when I view
them in the command window (see below). Any ideas?
? this.connectionString

"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"
? this.connectionString

@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"

Nov 17 '05 #3
bob <bo***@bob.com> wrote:
I am trying to encrypt my connection string in the app.config file. I am
using Base64 encryption, I just want to hide it from casual users. I keep
getting file not found error. However when I just use the connection string
in plain text I can connect fine. The only difference between the two is
the @ sign is used in front of the connection string (plain) when I view
them in the command window (see below). Any ideas?
? this.connectionString

"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"
? this.connectionString

@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\WINDOWS\\system32\csdm.dll;Jet OLEDB:Database Password=passwd;"


Yeah - don't use the debugger to show you the contents of strings. It
can be very confusing.

See http://www.pobox.com/~skeet/csharp/strings.html in particular, the
sections on literals and the debugger.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
17
by: AMC | last post by:
Hi, I'm using an include file to store the connection string to a database. Whenever I try to reference that string to open a connection in the page that includes the file I get the error 'empy...
0
by: Bob | last post by:
I have an ASP.NET web application that has been running without any problems for a while. I recently transferred the site to shared hosting and had multiple users start to use the site. The problem...
4
by: Rahul Anand | last post by:
Getting SQL Exception when trying to implement Connection based Trasaction using SQL Helper class. I am using the follwing function to execute my stored procs: -=-=-=- ExecuteScalar(ByVal...
6
by: Bala Nagarajan | last post by:
Hello, I am using Oracle 9i in my application and facing a problem with the connection string. In the datasource attribute of the connection string i had to specify an entry in "tnsnames.ora"...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
2
by: RyoSaeba | last post by:
Hello, I have a problem with the session state set to Sql Server (AspNet 1.1, Windows Server 2003 on an Application Center cluster, Sql Server 2000 on another server). Sometimes, when many user...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
3
by: Harry Strybos | last post by:
Hi All I have a really strange problem occurring in my application. When I read in the application settings for connection strings the following happens: Here are my connection string settings...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.