Microsoft Enterprise Library

Discussion in 'ASP.NET / ASP.NET Core' started by Bruce, Jul 25, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    I've seen quite a few questions and postings regarding how to use MS Enterprise Library on our server in the past several months, I decided to test it out myself.

    I found that a straight import of the library will not work on a shared hosting server because the hosting server do not have the necessary registry entries. By default, Enterprise Library Application Blocks include instrumentations which write log to Event Log, WMI Event and Performance counter.

    In order for you to use Enterprise Library on a hosted environment that does not allow instrumentation, you'll need to recompile the application blocks with the instrumentation disabled.

    1) Goto Start -> Programs -> Microsoft patterns & practices -> Enterprise Library - June 2005 -> Application Blocks for .NET -> Enterprise Library Solution
    2) Once the Solution opens in VS.NET 2003, right click on Common project in the Solution Explorer and bring up the property
    3) Navigate to Configuration Properties -> Build
    4) Remove USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER from the Conditional Compilation Properties property
    5) Recompile the Common project
    6) Copy the dlls to the bin directory from the build location by running the builtin batch file. Goto Start -> Programs -> Microsoft patterns & practices -> Enterprise Library - June 2005 -> Copy Assemblies to bin Folder
     
  2. Awesome! Thank you for your help!
     
  3. [​IMG]
    I just wanted to touch base and find out if this in fact works.
    I attempted this locally a few months back, not sure if I did it properly, but it did not work.
    Can anyone out there confirm that this does in fact work before I go and spend the hours testing it for myself?
    Especially with the June release of ent lib 2k5.
    Bruce?

    MANY MANY MANY Thanks for your time,
    Sincerely,
    Buzzuti
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    yeah.. i tested using the data application block and it worked fine.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Stu

    Stu

    Hi, I made the change suggested by Bruce and all the blocks that I am using now work perfectly. I am using Config, data access, logging, and exception handling. (I log to a flat file).


    The change only took a few moments to make (I actually created a new build config in Visual Studio for shared hosting and made the changes Bruce suggested...I left my std. release as it came from the Patterns & Practices download).
    So, to the person who was wondering if it is worth the hassle: yes...and it's not really much of a hassle either.

    Thanks, Bruce, for the great help!

    Stu
     
  6. Rock and roll! Thanks for the assist, and many thanks to you Bruce!

    bz
     
  7. Bruce

    Bruce DiscountASP.NET Staff

    Hello all.

    I tested the latest version of the application block (Jan 2006). It seems like it works on our web server out of the box.

    No modification is needed like in the previous version.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  8. Bruce, once again, you are my hero. I have about 6 weeks left in the development cycle I am in.
    I created a wrapper class for the Ent Lib to protect my application, but this is great news because the current wrapper class is using Ent Lib 2.0! [​IMG]

    Many thanks!
    Buzzuti
     
  9. I'm using the latest enterprise library solution as of July 2007. I assume that the intial post doesn't apply anymore as I do not see those properties in VS 2005 in the proproperties of the Common project.
     
  10. Bruce

    Bruce DiscountASP.NET Staff

    This post applies to the really old version of Enterprise Lib.


    You should not need to recompile with the last version already.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  11. Thanks!
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page