Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法强制 Mono 上的 XSP 解析.cshtml文件,以便在进行路由之前只能预览它们?可以强制设置吗?
.cshtml
目前,服务器只转发文件以供下载,不进行处理。
在 CentOS 7 上运行 Mono (3.12.1) 的最新稳定版本。
好吧,事实证明我不需要制作本地的Microsoft.Web.Infrastructure程序集副本。通过这样做,我终于能够.CSHMTL从 XSP 运行文件。
Microsoft.Web.Infrastructure
.CSHMTL
编辑:要设置默认.cshtml页面,请将以下 XML 节点添加到该appSettings部分Web.config以向XSP服务器提供提示:
appSettings
Web.config
XSP
<add key="MonoServerDefaultIndexFiles" value="HelloWorld.cshtml, helloworld.cshtml" />