我有下一个问题。我们有一个巨大的客户端-服务器系统,并使用CSLA来操作数据库数据。这里有一组基于WinForms的客户端和一个基于WCF的AppServer。我们有自定义日志子系统,该子系统的设置存储在数据库中。因此,在初始化系统的每一端(客户端应用程序或应用程序服务器)时,我们需要使用数据库中的设置来配置日志记录子系统。在客户端应用程序中,这很容易做到。但是在初始化CSLA WCF Portal之后,我们如何扩展CSLA WCF Portal来初始化日志呢?
那么,如何定制CSLA的初始化呢?
非常感谢!
发布于 2010-07-19 15:18:16
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.
https://stackoverflow.com/questions/3279681
复制相似问题