Method 'get_EnableCdn' in type 'System.Web.UI.ScriptManager' from assembly 'System.Web.Extensions' does not have an implementation

*爱你&永不变心* 提交于 2019-12-20 15:47:52

问题


Can anyone explain a perse error like this one: "Method 'get_EnableCdn' in type 'System.Web.UI.ScriptManager' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation."

My dev box runs Windows 7, framework 4.0 and latest Ajax tool kit. Site works locally as well as on test server (win 2003, framework 4.0 and latest Ajax tool kit), but on the production server (again Win 2003) the story is different.

Ironically, the site on production server has been upgraded to framework 4.0 several months ago and works fine until I try to push updates by copying a published site. That's when I get this error.

I also get this error if a just copy the working copy of the site into a new directory a create a new virtual directory.

Reinstalled VS2010 but that didn't help.

Anyway, a lot of the post with this error message are about users upgrading to 4.0 and receiving this error, which is not my case, so I'm at loss with this and would appreciate your input.

Thanks,


回答1:


I have seen this error in a web application that was upgraded from a Visual Studio 2005 project to a Visual Studio 2010 project.

The solution was to remove the following section from the web.config file:

<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>



回答2:


If you are actually using .NET framework 4.0 + then then fair enough, however if you are simply moving an existing application from say a Windows Server 2003 box to Windows Server 2012 then you can change the application pool that new site site is running under from .NET Frawework 4.0 to 2.0 and the pipeline mode from Integrated to Classic. New sites on Windows Server 2012 default to .NET 4.0 & Integrated



来源:https://stackoverflow.com/questions/5341324/method-get-enablecdn-in-type-system-web-ui-scriptmanager-from-assembly-syst

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!