【问题标题】:Deployment Telerik.Web on IIS 6.0在 IIS 6.0 上部署 Telerik.Web
【发布时间】:2014-09-01 10:19:28
【问题描述】:

当我在 IIS 6.0 服务器上部署 asp.net 4.0 网站时出现错误:

[TypeInitializationException: The type initializer for 'Telerik.Web.RenderModesCache' threw an exception.]
Telerik.Web.RenderModesCache.GetViewDescriptors() +0
Telerik.Web.UI.RadDataBoundControl.GetViewScriptReference() +81
Telerik.Web.UI.RadDataBoundControl.GetScriptReferences() +80
Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IScriptControl.GetScriptReferences() +13
System.Web.UI.ScriptControlManager.AddScriptReferenceForScriptControl(List`1 scriptReferences, IScriptControl scriptControl) +41
System.Web.UI.ScriptControlManager.AddScriptReferencesForScriptControls(List`1 scriptReferences) +92
System.Web.UI.ScriptManager.RegisterScripts() +129
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +122
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8897866
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2716

web.config 有下一个配置:

<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="Telerik.Web.UI"/>
  </assemblies>
</compilation>

 <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
  <controls>
    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
  </controls>
</pages>

使用 IIS Express 7.0,网站可以正常工作。

问题的原因可能是什么?

【问题讨论】:

  • 部署时应用程序池是否针对.NET4?
  • .NET 4.0 甚至安装在运行 IIS 6.0 的服务器上吗?这两个单独的服务器是运行 6.0 和 7.0,还是在同一台服务器上运行它们?
  • rdmptn,是的,目标是 .net4
  • DanM, IIS 7 - 它是开发主机,代码在他的服务器上运行正常,但是.. 当网站移动到生产服务器(Win 2003,IIS 6)时出现错误。跨度>

标签: asp.net telerik


【解决方案1】:

确保您没有尝试使用针对 .NET 4.5 构建的程序集(Telerik 提供这些程序集)。如果 IIS6 是您的服务器所拥有的,那么它可能是没有 .NET 4.5 的 Windows Server 2003。您应该让您的应用程序引用 Telerik 程序集的 .NET 4.0 版本(您可以从安装的 Bin40 文件夹中获取它们)。

正如 DanM 在 cmets 中所说 - 如果您引用 .NET 4 版本,请确保已安装 .NET 4.0。

【讨论】:

  • rdmptn,这是真的。从 Telerik(在 .net 4.0 上)替换 dll 后,该站点已获得。谢谢。
猜你喜欢
  • 2011-01-12
  • 2011-08-06
  • 2011-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-19
  • 2011-09-15
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多