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.
Setup 2 healthMonitoring
providers SqlWebEventProvider
, and SimpleMailWebEventProvider
(both .net 2.0 framework, and sqlwebeventprovider is basically the default one w/ modified connection string name)
Setup website and windows service that both raise same event type
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)
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.
SimpleMailWebEventProvider
for both windows service and websiteSqlWebEventProvider
only from the websiteI found the issue
'aspnet_WebEvent_LogEvent' expects parameter '@ApplicationPath', which was not supplied.