Application error in event log

W

Wayne

I have an application where I added a comment as the first line of my Config
file, as I found out I can't do this. However, an entry was made in the
event log about the error (Source = .net Runtime):

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event: .NET
Runtime version 1.1.4322.2032- WincommCapturePurge.exe - Common Language
Runtime Debugging Services: Application has generated an exception that
could not be handled.

The above is the error I got when I ran the app, I do not have admin rights
on the machine. At some point I got one of our network admins to run the app
and the following is what he got for the error (Source = Application Name
(which means my try/catch wrote the error out) ):

Error loading XML file file:///D:/WincommDFS/Landstar/Applications/Wincomm
Capture Purge/WincommCapturePurge.exe.config The XML declaration is
unexpected. Line 2, position 3. (D:\WincommDFS\Landstar\Applications\Wincomm
Capture Purge\WincommCapturePurge.exe.config)

Once removing the comment I was able to run the app, which at a later time
failed due to a security right on a directory, the application was able to
write that error to the event log.

As far as I can tell the install of the frame work is very much a default
install, running on 2003 server.

Why the difference in errors? Why wouldn't the app written the invalid xml
error when I ran it? is there something I need to set up in the framework to
allow for the errors to be the same no matter who runs the app?

--
Thanks
Wayne Sepega
Jacksonville, Fl

Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg

"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
 
G

Guest

Hi,

The app.config/web.config file are loaded by default by the image, this
image is compiled by the .NET the first time that you load the assembly, at
that point the config file is loaded so there is no exception handling
available at that stage. This means that the image compilation failed. You
can not alter at runtime the config file (upon there are functions like
Add/Delete, they don' work and is considered bad practice)

Hope this helps to understand
Salva
 
W

Wayne

Two things,

1) that still doesn't explain the difference in the error message
2) when I put the comment in the config file in dev and run the app in the
IDE an exception of not being able to load the config isn't thrown till I
try to read a value from the config. So I'm thinking the config file isn't
loaded at start up but rather when you try to access it for the first time.


Wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top