Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc Umbraco子MVC应用程序(虚拟目录)-无法加载文件或程序集Umbraco.ModelsBuilder_Asp.net Mvc_Umbraco - Fatal编程技术网

Asp.net mvc Umbraco子MVC应用程序(虚拟目录)-无法加载文件或程序集Umbraco.ModelsBuilder

Asp.net mvc Umbraco子MVC应用程序(虚拟目录)-无法加载文件或程序集Umbraco.ModelsBuilder,asp.net-mvc,umbraco,Asp.net Mvc,Umbraco,我正在尝试在我的Umbraco 7站点根目录下部署一个自定义的纯ASP.NET MVC应用程序作为虚拟目录“应用程序”。但是,我总是得到以下YSOD错误: Server Error in '/DemoApp' Application. Could not load file or assembly 'Umbraco.ModelsBuilder' or one of its dependencies. The system cannot find the file specified. 我还尝

我正在尝试在我的Umbraco 7站点根目录下部署一个自定义的纯ASP.NET MVC应用程序作为虚拟目录“应用程序”。但是,我总是得到以下YSOD错误:

Server Error in '/DemoApp' Application.

Could not load file or assembly 'Umbraco.ModelsBuilder' or one of its dependencies. The system cannot find the file specified.
我还尝试从头开始消除尽可能多的变量。以下是复制步骤:

  • 创建了全新的空ASP.NET解决方案/项目
  • 添加了UmbracoCms nuget包(7.4.3)
  • 构建解决方案
  • 使用主机名设置我的IIS站点-“umbraco demo”
    umbraco demo.local
  • 浏览至
    http://umbraco-demo.local
    并运行了Umbraco安装程序
  • 注意:到目前为止,一切正常。我可以登录到后台或浏览新的Umbraco网站。

  • 在名为“DemoApp”的新VS解决方案中创建了一个新的ASP.NET MVC应用程序
  • 构建了新的解决方案并立即使用IIS Express运行——MVC应用程序工作正常
  • 在IIS管理器中,我右键单击了我的UmbracoDemo站点,并添加了一个名为“DemoApp”的“应用程序”,将其指向DemoApp MVC项目目录
  • 在Umbraco的web.config中的
    Umbraco保留路径
    设置中添加了“~/DemoApp”
  • 浏览至
    http://umbraco-demo.local/DemoApp
  • 我再次得到错误:

    Could not load file or assembly 'Umbraco.ModelsBuilder' or one of its dependencies. The system cannot find the file specified.
    

    其他信息:

    我不认为这与ModelsBuilder有特别的关系。为了看看会发生什么,我在我的“DemoApp”web.config中添加了以下内容:

    <assemblies>
      <remove assembly="Umbraco.ModelsBuilder" />
    </assemblies>
    
    因此,我自然而然地尝试添加:

    <remove assembly="UrlRewritingNet.UrlRewriter" />
    
    
    

    但这没有影响,错误依然存在。在另一个例子中,错误提到了一个不同的程序集,而不是
    UrlRewritingNet.UrlRewriter

    我通过将~/api/添加到:-

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles, ~/api/" />
    
    
    
    然后用位置标记包装我的父应用程序umbraco的以下web.config部分:-

      <location path="." inheritInChildApplications="false">
        <system.web>
    
    
    


    我通过将~/api/添加到:-

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles, ~/api/" />
    
    
    
    然后用位置标记包装我的父应用程序umbraco的以下web.config部分:-

      <location path="." inheritInChildApplications="false">
        <system.web>