RobLog

Web Design in the World of .NET (C# and VB.NET, XML, and Javascript). I learned how to program from TheDailyWTF.com!
posts - 140, comments - 129, trackbacks - 5

My Links

News

Main Site Cert Corner Goals About Me

Article Categories

Archives

Post Categories

Image Galleries

.NET

Personal

WOW


Deploying Enterprise Library Successfully the First Time

A few people have been asking me how to deploy the applicatin blocks inside of Enterprise Library successfully.  I have set up a little bit of direction to help everyone out.  The problem with deployment is that Enterprise Library needs to create three event sources for the registry and receives an error attempting to do it.

This is the error that you may be receiving:

Exception Details: System.Security.SecurityException: Requested registry access is not allowed.
[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex) +445
System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName) +11
Exception Details: System.Security.SecurityException: Requested registry access is not allowed.

Attempt to do this first: http://blogs.msdn.com/tomholl/archive/2005/02/18/376187.aspx#392203

If you are finding it is taking too much time to install each and every one and just want to do all of them at once as the original Install Services batch has intended, follow these instructions.

You or an administrator needs to perform the below actions on the deployment server.

  1. Install Microsoft Enterprise Library on the server.
  2. Open your environment variables and add this to the Path: C:\WINNT\Microsoft.NET\Framework\v1.1.4322;
  3. Find the InstallServices.bat , right click on it, and select Edit.
  4. Go to this line: if not Exist "%visualStudioDir%..\Tools\vsvars32.bat" goto HELPVS
  5. Insert “REM “ at the beginning of the line minus the quotes.
  6. The next line that starts @call gets a REM, too.
  7. Save the file.  This time double click on the file and let it run.
  8. Deploy your first program. 
  9. Run your program and ensure that it does NOT work as hoped.
  10. If you are using impersonation elevate the accessing users privileges on the server to Administrator.  If not, elevate ASPNET or whatever the aspnet worker process is using for an account.
  11. Run your program and ensure that it does in fact work as hoped.
  12. Restore the privileges for the user back to what they were.
  13. Run your program one last time to ensure that it does work as planned.
  14. Crack open a beer (or a soda if you are at work) and rest easy because you just saved yourself hours of anguish.

posted on Saturday, April 30, 2005 10:39 AM

Feedback

# re: Deploying Enterprise Library Successfully the First Time

i've replaced step #1 above with simply copying the dll's up to a share on the deployment servers, and then running the installutil exe over each of them. this seems to be working. do you see a problem with this?

i don't have permission to install EntLib, which is why i've done it this way.

step # 10 was key, thanks for the info.

9/23/2005 10:26 AM | Kevin

# sneakernice

sneakernice
5/11/2008 8:51 AM | nike air force ones

# re: Deploying Enterprise Library Successfully the First Time

The MangaCast team takes a hard look at this week’s new manga, and Ed has the 411 on three new titles from DMP.
The first wave of nominations for the YALSA Great Graphic Novels for Teens list is up, and manga is well represented. I like the range of the list, which includes both Pet Shop of Horrors
http://kriomotors.info/index.php?sm=2
http://pro-samer.info/index.php?sm=6
http://forter.info/index.php?sm=8
http://basker.info/index.php?sm=3
http://triometr.info/index.php?sm=1
Tokyo and Japan Ai: A Tall Girl’s Adventures in Japan, two books that are great (as in “awesome!” rather than “an epic for the ages”) in very different ways. If you feel something is missing, nominate it yourself! (H/T: Robin Brenner.)
5/25/2008 4:56 AM | Ben

# re: Deploying Enterprise Library Successfully the First Time

http://www.sneakersupplier.com buy air jordan shoes online!!!
8/25/2009 10:20 PM | air jordans

Post Comment

Title  
Name  
Url
Comment   
Protected by Clearscreen.SharpHIPEnter the code you see: