473,661 Members | 2,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with encrypting connection strings

Hello all,

I am trying to use the example for encrypting connection strings
called:
How To: Build And Run the Protected Configuration Provider Example.
This is located in VS 2005 help at:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_aspnetcon/html/*7ed8b347-c790-4768-9ae3-53ddc934ac78.ht m

I am at the point where I am using aspnet_regiis.e xe to do the
encryption but I keep getting the error:
Could not load file or assembly
'TripleDESProte ctedConfigurati onProvider, Version=0.0.0.0 ,
PublicKeyToken= e0f3f54636e895d d' or one of its dependencies. The system

cannot find the file specified.
Failed!
I have followed the directions in the example and made the proper
adjustments for my specific environment (like changing the Public Key
Token in the web.config entry to the one created when I installed the
dll to the GAC). But for some reason aspnet_regiis.e xe can't seem to
locate the dll.
Here is my web.config entry:
<configProtecte dData>
<providers>
<add name="TripleDES Provider"
type="Protected Configuration.T ripleDESProtect edConfiguration Provider,
TripleDESProtec tedConfiguratio nProvider, Version=0.0.0.0 ,
CultureInfo=neu tral, PublicKeyToken= e0f3f54636e895d d,
processorArchit ecture=MSIL" keyFilePath="c: \AppConfig\Keys .txt"/>
</providers>
</configProtected Data>
You may notice that in the type="" part the namespace is different than

in the example. I have accounted for this. I also tried it with the
example namespace first with similar results. I also have tried
running aspnet_regiis.e xe -i -enable. Didn't help. I have entered the

assembly location in the registry to get it to show up on the .NET tab
of the Add References dialog. Didn't help.
Any suggestions would be welcome.
Thanks,
Dave

Jun 30 '06 #1
1 2893
Final update: I have everything working correctly out of the GAC. Here
was my issue:

Too much copying and pasting and not enough paying attention to the
details. Thanks to Suzanne Cook and her blog on gotdotnet.com for
pointing out that you need to have the names of things referenced in
the GAC exact. At it turns out, the line in my web.config file:

<add name="TripleDES Provider"
type="Samples.A spNet.Protected Configuration.T ripleDESProtect edConfiguration Provider,
TripleDESProtec tedConfiguratio nProvider, Version=0.0.0.0 ,
CultureInfo=neu tral, PublicKeyToken= 703e257c00b2e90 a,
processorArchit ecture=MSIL" keyFilePath="c: \AppConfig\Keys .txt"/>

actually needed to be:

<add name="TripleDES Provider"
type="Samples.A spNet.Protected Configuration.T ripleDESProtect edConfiguration Provider,
TripleDESProtec tedConfiguratio nProvider, Version=0.0.0.0 ,
Culture=neutral , PublicKeyToken= 703e257c00b2e90 a,
processorArchit ecture=MSIL" keyFilePath="c: \AppConfig\Keys .txt"/>

The difference being the Culture=neutral part. Apparently when I
copied and pasted from Microsoft's example, it came with
CultureInfo=neu tral, which was wrong in my case. Go figure. Anyway,
Suzanne Cook pointed out that by doing gacutil /l from the dot net
command prompt you can get a list of everything in the GAC as the GAC
sees the names. Once I did this and compared it to my web.config entry
all was well in my world. Now if only I could replace all the hair I
have pulled out of my head...

Dave

gi*******@earth link.net wrote:
Hello all,

I am trying to use the example for encrypting connection strings
called:
How To: Build And Run the Protected Configuration Provider Example.
This is located in VS 2005 help at:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_aspnetcon/html/*7ed8b347-c790-4768-9ae3-53ddc934ac78.ht m

I am at the point where I am using aspnet_regiis.e xe to do the
encryption but I keep getting the error:
Could not load file or assembly
'TripleDESProte ctedConfigurati onProvider, Version=0.0.0.0 ,
PublicKeyToken= e0f3f54636e895d d' or one of its dependencies. The system

cannot find the file specified.
Failed!
I have followed the directions in the example and made the proper
adjustments for my specific environment (like changing the Public Key
Token in the web.config entry to the one created when I installed the
dll to the GAC). But for some reason aspnet_regiis.e xe can't seem to
locate the dll.
Here is my web.config entry:
<configProtecte dData>
<providers>
<add name="TripleDES Provider"
type="Protected Configuration.T ripleDESProtect edConfiguration Provider,
TripleDESProtec tedConfiguratio nProvider, Version=0.0.0.0 ,
CultureInfo=neu tral, PublicKeyToken= e0f3f54636e895d d,
processorArchit ecture=MSIL" keyFilePath="c: \AppConfig\Keys .txt"/>
</providers>
</configProtected Data>
You may notice that in the type="" part the namespace is different than

in the example. I have accounted for this. I also tried it with the
example namespace first with similar results. I also have tried
running aspnet_regiis.e xe -i -enable. Didn't help. I have entered the

assembly location in the registry to get it to show up on the .NET tab
of the Add References dialog. Didn't help.
Any suggestions would be welcome.
Thanks,
Dave
Jul 6 '06 #2

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

Similar topics

6
2085
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic environment? Dayne
8
3011
by: MattP | last post by:
Ok, with the help of some examples found on the web and some minor modifications on our own, we have a simple and working encrypt and decrypt solution. It runs as a service, watches for files with a specific extension in a specific directory. The files are uploaded by FTP to this directory. The service then does the following steps: 1) Verify it can open the file (so we know it's fully uploaded). 2) Try to decrypt the file with known...
7
4097
by: Richard L Rosenheim | last post by:
Anyone care to express their two cents over pros and cons of encrypting the data being transmitted (within the SOAP package) versus just utilizing a HTTPS connection? Richard Rosenheim
1
1493
by: girthyvhf | last post by:
Hello all, I am trying to use the example for encrypting connection strings called: How To: Build And Run the Protected Configuration Provider Example. This is located in VS 2005 help at: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/7ed8b347-c790-4768-9ae3-53ddc934ac78.htm
5
2466
by: Chris Dunaway | last post by:
I have an application which is installed on a network share to be run from one or more workstations. I have granted trust to the applications on the workstations and the appropriate permissions on the shared folder and the user's can execute the app with no problem. I do have a problem, however, after the application starts. In the application's .config file, the connectionStrings section of the file is encrypted upon first run of the...
1
3385
by: vikram | last post by:
How can we encrypt app.comfig keys in .net 2003 ? Thanks
2
1853
by: Parrot | last post by:
I cannot get an answer as to why my session state no longer remains active between webpages after working for 2 years. So I want to try to pass data thru query strings in my url. I tried to use SecureString to encrypt the sensitive data but cannot figure out how to encrpyt data using this method from the documentation. Does anyone have an example of how to encrpyt data when passing data with a url in a Redirect to another webpage using C#...
2
2273
by: SeeSharp Bint | last post by:
Visual Studio 2005, dotnet, c#. Microsoft SQL Server. Windows XP forms application. Temporarily, for my database application, I have been storing the various elements of database connection items like datasource,password,userid as plain strings in the registry. I'd now like to make these secure against people reading them. I thought of encrypting/decrypting each string when i write to the registry but I wouldnt know where to find a...
1
5904
by: =?Utf-8?B?TWlrZSBSb2JiaW5z?= | last post by:
I'm trying to encrypt a connection string in an app.config. This is the app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings> <add name="test" connectionString="user id=testuser;password=testpwd;data source=testdb;persist security info=False;"/>
1
2541
by: Amy L. | last post by:
I have a .Net 2.0 windows forms application where a user will supply a connection string for their database server during initial configuration. I want to make sure this string is encrypted when its stored in the app.config file or whatever xml based configuration file I use. I can encrypt the data using the built in crypto classes in .Net, but the question comes in how can I securely store the keys used for encryption. Is there any...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8855
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.