zoukankan      html  css  js  c++  java
  • probing privatePath如何作用于ASP.NET MVC View

    当View上using一些从probing privatePath加载的程序集,运行时会提示无法找到对应程序集。

    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="bin;_core_bin;_app_bin"/>
      </assemblyBinding>
    </runtime>

    原因是由于DefaultControllerFactory内部使用BuildManager关系,除了以代码方式将probing privatePath下指定的程序集手动加载进来,如果using的程序集可控直接添加到Web.config的assemblies节点:

    <system.web>
          <compilation targetFramework="4.0">
            <assemblies>
              <add assembly="[AssemblyName], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" />
            </assemblies>
          </compilation>
    </system.web>
  • 相关阅读:
    Nginx安装详细指南
    git 常用命令
    oracle server config
    CentOS6.5下安装oracle11gR2
    oracle query
    oracle function
    oracle note
    正则表达
    DOM&BOM的起源、方法、内容、应用
    sticky
  • 原文地址:https://www.cnblogs.com/junchu25/p/4081069.html
Copyright © 2011-2022 走看看