在 IIS 中使用 MVC 站点托管 Umbraco 站点
Hosting Umbraco site with MVC site in IIS
我已经创建了 Umbraco 7 MVC 站点并将其部署到 IIS。所以 URL 就像:www.mydomain.com。
在一个子目录中,我托管了一个单独的 MVC 网站。所以 URL 例如:www.mydomain.com/MVCApplication.
当我尝试访问子应用程序时URL;它给出
Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
所以我将这个 dll 添加到子目录中的 bin 文件夹中。然后提示另一个错误
Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
似乎子应用程序试图读取根文件夹 dll 或根 web.config。 Umbraco 网站运行良好。当我删除 umbraco 网站时,子应用程序工作。有什么想法吗?
为了禁用 umbraco 继承,尝试在 webconfig
中用 <location path="." inheritInChildApplications="false">
包装 <system.webserver>
和 <system.web>
http://www.experts-exchange.com/Networking/Misc/Q_26535962.html
您可以将以下行添加到您的 web.config
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
这应该进入编译 > 程序集部分。
<compilation>
<assemblies>
</assemblies>
</compilation>
你也能确保"UrlRewritingNet.UrlRewriter" dll在子应用中被正确引用了吗?您也可以尝试将引用 'Copy Local' 属性 设置为 TRUE。您可以通过选择特定参考并按 F4 调出“属性”窗格来查看这些属性。
此致
终于找到解决办法了。必须在父网站 web.config
文件中用以下代码片段包装 <System.web>
和 <system.webServer>
。这不是参考文献的问题。它继承了子 Web 应用程序中的父 web.config 文件:
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
希望这对其他人也有帮助。
我已经创建了 Umbraco 7 MVC 站点并将其部署到 IIS。所以 URL 就像:www.mydomain.com。 在一个子目录中,我托管了一个单独的 MVC 网站。所以 URL 例如:www.mydomain.com/MVCApplication.
当我尝试访问子应用程序时URL;它给出
Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
所以我将这个 dll 添加到子目录中的 bin 文件夹中。然后提示另一个错误
Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
似乎子应用程序试图读取根文件夹 dll 或根 web.config。 Umbraco 网站运行良好。当我删除 umbraco 网站时,子应用程序工作。有什么想法吗?
为了禁用 umbraco 继承,尝试在 webconfig
中用<location path="." inheritInChildApplications="false">
包装 <system.webserver>
和 <system.web>
http://www.experts-exchange.com/Networking/Misc/Q_26535962.html
您可以将以下行添加到您的 web.config
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
这应该进入编译 > 程序集部分。
<compilation>
<assemblies>
</assemblies>
</compilation>
你也能确保"UrlRewritingNet.UrlRewriter" dll在子应用中被正确引用了吗?您也可以尝试将引用 'Copy Local' 属性 设置为 TRUE。您可以通过选择特定参考并按 F4 调出“属性”窗格来查看这些属性。
此致
终于找到解决办法了。必须在父网站 web.config
文件中用以下代码片段包装 <System.web>
和 <system.webServer>
。这不是参考文献的问题。它继承了子 Web 应用程序中的父 web.config 文件:
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
希望这对其他人也有帮助。