创建EventSource不会触发EventListener.OnEventSourceCreated

时间:2019-02-19 15:01:40

标签: c# asp.net asp.net-core owin kestrel-http-server

我正在尝试使用EventSource + EventListener系统登录我的应用程序。它由两部分组成。一种是基于owin的webapi,它可以根据需要工作。第二个是基于kestrel的MVC Web应用程序,该应用程序存在以下问题:创建EventSource之后,不会触发EventListener中的相应回调,并且我无法使用此EventSource。 初始化代码实际上在两个应用程序中都是相同的。

new ApplicationInsightsEventListener(configProvider, new FabricHealthReporter(Constants.ApplicationInsightsEventListenerSection));
ServiceEventSource.Current.Message("test");

在第二行,第一个应用触发了回叫,但第二个则没有。 我不知道我在做什么错。

0 个答案:

没有答案