0

打开弹出窗口时出现应用程序级错误。我的代码中有一个try catch块,但错误仍然没有记录在数据库中。错误说:

“在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的部分是错误的。此错误可能是由于虚拟目录未在 IIS 中配置为应用程序造成的”

Source Error
<deny Users="*"/>
</authrization>
<authetication mode="Forms">
<forms defaultURL= "~/login.aspx" cookieless="Autodetect"/>
</authetication>

.

我的应用程序被配置为 IIS 中的虚拟目录。除非我打开此弹出窗口,否则我在应用程序的任何地方都没有收到此错误。下面是我打开弹出窗口的代码。

private void openWindow(int QueryId)
    {
        try
        {
            pnlChart.Visible = true;
            BindBarGraph();
            string strScript = "window.open('/N/Viewer/ViewerSummary.aspx?QueryID=" + QueryId + "', '_blank','height=650, center:yes, width=800, status=no, resizable= yes, menubar=no, toolbar=no, location=yes, scrollbars=no, status=no');";
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "strScript", strScript, true);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

我在 Windows 2008 服务器上收到此错误。当我在我的开发机器上运行程序时,我没有收到此错误。

4

0 回答 0