Getting started with the Enterprise Library

If you haven't checked out the recently released Enterprise Library, you should do it very soon. :-) This week I'm teaching a course about building Enterprise Applications, so it's a good opportunity to evangelize the Enterprise Library among my students.

Anyway, on a couple of my development VPC images, I noticed some events appearing in the Event Log (see below). Maybe I should have spent some more time reading the docs, but the solution is to run the InstallServices.bat which is located in X:\Program Files\Microsoft Enterprise Library\src. It's a pity that this bat file uses VS.NET to do it's magic, somebody got a nice solution for the servers that aren't running VS.NET?

  • Failed to create instances of performance counter 'Total Command Executions' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
  • Failed to create instances of performance counter 'Average Command Execution Time' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
  • Failed to create instances of performance counter '# of Commands Executed/Sec' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
  • Failed to create instances of performance counter 'Distributor: # of Logs Distributed/Sec' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

UPDATE: Check out Rob Gibbens' comments on this post, thanks Rob!

<snip>
Regarding the install services script, we only require devenv because we need to find the location of installutil, which we do by running vsvars32. If you don't have devenv you can modify the InstallServices.bat file with a path to installutil, or just call installutil directly over each assembly.
</snip>

Found answer at
http://weblogs.asp.net/tomholl/archive/2005/02/14/372512.aspx

8 Comments

  • Where do those events come from? Do we have to run this utility on every machine using the data access block to avoid these events?

  • To clarify:



    I have an application i am getting ready to deploy that uses the Enterprise Library Data Block.



    Will i have to run this utility on the server i am deploying this application on to prevent these events?

  • Yes, will need to run it on every server that you plan on using the Enterprise Library On.



    -Add C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 to your path.

    -Comment out

    if not Exist &quot;%visualStudioDir%..\Tools\vsvars32.bat&quot; goto HELPVS



    @call &quot;%visualStudioDir%..\Tools\vsvars32.bat&quot;



    Double click on the script and it should install all the services without a problem.

  • I've created a Custom Action installer component, which can be used to perform these tasks without the need for installutil or Visual Studio installed. It's on my blog... :-)

  • From within a MSI package that is..

  • I am developing an application that will reside on a web farm at a company that generally takes a hard look at any new server software.



    I began developing the framework for the app using the Enterprise Library. But if the Enterprise Library is going to require utilities outside of the specific app location then it is no longer an option.



    Too bad. It looked pretty slick.



    Bill Waltman

  • Thanks for the clarification on the exact steps to take Keith -

    I was looking at the batch file thinking that was it, but hate to figure that stuff out via trial and error on any enterprise servers, even the DEV or TEST servers. I just followed those instructions to update four of my Windows Server 2003 DEV boxes and all worked flawlessly. I'll be glad to have all of those errors out of the event viewer.

    Good work!

  • Lucy! Please call me,Lucy! Please call me

Comments have been disabled for this content.