At first, I was trying to encrypt ConnectionStrings in my app.config and
still be able to modify my datasets. So, i had to modify the
Settings.Designer.cs file to handle the decryption aspect in the GET
properties. This works great to run the application but there are two
problems with it when developing at designtime.
1. Anytime i add another setting to Properties, the Designer rewrites the
Settings.Designer.cs overwritting my decryption handling code.
2. I cannot modify a dataset without getting an "Object ref no found"(this
happens because it doesn't recognize the encrypted connectionString).
Being that I've been struggling through this issue now for a little over a
week, I need to know how I can disable vs.net from wrtting my
connectionstring to the app.config in clear text. In other words, I want to
add ConnectionStrings to the Properties window but i don't want them to be
written in the app.config. Everytime i link a dataset to a connection in the
server explorer, vs.net automatiaclly adds the connectionString to my
app.config in clear text. This is a huge problem for us. We've tryed setting
up Protected Configuration but it seems to not work in Windows Applications. 3 3848
Am I correct in assuming that you are using 2.0? Protected
configuration *does* work in Windows apps -- you need to set a
reference System.Configuration.dll. The other issue is which provider
to use -- DPAPI or RSA. DPAPI can only decrypt settings that were
encrypted on the same machine, so that limits its usefulness. If you
are writing code to handle encryption, I'd recommend encapsulating it
in a separate class. When you're done with the designers and ready to
deploy, hook it up and test it.
--Mary
On Thu, 29 Dec 2005 11:49:02 -0800, "Nuno"
<Nu**@discussions.microsoft.com> wrote: At first, I was trying to encrypt ConnectionStrings in my app.config and still be able to modify my datasets. So, i had to modify the Settings.Designer.cs file to handle the decryption aspect in the GET properties. This works great to run the application but there are two problems with it when developing at designtime.
1. Anytime i add another setting to Properties, the Designer rewrites the Settings.Designer.cs overwritting my decryption handling code.
2. I cannot modify a dataset without getting an "Object ref no found"(this happens because it doesn't recognize the encrypted connectionString).
Being that I've been struggling through this issue now for a little over a week, I need to know how I can disable vs.net from wrtting my connectionstring to the app.config in clear text. In other words, I want to add ConnectionStrings to the Properties window but i don't want them to be written in the app.config. Everytime i link a dataset to a connection in the server explorer, vs.net automatiaclly adds the connectionString to my app.config in clear text. This is a huge problem for us. We've tryed setting up Protected Configuration but it seems to not work in Windows Applications.
Thanks for the response Mary. Yes, we are using 2.0 and we have decided we
don't want the connectionstring written to the app.config. Is this possibile
with the TableAdapter? It seems no matter what I do to the connectionstring,
the designer always writes it as a setting in the app.config.
Nuno
"Mary Chipman [MSFT]" wrote: Am I correct in assuming that you are using 2.0? Protected configuration *does* work in Windows apps -- you need to set a reference System.Configuration.dll. The other issue is which provider to use -- DPAPI or RSA. DPAPI can only decrypt settings that were encrypted on the same machine, so that limits its usefulness. If you are writing code to handle encryption, I'd recommend encapsulating it in a separate class. When you're done with the designers and ready to deploy, hook it up and test it.
--Mary
On Thu, 29 Dec 2005 11:49:02 -0800, "Nuno" <Nu**@discussions.microsoft.com> wrote:
At first, I was trying to encrypt ConnectionStrings in my app.config and still be able to modify my datasets. So, i had to modify the Settings.Designer.cs file to handle the decryption aspect in the GET properties. This works great to run the application but there are two problems with it when developing at designtime.
1. Anytime i add another setting to Properties, the Designer rewrites the Settings.Designer.cs overwritting my decryption handling code.
2. I cannot modify a dataset without getting an "Object ref no found"(this happens because it doesn't recognize the encrypted connectionString).
Being that I've been struggling through this issue now for a little over a week, I need to know how I can disable vs.net from wrtting my connectionstring to the app.config in clear text. In other words, I want to add ConnectionStrings to the Properties window but i don't want them to be written in the app.config. Everytime i link a dataset to a connection in the server explorer, vs.net automatiaclly adds the connectionString to my app.config in clear text. This is a huge problem for us. We've tryed setting up Protected Configuration but it seems to not work in Windows Applications.
Is the connection string being created dynamically at runtime? You
might want to consider using one of the new ConnectionStringBuilders.
It allows you construct dynamic connection strings at runtime. This
avoids both hard-coding connection strings in your application and
storing them in a config file.
--Mary
On Thu, 5 Jan 2006 07:27:03 -0800, "Nuno"
<Nu**@discussions.microsoft.com> wrote: Thanks for the response Mary. Yes, we are using 2.0 and we have decided we don't want the connectionstring written to the app.config. Is this possibile with the TableAdapter? It seems no matter what I do to the connectionstring, the designer always writes it as a setting in the app.config.
Nuno
"Mary Chipman [MSFT]" wrote:
Am I correct in assuming that you are using 2.0? Protected configuration *does* work in Windows apps -- you need to set a reference System.Configuration.dll. The other issue is which provider to use -- DPAPI or RSA. DPAPI can only decrypt settings that were encrypted on the same machine, so that limits its usefulness. If you are writing code to handle encryption, I'd recommend encapsulating it in a separate class. When you're done with the designers and ready to deploy, hook it up and test it.
--Mary
On Thu, 29 Dec 2005 11:49:02 -0800, "Nuno" <Nu**@discussions.microsoft.com> wrote:
>At first, I was trying to encrypt ConnectionStrings in my app.config and >still be able to modify my datasets. So, i had to modify the >Settings.Designer.cs file to handle the decryption aspect in the GET >properties. This works great to run the application but there are two >problems with it when developing at designtime. > >1. Anytime i add another setting to Properties, the Designer rewrites the >Settings.Designer.cs overwritting my decryption handling code. > >2. I cannot modify a dataset without getting an "Object ref no found"(this >happens because it doesn't recognize the encrypted connectionString). > >Being that I've been struggling through this issue now for a little over a >week, I need to know how I can disable vs.net from wrtting my >connectionstring to the app.config in clear text. In other words, I want to >add ConnectionStrings to the Properties window but i don't want them to be >written in the app.config. Everytime i link a dataset to a connection in the >server explorer, vs.net automatiaclly adds the connectionString to my >app.config in clear text. This is a huge problem for us. We've tryed setting >up Protected Configuration but it seems to not work in Windows Applications. > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: no |
last post by:
Is there any way to disable the saved form information Mozilla Firefox
and Internet Explorer presents in a list every time you type text in a
form input, on a page you use every day?
If so, what...
|
by: Scanner2001 |
last post by:
I have a service with settings in the app.config file. I would like to
be able to change these settings without restarting the service. Something
similar to a web.config with web services. Whenever...
|
by: ad |
last post by:
I use authorization to Form in the root Web.config
But now I want to disable the Form authentication when request some web
pages
How can I do?
|
by: Laurent Bugnion |
last post by:
Hi,
I like to develop custom controls for a number of webpages. These
controls are often customizable, so that they can be reused in a number
of situations.
My question is: What is the best...
|
by: John K |
last post by:
I am trying to eliminate the capability of displaying the details of a web
service by disabling WSDL generation in the web.config file. I have made the
following changes to the web.config:
...
|
by: WT |
last post by:
Hello,
Using VS2005.
I have an assembly library that can be called from a Web site asp.net
application or from a winform application.
From this library I need to retrieve a path using simply a...
|
by: DaBrain |
last post by:
I have a program that uses settings. When I save my settings they are
saved:
Properties.Settings.Default.Save();
when I restart the application, my settings are present, the changes
are in...
|
by: amperie |
last post by:
Hey experts,
I have a vb.net (2.0) application that is basically a scheduling
application. It wakes up periodically, checks to see if there's tasks
to be ran and kicks off any tasks in another...
|
by: ssg31415926 |
last post by:
I've got a small web site and I've added some settings in appSettings
which appear in web.config. So far, so good.
I've just added a DLL to the site which was originally written to be
called...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |