Installing Microsoft Enterprise Library on production servers

Many of us encountered a lot of problems when installing Microsoft Enterprise Library on production servers, you may face or see error like " System.Security.SecurityException: Requested registry access is not allowed"

 

Simply to deploy your web application that depends on Microsoft Enterprise Library, you need to do two things

 

1) Copy the Enterprise Library assemblies either in the bin folder or install them in the GAC.

2) Run the installers in the Enterprise Library's assemblies by running the "installServicesbat" batch file included with Enterprise Library.

 

Actually the second step is needed just because of the instrumentation that is built in the Enterprise Library's application blocks

 

If you tried to install the Enterprise Library on the server and run the "InstallServices.bat" patch file you would get an error that you don't have Visual Studio.NET.

This is expectable to not have VS on the production server, so to solve this you have 3 options:

1) Install VS.NET (doesn't seem brilliant)

2) Disable instrumentation in the Enterprise Library assemblies by recompiling the assemblies after removing some conditional compilation directives. But we will not be able to get it back unless you re-compile the assemblies again.

3) Use installutil.exe to manually register these services.

 

For more information about the conditional compilation solution, please refer to Tom Hollander's blog.

 

I developed a small console application that uses AssemblyInstaller class to install the services in the Enterprise Library's assemblies. It doesn't relay on Visual Studio and it can be used on production environment to install it and all what is needed is .NET framework.

 

This tool (ELServiceInstaller.exe) takes only one optional parameter which is the path of the .NET framework, if you didn't provide anything, the default path will be considered. For help please type ELServiceInstaller.exe /?

 

To install the tool press here and for source code, press here

 

Peace,

Mohamed

Comments

  • Anonymous
    September 27, 2005
    Many thanks.... worked like a charm.

  • Anonymous
    October 08, 2005
    Why not a merge module and use that merge module in your application installer? that merge module would just call the ProjectInstallers on the types you will include.

    InstallUtil is an ugly way if you ask me.

  • Anonymous
    October 08, 2005
    merge modules are ok if you are deploying your application with setup package but this is not the usual case in web applications.

  • Anonymous
    November 20, 2005
    Hi,

    First of all, thanks alot for the utility. This helps while deploying EL on a machine where there is no VS.NET.

    I have successfully integrated ur utility with Nant and made my app work..!!

    Cheers
    Kiran Banda

  • Anonymous
    January 12, 2006
    Hi,
    Shawn mentioned creating a merge module, and you said only relevant for setup package and as this is what I need to do - how would I go about doing this? What would I be trying to merge/install?
    Thanks.

  • Anonymous
    March 16, 2006
    Hi,

    many many thanks, I would not have been able to deploy our application on time without your AssemblyInstaller tool.



    Regards,

    MPVBRao.

  • Anonymous
    April 06, 2006
    Mohamed,

    Your information and utility worked like a charm.  You ROCK!!!  Thank you so much for posting this.

    It took me a minute to figure out that your util needed to be in the bin folder (along with ALL of the EL assemblies).  Once ran the " System.Security.SecurityException: Requested registry access is not allowed"
    error went away.

    Peace to you as well.  :-)

  • Anonymous
    June 05, 2006
    But the Zip File can't download now. And How to manuly install the services.

  • Anonymous
    July 02, 2006
    Thanks for help,

    Your app did not worked, but error stayed.

    Possibli because : "No public installers with the RunInstallerAttribute.Yes attribute could be found
    in the c:program filesmicrosoft enterprise library june 2005binmicrosoft.pr
    actices.enterpriselibrary.security.database.configuration.design.dll assembly.
    Remove InstallState file because there are no installers."

    Any how, I disabled instrumentation, and recompile and then, at last, my app started on   development server.

  • Anonymous
    August 02, 2006
    http://blogs.msdn.com/mohamed_sharafs_blog/archive/2005/09/18/470854.aspxhttp://geekswithblogs.net/t...

  • Anonymous
    September 19, 2006
    Running the ELInstaller I got the message below for every dll. I'm not sure if something is wrong and if yes, how to solve the problem.

    "No public installers with the RunInstallerAttribute.Yes attribute could be found
    in the c:program filesmicrosoft enterprise library june 2005binmicrosoft.pr
    actices.enterpriselibrary.security.database.configuration.design.dll assembly.
    Remove InstallState file because there are no installers."

  • Anonymous
    October 03, 2006
    Worked like a charm ,, thanks a million.. Peace, Ahmed

  • Anonymous
    October 21, 2006
    Re:  Getting Microsoft Enterprise Library to function on a PRODUCTION SERVER: After 8 hours of Googling this issue, reading pages and pages and trying EVERYTHING I read to no avail... I finally got my .NET Web Project to fly on my production server with Sql data by doing the following:

  1.  I copied this .exe file to c:/program files/Microsoft Enterprise Library June 2005/bin  
  2.  I ran the ELServiceInstaller.exe file from the above directory.
  3.  START -  RUN - IISReset SUCCESS!!! Thank you very much for your downloadable ELServiceInstaller.exe
  • Anonymous
    May 22, 2007
    give breif ntes a about  how to install enterprise library in .net