2009-03-06 49 views
1

我有一個web應用程序在兩天前工作正常。當我將這個網站移到另一臺機器上時,然後面臨以下問題。

在我的網頁,我已經宣佈的ScriptManager爲:使用ScriptManager時解析錯誤

<asp:ScriptManager ID="scriptMgr" runat="server"> 
</asp:ScriptManager> 

當我訪問網頁時,我收到此錯誤:

The base class includes the field 'scriptMgr', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager). 

而另一網頁上,我我得到以下錯誤:

The base class includes the field 'upProgress', but its type (System.Web.UI.UpdateProgress) is not compatible with the type of control (System.Web.UI.UpdateProgress). 

我的web應用程序建立在ASP.NET 2.0上,我也已經驗證了cor rect(1.0.61025.0)版本的System.Web.Extensions.Dll存在於我的應用程序的bin文件夾中。

在web.config項爲System.Web.Extensions.Dll是:

<configSections> 
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 
    <section name="CSI.OLS.Library.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
</sectionGroup> 
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> 
    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> 
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> 
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" /> 
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> 
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> 
    </sectionGroup> 
    </sectionGroup> 
</sectionGroup> 


看來,這兩種錯誤都涉及到使用AJAX功能。誰能告訴我,有什麼可能導致上述錯誤?

回答

0

asp.net 2.0是否需要擴展補丁才能正確支持ajax應用?

http://www.asp.net/AJAX/downloads/

+0

我已經安裝了這個補丁。不過,我面臨錯誤。 – 2009-03-06 06:51:55

0

這似乎是一個.NET 2.0 AJAX 1.0 VS .NET 3.5 AJAX的問題。 (IE,AJAX庫直接包含在.NET 3.5中,看起來您正嘗試使用.NET 3.5版本的AJAX庫)。

我在應用程序中遇到同樣的問題,發現this提及解決問題的兩個建議。

一個建議是在您的項目文件的參考System.Web.Extensions.dll裝配到特定版本屬性設置爲。由於您明確引用了此程序集的1.0.61025.0版本,因此我懷疑這會解決此問題。

0

一個遲到的回答:)但是我在我的產品也有類似的問題,並解決它通過添加以下到Web.config中

<runtime> 
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <dependentAssembly> 
       <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> 
       <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly> 
      <dependentAssembly> 
       <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> 
       <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly> 
     </assemblyBinding> 
</runtime> 

這重定向程序集綁定,使得在使用新版本,因此解決衝突