调用service,而Context.ServerUrl 为 null.
金蝶云社区-quHongan
quHongan
0人赞赏了该文章 893次浏览 未经作者许可,禁止转载编辑于2015年06月24日 10:30:49

建立插件类,继承AbstractListPlugIn,在插件中调用自己写的service,需要传递this.Context,而使用T service = _mapServer.GetService(typeof(T).AssemblyQualifiedName, url);时,因为其中的url是插件中的this.Context.ServerUrl,而ServerUrl为null,导致出错。我要在自己写的service中访问数据库。

问题是为什么ServerUrl会为null?