PC Review


Reply
Thread Tools Rate Thread

access web.config from another dll

 
 
Tem
Guest
Posts: n/a
 
      26th Feb 2008
my DAL is in a separate dll/project than the website project.

how would I go about accessing/referencing a connectstring in the web.config
file in the website project ?

so I don't have to hard code the connect string in the code file of the DAL
dll.

Tem

 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      26th Feb 2008
All dlls in the appdomain have access to the same coinfiguration; so
you DAL dll can simply use ConfigurationManager:
http://msdn2.microsoft.com/en-us/lib...onstrings.aspx

Marc
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
access web.config from another dll Tem Microsoft C# .NET 1 26th Feb 2008 04:59 AM
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner Microsoft ASP .NET 0 9th Apr 2007 10:00 PM
DTDs for machine.config, web.config, security.config available ? =?Utf-8?B?UGF1bCBLZW5uZWR5?= Microsoft Dot NET Framework 1 5th Feb 2007 05:42 AM
Access to the path "D:\Kevin's Web Apps\InternalSPHIR\Config\Resource.Config" is denied. KQ Microsoft ASP .NET 1 27th Oct 2004 11:25 AM
app.config access from DLL within MTS on NT4.0 =?Utf-8?B?Um9iZXJ0SGlsbEVkc1BheQ==?= Microsoft Dot NET 1 11th Oct 2004 01:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:45 PM.