Spark と MVC を使用してプレーンな html ビューをレンダリングしようとしていますが、次のエラーが発生します。
The view 'Principal.html' or its master could not be found. The following locations were searched:
~/Views/Site/Principal.html.aspx
~/Views/Site/Principal.html.ascx
~/Views/Shared/Principal.html.aspx
~/Views/Shared/Principal.html.ascx
Site\Principal.html.spark
Shared\Principal.html.spark
私のコントローラーには次のものがあります:
public ViewResult Principal()
{
return View("Principal.html");
}
Global.asax の Start メソッドに spark engina を登録します。
protected override void Start()
{
...
RegisterViewEngine(ViewEngines.Engines, RouteTable.Routes);
RegisterRoutes(RouteTable.Routes);
}
private void RegisterViewEngine(ViewEngineCollection engines, RouteCollection routes)
{
SparkViewFactory engine = new SparkViewFactory();
RegisterFactory.DefaultRegister(IoCService.MyContainer, engine, routes);
engines.Add(engine);
}
レンダリングするページが html (Principal.html) であり、spark 拡張ではないことをどのように示すことができますか?
前もって感謝します!