Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2007

Tip: Looking for answers? Try searching our database.

configSource option in web.config

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lf - 30 May 2007 21:26 GMT
I have a web.config file and I want to externalize my connectionStrings
setting so that it points to a separate file like so:

<connectionStrings configSource=".\subdir\connectionstrings.config">

However, I am attempting to encrypt this in code.  (I can't use
aspnet_regiis because I need this to work for app.config files and on a build
machine as well.)
When I try to protect this file, it indicates that my
"connectionstrings.config" file is missing.  When I use filemon, I can see
that it is looking in my c:\windows\microsoft.net\framework\v2.0.50727\subdir
directory instead of the subdirectory in which my config that I am protecting
is located.  Can anyone tell me what's happening here?  I have also tried
locating it in the same directory to no avail.

thanks in advance,

Linda
-pb- - 31 May 2007 14:54 GMT
> I have a web.config file and I want to externalize my connectionStrings
> setting so that it points to a separate file like so:
[quoted text clipped - 14 lines]
>
> Linda

I am too sure about this but What I had observecd is when you run and
web application, it first gets compile and when it gets complied it is
placed under c:\windows\microsoft.net\framework\v2.0.50727 directory
and later gets executed from there. What you can do is instead og
using relative path to the connectionstrings.config file use absolute
path in the web config file.

I hope this helps
lf - 31 May 2007 16:15 GMT
pb
Thanks for your response.  I think that I read though that you can only use
relative paths in the configSource attribute - not absolute paths.  I get
what you're saying about compilation though - that is probably my problem,
but I wish I could find a workaround for this.

Thanks,
Linda

> > I have a web.config file and I want to externalize my connectionStrings
> > setting so that it points to a separate file like so:
[quoted text clipped - 23 lines]
>
> I hope this helps

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.