DNN 9.8 - EventLogController 已过时 - 有没有人有关于如何使用依赖注入方法来修复此错误的示例?
有人可能有一个示例来替换 DNN 模块中旧的错误日志记录吗?
我看过以下文章:
- https://dnncommunity.org/forums/aft/1527
- <一href="https://stackoverflow.com/questions/66790246/has-anyone-implemented-dotnetnuke-abstractions-portals-iportalaliasinfo-httpalia">有人在 DNN 版本 9.9 中实现了 DotNetNuke.Abstractions.Portals.IPortalAliasInfo.HttpAlias 吗?< /a>
catch (Exception ex)
{
EventLogController logController = new EventLogController();
logController.AddLog("Problem Getting Product Description, Title, or Image URL.", ex.ToString(), EventLogController.EventLogType.ADMIN_ALERT);
}
您需要创建启动文件吗? 如果是的话,是否需要为每个模块创建一个启动文件或者将其放在根文件夹中?
Does anyone perhaps have an example to replace the old Error logging in DNN module?
I have looked at the following articles:
- https://dnncommunity.org/forums/aft/1527
- Has anyone implemented DotNetNuke.Abstractions.Portals.IPortalAliasInfo.HttpAlias in DNN version 9.9?
I currently get the following error:
catch (Exception ex)
{
EventLogController logController = new EventLogController();
logController.AddLog("Problem Getting Product Description, Title, or Image URL.", ex.ToString(), EventLogController.EventLogType.ADMIN_ALERT);
}
Do you need to create a startup file?
If so, do you need to create a startup file for each module or put it in the root folder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一些适合我的代码:
这篇文章 也可能有用...
Here is some code that works for me:
And this article could be useful, too...