admin管理员组

文章数量:1644015

在 mvc网站开发中,引入一些dll会出现改错误,目前不知道什么原因引起;但是通过如下方式解决即可;(我是在mvc 中使用redis相关dll出现该错误)

在web.config <system.web>中加入

<compilation targetFramework="4.5.2" debug="true" >

      <assemblies>

        <add assembly="System.Runtime, Version=4.0.0.0 , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

      </assemblies>

    </compilation>

 

注意 在 mvc中如果出现找不到页面 404问题;如果设置了默认错误页面,如下:

<customErrors defaultRedirect="/404.html" mode="On" redirectMode="ResponseRedirect">
      <error redirect="/404.html" statusCode="404" />
      <error redirect="/403.html" statusCode="403" />
    </customErrors>

 

为了更利于查找错误,先将错误页面注释;否则无法定位问题,全部跳转404页面

本文标签: 程序未被定义类型object