English 中文(简体)
SqlWebEventProvider w/ windows service
原标题:

I am trying to raise some custom events to a SqlWebEventProvider from a windows service. Here are the steps I have taken and the results I have seen. I cannot figure this one out.

  1. Setup 2 healthMonitoring providers SqlWebEventProvider, and SimpleMailWebEventProvider (both .net 2.0 framework, and sqlwebeventprovider is basically the default one w/ modified connection string name)

  2. Setup website and windows service that both raise same event type

  3. Moved healthmonitoring element from global web.config to machine.config (so windows service could pick up the configuration).. (the healthmonitoring defaults are located in global web.config, so they would not be inheritable from windows services, so this is why i had to move the defaults to machine)

Here is what I did to test

To test this scenerio, I raised an event from the website to both providers and it worked fine. Then in the windows service I raised the events to both and it only works to the SimpleMailWebEventProvider. I made sure that the connection strings were correct for the SqlWebEventProvider (they are both getting conn string from machine.config).

I copied the entire HealthMonitoring element from the web.config to the windows service config file and still get the same behavior.

I restarted the service, uninstalled it reinstalled it... still, same behavior.

Here is what I know for sure

  • There is nothing wrong with the providers, both will work from website.
  • Websites and web services can inherit from machine.config the same way
  • The connection string is correct
  • The events are raising
  • The events can raise to the SimpleMailWebEventProvider for both windows service and website
  • The events can raise to the SqlWebEventProvider only from the website
最佳回答

I found the issue

aspnet_WebEvent_LogEvent expects parameter @ApplicationPath , which was not supplied.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签