473,413 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Enterprise Logging does nothing on server

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
5 1576
"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
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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JV | last post by:
I added enterprise library logging to an application using a custom event log. It works but it generates error entries in the Application log as well. Apparently it's trying to create some sort...
0
by: Benny Ng | last post by:
Hi,All, When i deploy Enterprise library with my application ,i used XCOPY to deploy it into my test server. But when application runs, shown some error related registry. (But actually I haven't...
6
by: Jonathan Crawford | last post by:
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473 Hi I have installed the enterprise library on a development machine and created a project on our webserver. When...
1
by: David Herbst | last post by:
Enterprise Library Jan 2006 with Visual Studio 2005 on Windows 2000 Server sp4. My custom exception formatter fails with a "Unable to handle exception: 'LoggingExceptionHandler'." exception. ...
0
by: Eniac | last post by:
Hello, I've started using Enterprise Library 2.0 recently and I've encountered a problem that seems to be ... well... undocumented :) Basically, when I set a Trace Listener (formatted event...
0
by: =?Utf-8?B?UHJhc2hhbnQgS3VtYXI=?= | last post by:
In my project we are using webservices to fetch data from the SQl server. For logging exceptions we are using Enterprise library 2.0. We are logging in the eventvwr of the web server. its working...
2
by: Anup Daware | last post by:
Hi Group, Can somebody tell me where I can find the internals of Logging application block 2.0/3.0. I need answers for the questions like: What best practices have followed in the...
0
by: =?Utf-8?B?YW5rMmdv?= | last post by:
Hi, Thanks in advance for reading this. Not sure where to post this question, but I hope someone in here can help. Trying to write to Event Log in VS 2005 (.NET 2.0) using Enterprise Library...
0
by: =?Utf-8?B?U2hyaWthbnQgTW9yZQ==?= | last post by:
Using enterprise library's 3.1 Logging Application Block , how can i get the custom source name in the windows event log.When ever i am logging an error in windows event log , it gives the source...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.