views:

160

answers:

1

I am using the Logging Application Block (of Microsoft Enterprise Library 5.0) to log exceptions in the Event Viewer that occur in my WPF XBAP application.

However, exceptions are only being logged if the application is run on my machine (the machine it was built on). Any other machine it doesn't log anything.

I've tried to find a reason why this might be occurring - I've tried setting requirePermission to false - but to no avail.

Anyone any ideas on why this might be happening?

A: 

Logging to eventlog requires rights.

Not sure if this is the problem in your case, but typical scenario is: On dev machine program runs in context of logged on user which is an administrator, when it is deployed it is running in the context of a user with fewer rights.

The other thing to watch out for, is how the app is being deployed, if the OS thinks that the program came from the internet it will restrict what the program can do.

Shiraz Bhaiji
It appears that running an XBAP in a browser results in limitations on event logging. Further information for reference:http://msdn.microsoft.com/en-us/library/bb412186.aspxhttp://social.msdn.microsoft.com/forums/en-US/wpf/thread/857815b7-ade2-4bbc-8047-e0bfad2d5d3bhttp://scorbs.com/2007/01/10/xbap-trust-levels/
Neo