在 XSP 中预览 ASP.NET .CSHTML 文件
Preview an ASP.NET .CSHTML file in XSP
有没有办法强制 Mono 上的 XSP 解析 .cshtml
文件,以便在进行路由之前只能预览它们?可以强制设置吗?
目前服务器只转发下载文件,不做任何处理。
运行 CentOS 7 上 Mono (3.12.1) 的最新稳定版本。
嗯,事实证明我不需要制作 Microsoft.Web.Infrastructure
程序集的本地副本。通过这样做,我终于能够 运行 .CSHMTL
来自 XSP 的文件。
编辑:要设置默认 .cshtml
页面,请将以下 XML 节点添加到 Web.config
的 appSettings
部分,以提示 [=16] =] 服务器:
<add key="MonoServerDefaultIndexFiles" value="HelloWorld.cshtml, helloworld.cshtml" />
有没有办法强制 Mono 上的 XSP 解析 .cshtml
文件,以便在进行路由之前只能预览它们?可以强制设置吗?
目前服务器只转发下载文件,不做任何处理。
运行 CentOS 7 上 Mono (3.12.1) 的最新稳定版本。
嗯,事实证明我不需要制作 Microsoft.Web.Infrastructure
程序集的本地副本。通过这样做,我终于能够 运行 .CSHMTL
来自 XSP 的文件。
编辑:要设置默认 .cshtml
页面,请将以下 XML 节点添加到 Web.config
的 appSettings
部分,以提示 [=16] =] 服务器:
<add key="MonoServerDefaultIndexFiles" value="HelloWorld.cshtml, helloworld.cshtml" />