2017-11-17 9 views
0

Visual Studio 2017コミュニティで開発されたプロジェクトをVisual Studio for Macにインポートしようとしています。私はそれがが原因だと読んだVisual Studio for Macで.NET MVCプロジェクトを実行するとSystem.InvalidOperationExceptionが発生する

System.InvalidOperationException 
    The view found at '~/Views/Account/login.cshtml' was not created. 

Description: HTTP 500.Error processing request. 
Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc. 
Exception stack trace: 
    at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00061] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00080] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Collections.Generic.IList`1[T] filters, System.Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x0000b] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Collections.Generic.IList`1[T] filters, System.Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x0009b] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters (System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IList`1[T] filters, System.Web.Mvc.ActionResult actionResult) [0x0000a] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b.<BeginInvokeAction>b__1c() [0x0008a] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21.<BeginInvokeAction>b__1e (System.IAsyncResult asyncResult) [0x00041] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[TResult].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End() [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d (System.IAsyncResult asyncResult, System.Web.Mvc.Controller+ExecuteCoreState innerState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate`1[System.Web.Mvc.Controller+ExecuteCoreState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.Controller/ExecuteCoreState) 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End() [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Controller.EndExecuteCore (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Controller.<BeginExecute>b__15 (System.IAsyncResult asyncResult, System.Web.Mvc.Controller controller) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End() [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Controller.EndExecute (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5 (System.IAsyncResult asyncResult, System.Web.Mvc.MvcHandler+ProcessRequestState innerState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate`1[System.Web.Mvc.MvcHandler+ProcessRequestState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.MvcHandler/ProcessRequestState) 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End() [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.MvcHandler.EndProcessRequest (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (System.IAsyncResult result) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
    at System.Web.HttpApplication.async_handler_complete_cb (System.IAsyncResult ar) [0x00015] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web/HttpApplication.cs:988 

:すべてのプロジェクトを構築し、データベース内のデータを伝播するという点で動作しているように見える、しかし、それはCSHTMLページを表示することになると、それは次の例外がスローされますViews/Web.configファイルはMVCのバージョンを間違って参照していますが、バージョン5.2.3.0を正しく指しています。誰もがこの問題にぶつかる?

答えて

0

私は問題の答えを見つけました。それは単にURLの大文字小文字の問題によるもので、URLはhttp://localhost:8080/Account/Loginではなくhttp://localhost:8080/Account/loginを指していました。明らかにこれは問題ではありませんが、Linuxベースのシステムでは大文字の問題です。私の場合、変更はWeb.configの次の場所で行われました:

<system.web> 
    <authentication mode="Forms"> 
    <forms loginUrl="~/Account/Login"> 
関連する問題