0

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

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

非常感谢!!

4

1 回答 1

1

Rockford Lhotka 在他的论坛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.

于 2010-07-19T15:18:16.037 回答