自定义CSLA服务器端初始化

发布于 2024-09-10 14:16:35 字数 290 浏览 3 评论 0原文

我有下一个问题。我们有一个庞大的客户端-服务器系统,并使用 CSLA 来操作数据库数据。有一组基于 WinForms 的客户端和一个基于 WCF 的 AppServer。我们有自定义日志记录子系统,该子系统的设置存储在数据库中。因此,在初始化系统的每一端(客户端应用程序或应用程序服务器)时,我们需要使用数据库中的设置来配置日志记录子系统。在客户端应用程序中这很容易做到。但是我们如何在 CSLA WCF Portal 初始化之后扩展 CSLA WCF Portal 来初始化日志记录?

那么,如何自定义CSLA的初始化呢?

多谢!!

I have next problem. We have a huge client-server system and use CSLA to operate with DB data. There are a set of WinForms-based clients and one WCF-based AppServer. We have custom logging subsystem and settings for this subsystem are stored in DB. So on initialization of each side of our system (client application or application server) we need to configure logging subsystem with settings from DB. In the client application it is easy to do. But how can we extend CSLA WCF Portal to init logging after init of CSLA WCF Portal??

So, how to customize the initialization of CSLA?

Thanks a lot!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

执妄 2024-09-17 14:16:35

Rockford Lhotka 在他的论坛 http://forums.lhotka 上回答了这个问题。 net/forums/p/9224/43785.aspx#43785

在 CSLA 3.8 及更高版本中,在发生其他任何事情之前,服务器上存在一个钩子。它旨在对每个服务器调用启用授权,但它也可用于执行服务器端初始化。

您需要实现 Csla.Server.IAuthorizeDataPortal 并添加一个配置条目,以便数据Portal 知道实现该接口的类的程序集限定类型名称。

Rockford Lhotka answered this question on his forum http://forums.lhotka.net/forums/p/9224/43785.aspx#43785

In CSLA 3.8 and higher there's one hook that exists on the server before anything else occurs. It is designed to enable authorization on every single server call, but it can be used to perform server-side initialization as well.

You need to implement Csla.Server.IAuthorizeDataPortal and add a config entry so the data portal knows the assembly qualified type name of your class that implements the interface.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文