2012-01-18 79 views
0

我試圖使用iframeDefault.aspx頁面中嵌入ChartModule.aspx頁面。帶有iframe的.aspx頁面中的ASPX頁面拋出500.23錯誤

ChartModule有一個更新圖表的按鈕事件。 ChartModule有它自己的ChartsModule.cs

我得到這個錯誤:

HTTP Error 500.23 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.Most likely causes:

•This application defines configuration in the system.web/httpHandlers section. Things you can try: •Migrate the configuration to the system.webServer/handlers section. You can do so manually or by using AppCmd from the command line. For example, from the IIS Express install directory, run appcmd migrate config "Default Web Site/". Using AppCmd to migrate your application will enable it to work in Integrated mode. It will continue to work in Classic mode and on previous versions of IIS. •If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/[email protected] to false. •Alternatively, switch the application to a Classic mode application pool. For example, from the IIS Express install directory, run appcmd set app "Default Web Site/" /applicationPool:"Clr4ClassicAppPool". Only do this if you are unable to migrate your application.

Detailed Error Information: Module ConfigurationValidationModule Notification BeginRequest Handler
PageHandlerFactory-Integrated-4.0 Error Code 0x80070032 Requested URL http://localhost:4161/Default.aspx Physical Path
C:\Documents and Settings\singhm\Desktop\Temp\Trial2\Trial2\Default.aspx Logon Method Not yet determined Logon User Not yet determined Request Tracing Directory

這是爲什麼?

回答

1

雖然這可能不是直接回答你的問題,這裏是一個想法:

如果你有選擇,考慮將ChartModule.aspxUserControlascx),它就像另一個「頁面」(相同的生命週期,它自己的代碼隱藏文件等),但更整潔地集成到現有的aspx頁面中。上面的鏈接應該是創建和使用UserControl的好介紹。

0

我真的建議使用用戶控件頁面,而不是在asp.net I幀的這種方式,你可以通過做

public override DataBind() 

該用戶控件綁定你可以通過任何東西到像刷新數據用戶控件頁面,加載某些數據等。

1

錯誤消息包含一個線索的解決方案:

setting system.webServer/[email protected] to false

所以請確保以下是存在於你的web.config

<validation validateIntegratedModeConfiguration="false"/> 

例如:

<configuration> 

    <!-- your existing settings --> 

    <system.webServer> 

    <!-- Add this to here.... --> 
    <validation validateIntegratedModeConfiguration="false"/> 

    </system.webServer> 
</configuration> 

IIS 7和ASP.NET對於錯誤消息和提示c來說是相當有幫助的所以你應該花時間閱讀它們。