开发者

Logging Application Block doesn't add log entries to Event Viewer on machines other than that on which the application was built

开发者 https://www.devze.com 2022-12-29 01:39 出处:网络
I am usin开发者_StackOverflow社区g the Logging Application Block (of Microsoft Enterprise Library 5.0) to log exceptions in the Event Viewer that occur in my WPF XBAP application.

I am usin开发者_StackOverflow社区g 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消