By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,496 Members | 1,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,496 IT Pros & Developers. It's quick & easy.

Enterprise Logging does nothing on server

P: n/a
Hi,

I'm new here.

I'm using the Logging Application Block with Enterprise Library 3.1.
My program works correctly on my XP developer station, but on the 2003
Server, no new entries appear in the Application log after calls to
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(object
message), but those calls aren't throwing exceptions, either.

I tried using System.Diagnostics.EventLog instead. Again, this works
as it should on my XP station, but on the server, it throws an
exception with the message "Showing a modal dialog box or form when
the application is not running in UserInteractive mode is not a valid
operation. Specify the ServiceNotification or DefaultDesktopOnly
style to display a notification from a service application."

I'd really appreciate any help you can offer.

Thanks,
Daniel Sheiner
Oct 15 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Daniel S" <da*******@gmail.comwrote in message
news:57**********************************@m32g2000 hsf.googlegroups.com...
Hi,

I'm new here.

I'm using the Logging Application Block with Enterprise Library 3.1.
My program works correctly on my XP developer station, but on the 2003
Server, no new entries appear in the Application log after calls to
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(object
message), but those calls aren't throwing exceptions, either.

I tried using System.Diagnostics.EventLog instead. Again, this works
as it should on my XP station, but on the server, it throws an
exception with the message "Showing a modal dialog box or form when
the application is not running in UserInteractive mode is not a valid
operation. Specify the ServiceNotification or DefaultDesktopOnly
style to display a notification from a service application."
System.Diagnostics.EventLog does not display anything on the screen. Perhaps
it is throwing an exception, and your exception handler is trying to display
something?

--
John Saunders | MVP - Connected System Developer

Oct 15 '08 #2

P: n/a
System.Diagnostics.EventLog does not display anything on the screen. Perhaps
it is throwing an exception, and your exception handler is trying to display
something?
In that case, the question is what kind of exception would
System.Diagnostics.EventLog throw that wouldn't be displayed directly
in my web browser like other exceptions?
Oct 15 '08 #3

P: n/a
On Oct 15, 2:40*pm, Daniel S <daniel...@gmail.comwrote:
Hi,

I'm new here.

I'm using the Logging Application Block with Enterprise Library 3.1.
My program works correctly on my XP developer station, but on the 2003
Server, no new entries appear in the Application log after calls to
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(object
message), but those calls aren't throwing exceptions, either.

I tried using System.Diagnostics.EventLog instead. *Again, this works
as it should on my XP station, but on the server, it throws an
exception with the message "Showing a modal dialog box or form when
the application is not running in UserInteractive mode is not a valid
operation. *Specify the ServiceNotification or DefaultDesktopOnly
style to display a notification from a service application."

I'd really appreciate any help you can offer.

Thanks,
Daniel Sheiner
Not sure if this mirrors your situation, but...
When I first used this block, I couldn't write to the event log from a
web service on my development machine. As in your case, no exception
was thrown.

But if I ran the windows sample app that came with the block, I could
write to the event log. Turns out that this worked because the
windows app ran under my id, while the web service ran under the
ASP.NET user id, which didn't have permissions to write events.

But....if once category was already established in the event log, then
the web service write an event with that category. So I used the
windows app to establish the category, and then I was ok.

There may be a simpler way to accomplish this, but try writing the
same event with that sample program, i.e. \EntLib3Src\Quick Starts
\Logging\CS\LoggingQuickStart,
and then see if your web app can do it.
Oct 15 '08 #4

P: n/a
Turns out the event source in my web.config didn't match the event
source the program created in the event log's registry. I don't know
why this would throw an exception for System.Diagnostics.EventLog but
NOT for Microsoft.Practices.EnterpriseLibrary.Logging.Logg er, but at
least it's working now.

Thanks for the help, guys!!!
Oct 15 '08 #5

P: n/a
"Daniel S" <da*******@gmail.comwrote in message
news:c7**********************************@k30g2000 hse.googlegroups.com...
Turns out the event source in my web.config didn't match the event
source the program created in the event log's registry. I don't know
why this would throw an exception for System.Diagnostics.EventLog but
NOT for Microsoft.Practices.EnterpriseLibrary.Logging.Logg er, but at
least it's working now.
Make sure you have the category enabled for logging errors. I forget what
it's called, but there is a category for errors that happen in the process
of logging errors.

--
John Saunders | MVP - Connected System Developer

Oct 16 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.