Technorati Tags:
Design Patterns Today, I came across a couple of confusing errors while trying to re-setup logging again on a new PC and running my web application. It was throwing an exception logging error for Enterprise Library in my Data Layer.
Error 1:
“Format of the initialization string does not conform to specification starting at index 45”
This is a pretty common error that simply pertains to an incorrect DB connection in your config file (web.config, etc.)
The problem on my end was that I had setup the DB connection string quite a while back for the web app using the Enterprise Library Config Tool. Recently I copied over the code to a brand new machine and when trying to run this app, obviously, the connection string was no longer valid but I did not see that until I got this error in my EL exception handling code.
Error 2:
“Inaccessible logs: Security Error”
After fiddling around with the exception and logging blocks in the Enterprise Library Config tool a bit, I was not able to get the error to go away. However what I do think fixed it was ultimately closing out VS 2008 and re-opening VS 2008 in Administrator mode on my Vista machine and as soon as I did that and re-built the website, that error went away.
Here’s the example code where it was throwing the error:
1: catch (Exception ex)
2: {
3: if (ExceptionPolicy.HandleException(ex, "Elbalazo.DataLayer.Exceptions"))
4: {
5: throw;
6: }
7: }
Print | posted on Monday, September 29, 2008 2:02 AM