zoukankan      html  css  js  c++  java
  • Could not load file or assembly 'System.Web.Extensions...

     
    在本地我们调试运行AJAX.NET程序完全没有问题,但是一旦上传到服务器就会出现很多Web.config文件异常。以下是两个最为典型的异常信息:
         Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 系统找不到指定的文件。
    ------------------------------------------------
         Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: Could not load file or assembly 'System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 系统找不到指定的文件。

    A:这个问题产生的原因据说还是出在微软本身,原本我们发布网站的时候都会自动生成dll文件到程序的bin目录。但是AJAX.NET 无法自动添加关键dll文件到bin目录。当服务器上的版本跟你我们开发时使用的ajax版本不一致(比如本地的ajax版本是老版本)的时候尤其容易出现这个问题,因此需要我们手动添加。
    方法很简单,找到你开发环境中安装AJAX.NET 的目录,一般是类似C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025
    把里面的System.Web.Extensions.dll文件和System.Web.Extensions.Design.dll文件复制到bin目录下就可以了。当然复制哪个文件要看你Web.config文件的异常信息而定。
  • 相关阅读:
    Python--json处理
    Python--加密模块
    Python--函数即变量
    bzoj 2276: [Poi2011]Temperature
    1616: [Usaco2008 Mar]Cow Travelling游荡的奶牛
    2017 9 15 noip模拟赛
    bzoj 1612: [Usaco2008 Jan]Cow Contest奶牛的比赛
    2017 9 11 noip模拟赛T2
    URAL 1613. For Fans of Statistics (2017 9 6 noip模拟赛T3)
    codeforces 105 B. Dark Assembly(birbe贿赂 noip模拟赛)
  • 原文地址:https://www.cnblogs.com/zhangsir/p/1096161.html
Copyright © 2011-2022 走看看