locked
Setting up Enterprise Library 3.5 - Simple Config File & Other Initial Setup Questions RRS feed

  • Question

  • User1982844092 posted

    Ok, I've downloaded Enterpris Library 3.5 and done the following so far:

    1.       Compiled the main .sln

    2.       Ran the "Enterprise Library Source Code Installer"

    3.       Opened the Library Config tool

    4.       Added a new application

    5.       Added the following to my application in the Library Config Tool:

    • Application Settings
    • Cryptography
    • Configuration Sources
    • Data Access Application block
    • Logging Application Block
    • Security Application Block

    6.       Setup my Database Connection String in the Data Access Application block

    7.       Under Environments, renamed the default environment to my website name

    8.       Under Environment, clicked on my Environment and typed in a name in the EnvironmentConfigurationFile (Just typed in a name, not a path cause I had no clue what this was supposed to be)

    Ok, the documentation for just setting up the initial config file and just to get things started is horrible.  It's talking in such general terms that I can't figure out if I'm missed anything

    So I have some questions or I am lost on:

    1)      "EnvironmentConfigurationFile"  that I had to type in a name for in the first place!  I searched and don't see it anywhere..what the heck does this stand for exactly, what file!?!  Is it the C:\EntLib3Src\App Blocks\bin\EntLibConfig.exe or should it be C:\EntLib3Src\App Blocks\bin\TheNameIGaveIt.exe ? or is this not even the file it's talking about?  How would I know?

    2)      Is there anything Else I missed other than to start adding the assemblies I need to my existing solution or projects?

    3)      Do I need to add anything to my web.config?  Add anything to any other config files?  Which?

    4)      So I guess I don't understand, does that EnterpriseLibrary.sln out of the box become mine meaning I use it to compile and extend after I get the config settings saved in the tool?  How is the config file and the tool connected together, is it in the .sln?  What "config" file is it talking about, it never really says specifically what and where.  And how is the config tool settings linked to my application?  Do I need to copy over the config file into my solution or anything?  I guess I'm a little grey on how this all "Plugs In" other than just including the assemblies I need for each block I'm planning to use in reference to the blocks I had added through the Config tool to my "application" in the Tool.  I don't see how the config file for Enterprise Library ties into my application's solution if at al or if that just remains separate and the only thing I need to then worry about is just including the dlls to my website??  Lost.

    for instance it says:

    To use the Configuration Editor

    1. Open a solution in Visual Studio 2005.
    2. In Solution Explorer, right-click the configuration file, and then click Edit Enterprise Library Configuration.

    ok, what configuration file!  the web.config?  or another .xml file?  Be specific!

    I guess I'm trying to determine where I'm at cause I'm sorry but the documentation just sucks at the beginning stages.  I can make better documentation than the first few pages in just a few hours.

    Here's a print screen of my setup so far:

    http://www.webfound.net/forum_posts/configtool_screenshot.jpg

     

    Tuesday, October 16, 2007 9:46 PM

Answers

  • User-955209475 posted

    Hi dba123,

    I'm by no means an EntLib expert, but I'll answer to the best of my ability.

    1)      "EnvironmentConfigurationFile"  that I had to type in a name for in the first place!  I searched and don't see it anywhere..what the heck does this stand for exactly, what file!?!  Is it the C:\EntLib3Src\App Blocks\bin\EntLibConfig.exe or should it be C:\EntLib3Src\App Blocks\bin\TheNameIGaveIt.exe ? or is this not even the file it's talking about?  How would I know?

     This is for environmental overrides, this shouldn't be required unless you're trying to use it.

    You could setup an environment for "Dev", one for "Staging" and one for "Production" and override specific values (such as a connection string) while reusing the rest of the configuration as a "base" for all three. See this blog post for a little more detail. 


    2)      Is there anything Else I missed other than to start adding the assemblies I need to my existing solution or projects?

    Nope, (the binaries if you're not using the GAC) a reference and whatever relevant sections added to your app/web.config should be all you need to get up and running.


    3)      Do I need to add anything to my web.config?  Add anything to any other config files?  Which?

    All the Entlib config lives within your app/web.config, it's just more config sections. All the "standard rules" for .net configuration apply.

     


    4)      So I guess I don't understand, does that EnterpriseLibrary.sln out of the box become mine meaning I use it to compile and extend after I get the config settings saved in the tool?  How is the config file and the tool connected together, is it in the .sln?  What "config" file is it talking about, it never really says specifically what and where.  And how is the config tool settings linked to my application?  Do I need to copy over the config file into my solution or anything?  I guess I'm a little grey on how this all "Plugs In" other than just including the assemblies I need for each block I'm planning to use in reference to the blocks I had added through the Config tool to my "application" in the Tool.  I don't see how the config file for Enterprise Library ties into my application's solution if at al or if that just remains separate and the only thing I need to then worry about is just including the dlls to my website??  Lost.

    for instance it says:

    To use the Configuration Editor

    1. Open a solution in Visual Studio 2005.
    2. In Solution Explorer, right-click the configuration file, and then click Edit Enterprise Library Configuration.

    ok, what configuration file!  the web.config?  or another .xml file?  Be specific!

     

    It sounds like you're trying to use the entlib config tool on the entlib solution? 

    The config tool is there to help provide a graphical way to edit the "EntLib specific" configuration sections.

    The actual Entlib Solution is the source for the dlls. It's there so you can build/extend/etc. If you're just interested in using Entlib without modifying it you can grab the binaries and ignore the solution.

    As I mentioned, the config file is always "your" web/app.config for whatever project/solution you're working on.

    The EntLib Forums on codeplex are fairly active, you may want to post over there as you're more likely to get a good* response.

    You may also want to check out the Web Client Software Factory if you haven't already, it leverages EntLib (and does other cool stuff while reducing a bunch of the work you have to do).

     

    I hope that helps.

     

    * No disrespect to anyone here, the Entlib Forums are dedicated to Entlib so you're much more likely to get a response from "an expert"

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 17, 2007 12:51 AM

All replies

  • User-955209475 posted

    Hi dba123,

    I'm by no means an EntLib expert, but I'll answer to the best of my ability.

    1)      "EnvironmentConfigurationFile"  that I had to type in a name for in the first place!  I searched and don't see it anywhere..what the heck does this stand for exactly, what file!?!  Is it the C:\EntLib3Src\App Blocks\bin\EntLibConfig.exe or should it be C:\EntLib3Src\App Blocks\bin\TheNameIGaveIt.exe ? or is this not even the file it's talking about?  How would I know?

     This is for environmental overrides, this shouldn't be required unless you're trying to use it.

    You could setup an environment for "Dev", one for "Staging" and one for "Production" and override specific values (such as a connection string) while reusing the rest of the configuration as a "base" for all three. See this blog post for a little more detail. 


    2)      Is there anything Else I missed other than to start adding the assemblies I need to my existing solution or projects?

    Nope, (the binaries if you're not using the GAC) a reference and whatever relevant sections added to your app/web.config should be all you need to get up and running.


    3)      Do I need to add anything to my web.config?  Add anything to any other config files?  Which?

    All the Entlib config lives within your app/web.config, it's just more config sections. All the "standard rules" for .net configuration apply.

     


    4)      So I guess I don't understand, does that EnterpriseLibrary.sln out of the box become mine meaning I use it to compile and extend after I get the config settings saved in the tool?  How is the config file and the tool connected together, is it in the .sln?  What "config" file is it talking about, it never really says specifically what and where.  And how is the config tool settings linked to my application?  Do I need to copy over the config file into my solution or anything?  I guess I'm a little grey on how this all "Plugs In" other than just including the assemblies I need for each block I'm planning to use in reference to the blocks I had added through the Config tool to my "application" in the Tool.  I don't see how the config file for Enterprise Library ties into my application's solution if at al or if that just remains separate and the only thing I need to then worry about is just including the dlls to my website??  Lost.

    for instance it says:

    To use the Configuration Editor

    1. Open a solution in Visual Studio 2005.
    2. In Solution Explorer, right-click the configuration file, and then click Edit Enterprise Library Configuration.

    ok, what configuration file!  the web.config?  or another .xml file?  Be specific!

     

    It sounds like you're trying to use the entlib config tool on the entlib solution? 

    The config tool is there to help provide a graphical way to edit the "EntLib specific" configuration sections.

    The actual Entlib Solution is the source for the dlls. It's there so you can build/extend/etc. If you're just interested in using Entlib without modifying it you can grab the binaries and ignore the solution.

    As I mentioned, the config file is always "your" web/app.config for whatever project/solution you're working on.

    The EntLib Forums on codeplex are fairly active, you may want to post over there as you're more likely to get a good* response.

    You may also want to check out the Web Client Software Factory if you haven't already, it leverages EntLib (and does other cool stuff while reducing a bunch of the work you have to do).

     

    I hope that helps.

     

    * No disrespect to anyone here, the Entlib Forums are dedicated to Entlib so you're much more likely to get a response from "an expert"

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 17, 2007 12:51 AM
  • User1982844092 posted

    Thanks a lot!  I still have to figure out just exactly what to put in my web.config and how editing the configuration information in the tool is updating my web.config?  I assume if I add a Data Connection String it's gonna put that in my web.config and update it?

     Weird thing is, I don't really see how to start out but except it tells you to right-click your config file and choose Enterprise Library.  Well, I don't have that option when I do this in my web solution in the context menu when I try right-clicking my web.config.

    Wednesday, October 17, 2007 7:15 AM