新しい MVC3 プロジェクトを作成し、nuget を介して servicestack mvc をインストールしました。次に、README.txt に従って、これを Global.asax.cs の RegisterRoutes に追加しました。
routes.IgnoreRoute("api/{*pathInfo}");
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); //Prevent exceptions for favicon
Servicestack で次のエラーが発生します。
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Global.asax.cs でこれをコメントアウトしない限り:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
MVC3 と Servicestack を機能させるにはどうすればよいですか。私はVS2010、IIS7を使用しています。