简体   繁体   English

在ASP.NET应用程序上启用AJAX时遇到问题

[英]Having issues enabling AJAX on ASP.NET application

I have been fumbling with deploying my code to a SharePoint 2007 site for hours. 数小时以来,我一直在将代码部署到SharePoint 2007网站上感到困惑。 I have ajax in my project and ajax is enabled on the sharepoint server. 我的项目中有ajax,并且在共享点服务器上启用了ajax。 I am now getting this error: 我现在收到此错误:

but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager). 但是其类型(System.Web.UI.ScriptManager)与控件的类型(System.Web.UI.ScriptManager)不兼容。

Can someone please help point me in the right direction? 有人可以帮我指出正确的方向吗? I understand that I have some versioning issues... My project was developed in VS 2008 on .NET 3.5, and the SharePoint application is .NET 2.0 with ajax enabled. 我知道我有一些版本控制问题...我的项目是在.NET 3.5的VS 2008中开发的,而SharePoint应用程序是启用了Ajax的.NET 2.0。

Thanks. 谢谢。

try adding this to the "runtime" section web.config of the web application you working on: 尝试将其添加到您正在处理的Web应用程序的“运行时”部分web.config中:

under the "assemblyBinding"" section in the runtime section: 在运行时部分的“ assemblyBinding”部分下:

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

The only way I know to resolve that is make them the same version... use the .NET 2.0 version; 我知道解决的唯一方法就是使它们具有相同的版本...使用.NET 2.0版本; I don't know if you can any other way... the difference between System.Web.UI.ScriptManager is the version. 我不知道是否可以通过其他方式... System.Web.UI.ScriptManager之间的区别是版本。 To test, deploy a sample app using .NET 2.0 with the script manager, and try it out. 要进行测试,请使用带有脚本管理器的.NET 2.0部署示例应用程序,然后进行尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM