为什么CommerceContext.Current.CatalogSystem == null [英] Why is the CommerceContext.Current.CatalogSystem == null
问题描述
大家好,
我遇到的问题是某些网页上的CommerceContext.Current.CatalogSystem为空。
I am facing a problem where the CommerceContext.Current.CatalogSystem is null on certain pages.
有谁知道什么会导致这个问题?就像在旧页面中一样,它很好,但是当我转到新创建的页面时它会变为空。
Does anyone know what can cause this issue? As in the old page, it's fine but it's become null when I go to the new created page.
这很奇怪且令人困惑。
谢谢,
最诚挚的问候,
Ronald Wisnu Hariyanto
Ronald Wisnu Hariyanto
推荐答案
您好Ronald,
Hi Ronald,
您是否能够执行其他ASP.NET代码在该页面上?
Are you able to execute other ASP.NET code on that Page?
如果不是 - 您的页面未由IIS中的ASP.NET运行时处理 - 也许您正在使用另一个未配置ASP.NET的扩展程序?你正在运行哪个IIS版本?
If no - your page is not handled by the ASP.NET Runtime in IIS - maybe you're using another extension that ASP.NET is not configured to use? Which IIS version are you running?
如果是 - 似乎您的页面配置在另一个IIS网站上下文中,而不是您提及的其他可访问目录系统的页面。您是否在IIS网站中使用虚拟目录?如果是这样,请确保这些
虚拟目录的web.config还包括商务服务器的HttpModules。
If yes - it seems that your page is configured in another IIS web-site context than the other pages you mention that has access to the Catalog System. Are you using Virtual Directories within your IIS web-site? If so, make sure that the web.config for these Virtual Directories also include the HttpModules for Commerce Server.
希望这会有所帮助:)
最好的问候
Brian Holmgå rd Kristensen
Best Regards
Brian Holmgård Kristensen
这篇关于为什么CommerceContext.Current.CatalogSystem == null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!