0

I've an Ektron C# web forms application that I'm setting up for multilingual capability. So far, all Ektron settings seem good (as per documentation) for displaying pages in French. However, when I select the language by passing ?langtype=1036 (French locale ID) on the querystring, an Error 500 is raised (BTW, I've enabled detailed error message reporting in web.config as well as IIS and I still get that 500).

After much Googling, I haven't found any indication of why the problem occurs. So, I'm thinking, easy enough to debug, right? I've placed in the following code at every relevant application or page event handler I can think of. Example:

global.asax:

void Application_EndRequest(object sender, EventArgs e)
{
Context.Response.Write("Application_EndRequest");
}

From a page or masterpage:

void Page_Init(object sender, EventArgs e)
{
Context.Response.Write("Page_Init");
}

Within these events I would page in and take out...

Response.End(); 

...to see what events were actually triggering prior to the exception (hoping I could debug within one of them). The 500 error is raised after the Application_EndRequest event and before Page_Init or Page_PreInit.

So, I'm wondering: + Are there events I'm overlooking for which I can debug the error? + Is there another tactic I can take for debugging this rather than using events? + Is this something probably happening within an Ektron DLL that I've no ability to debug?

Any help would be most appreciated!

Thanks!

4

1 回答 1

0

在这种情况下,应用程序事件日志是您的朋友。控制面板 > 管理工具 > 计算机管理。然后在左窗格中,展开系统工具、事件查看器、Windows 日志,然后单击应用程序。

正如 egandalf 所说,您可能需要更改 LogLevel 以获得足够的数据来诊断问题。这是进行此更改时要查找的 web.config 的相关部分。

<system.diagnostics>
    <switches>
        <!-- Determines the level of messages that are logged
        1 = Error:  Only Errors are logged.
        2 = Warning:  Only warnings and Errors are logged.
        3 = Information:  Only Informationals, Warnings, and Errors are logged.
        4 = Verbose:  Everything is logged.

        NOTE: you can configure where each message level is logged using the instrumentation.config.
        -->
        <add name="LogLevel" value="1" />
    </switches>
</system.diagnostics>

当我调试这样的问题时,对我有帮助的另一件事是删除任何“额外”的东西。尝试指向您现有数据库的新 CMS Min 站点。那个网站也会发生同样的事情吗?如果这不能让您到任何地方,请尝试从 web.config 中删除模块,然后将它们重新添加,一次一个。也许您可以使用排除过程来确定错误是否发生在任何模块中。

更新:

我知道你在你的问题中说“到目前为止,所有 Ektron 设置似乎都很好......”。但是,我认为重要的是要注意必须通过工作区启用语言(设置 > 本地化 > 语言和区域),并且可以在工作区而不是在站点上启用语言。在工作区的此页面上,勾选表示已在站点上启用,三角形表示仅在工作区中启用而不在站点上启用。在您的工作区中仔细检查此页面可能是值得的。

于 2013-10-26T23:04:50.497 回答