我试图将自定义的纯ASP.NET MVC应用程序部署为虚拟目录"应用程序"在我的Umbraco 7站点根目录下。但是,我总是收到以下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-demo.local
http://umbraco-demo.local
并运行Umbraco安装程序注意:到目前为止,一切都按预期工作。我可以登录后台或浏览新的Umbraco网站..
umbracoReservedPaths
设置
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>
现在出现错误消息:
Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
很自然地,我尝试添加:
<remove assembly="UrlRewritingNet.UrlRewriter" />
但这没有影响,错误仍然存在。在另一个例子中,错误提到了不同的程序集,而不是UrlRewritingNet.UrlRewriter
。
答案 0 :(得分:1)
我通过添加〜/ api /来实现这一点: -
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles, ~/api/" />
然后使用位置标记包装我的父umbraco应用程序的以下web.config部分: -
<location path="." inheritInChildApplications="false">
<system.web>
和
<location path="." inheritInChildApplications="false">
<system.webServer>