Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Enterprise Library Configuration setting!

Reply
Thread Tools

Enterprise Library Configuration setting!

 
 
Rick Mavrovik
Guest
Posts: n/a
 
      07-11-2007
Hi,
I am developing web application on 3 tier model. For data access my Data
Access Layer (DAL) uses MS Enterprise Library (MSEL). If I am right MSEL
relies on web.config file for the connection strings. I need to make the DAL
totally independent ie I want to save the connection string information in a
App.config file inside the DAL project (a class library project).

How can I make MSEL to use App.Config in DAL for connection string instead
of Web.Config in ASP.Net application??

The reason I want to do this is that I have .Net windows service which need
to use the DAL independently of the application.

-Rick


 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      07-11-2007
Hello Rick,

your can remove the connection string section from the web.config and put
in to the separate file, which will be refered by web.config and your app.config

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

RM> Hi,
RM> I am developing web application on 3 tier model. For data access my
RM> Data
RM> Access Layer (DAL) uses MS Enterprise Library (MSEL). If I am right
RM> MSEL
RM> relies on web.config file for the connection strings. I need to make
RM> the DAL
RM> totally independent ie I want to save the connection string
RM> information in a
RM> App.config file inside the DAL project (a class library project).
RM> How can I make MSEL to use App.Config in DAL for connection string
RM> instead of Web.Config in ASP.Net application??
RM>
RM> The reason I want to do this is that I have .Net windows service
RM> which need to use the DAL independently of the application.
RM>
RM> -Rick
RM>


 
Reply With Quote
 
 
 
 
Rick Mavrovik
Guest
Posts: n/a
 
      07-11-2007
Hi,
OK....how can I do that...I mean how can I make Web.config to refer to some
other file for connection string.
Thanks
-Rick

"Michael Nemtsev" <> wrote in message
news: t.com...
> Hello Rick,
>
> your can remove the connection string section from the web.config and put
> in to the separate file, which will be refered by web.config and your
> app.config
>
> ---
> WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
> http://spaces.live.com/laflour
> Team blog: http://devkids.blogspot.com/
>
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
>
> RM> Hi,
> RM> I am developing web application on 3 tier model. For data access my
> RM> Data
> RM> Access Layer (DAL) uses MS Enterprise Library (MSEL). If I am right
> RM> MSEL
> RM> relies on web.config file for the connection strings. I need to make
> RM> the DAL
> RM> totally independent ie I want to save the connection string
> RM> information in a
> RM> App.config file inside the DAL project (a class library project).
> RM> How can I make MSEL to use App.Config in DAL for connection string
> RM> instead of Web.Config in ASP.Net application??
> RM> RM> The reason I want to do this is that I have .Net windows service
> RM> which need to use the DAL independently of the application.
> RM> RM> -Rick
> RM>
>



 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      07-11-2007
Hello Rick,

Add <appSettings file="common.config"> into your web.config and put your
connection string into common.config

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

RM> Hi,
RM> OK....how can I do that...I mean how can I make Web.config to refer
RM> to some
RM> other file for connection string.
RM> Thanks
RM> -Rick
RM> "Michael Nemtsev" <> wrote in message
RM> news: t.com...
RM>
>> Hello Rick,
>>
>> your can remove the connection string section from the web.config and
>> put in to the separate file, which will be refered by web.config and
>> your app.config
>>
>> ---
>> WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
>> http://spaces.live.com/laflour
>> Team blog: http://devkids.blogspot.com/
>> "The greatest danger for most of us is not that our aim is too high
>> and we miss it, but that it is too low and we reach it" (c)
>> Michelangelo
>>
>> RM> Hi,
>> RM> I am developing web application on 3 tier model. For data access
>> my
>> RM> Data
>> RM> Access Layer (DAL) uses MS Enterprise Library (MSEL). If I am
>> right
>> RM> MSEL
>> RM> relies on web.config file for the connection strings. I need to
>> make
>> RM> the DAL
>> RM> totally independent ie I want to save the connection string
>> RM> information in a
>> RM> App.config file inside the DAL project (a class library project).
>> RM> How can I make MSEL to use App.Config in DAL for connection
>> string
>> RM> instead of Web.Config in ASP.Net application??
>> RM> RM> The reason I want to do this is that I have .Net windows
>> service
>> RM> which need to use the DAL independently of the application.
>> RM> RM> -Rick
>> RM>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Enterprise Library - Class Library Greif. =?Utf-8?B?QUo=?= ASP .Net 7 12-06-2007 09:33 AM
Enterprise Library exception: The configuration section securityCryptographyConfiguration is not defined in the current configuration for the AppDomain. Jess Chadwick ASP .Net 1 09-21-2006 09:18 AM
Microsoft Configuration Block and Enterprise library configuration tool Mark ASP .Net 0 02-15-2006 11:27 PM
Enterprise Library - Indirect/Inherited Configuration?? plaztik via DotNetMonster.com ASP .Net 1 05-06-2005 03:44 PM
enterprise application vs. enterprise system jrefactors@hotmail.com Java 3 01-15-2005 07:12 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57