Thursday, April 05, 2007

Enterprise Library 2.0 without Instrumentation

One of the ASP.NET applications I am working on is hosted on a shared server by a hosting company (yeah, that $10.00 per month deal). And the application also uses MSEL 2.0 Data Application Block for. well, data access. Those of who have used MSEL2.0 also have run that often forgotten utility named InstallUtil.exe. This executable is run for supporting the Instrumentation code in the MSEL.

But unfortunately, the web hosting company wouldn't allow this poor guy run any exes. I assume this is the scenario with any other hosting company, unless one gets a dedicated server.

So, I started searching on Internet and asking people around. Some people have not heard of MSEL (which surprised me) and others did not know how to do it. So I decided to ask the man himself. I send a mail to Tom Hollander describing my scenario.

He replied:

The server owner probably won't let you run installutil.exe by any mechanism. However you don't need to run installutil unless you have instrumentation enabled for your application. Provided you have this switched off, you should be able to "xcopy deploy" the application.

According to his suggestion, this is what I did:

1. Remove the conditional compilation directives (USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER) from the Common project (in MSEL solution) properties and recompile the same.
2. Copy the dlls and use it wherever you want.

And lo! I am off to work!

My heartful of thanks to Tom.

No comments:

Post a Comment