在DotNetNuke的ASMX web服务的文件访问的moduleId和PortalID [英] Access to ModuleID and PortalID in asmx webservice file in DotNetNuke
本文介绍了在DotNetNuke的ASMX web服务的文件访问的moduleId和PortalID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的DotNetNuke的module.How一个ASMX web服务的文件,我可以接触到PortalID和的moduleId在此ASMX文件。当我尝试这个code,在code behinde .ascx.cs正常工作文件,它返回portalID = 0,的moduleId = 1
私人Components.Setting _ModuleSettings;
_ModuleSettings =新Components.Setting(PortalId,的moduleId);
解决方案
模块设置要求你是一个模块的范围内。一个的.asmx服务不会有上下文的水平。
I have an asmx webservice file in my DotNetNuke module.How can I access to PortalID and ModuleID in this asmx file . when I try this code that works fine in code behinde .ascx.cs file it return portalID=0 , ModuleID=1
private Components.Setting _ModuleSettings;
_ModuleSettings = new Components.Setting(PortalId, ModuleId);
解决方案
Module settings require that you be within the context of a module. An .asmx service is not going to have that level of context.
这篇关于在DotNetNuke的ASMX web服务的文件访问的moduleId和PortalID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文