gpt4 book ai didi

asp.net-mvc-4 - 找不到入口点异常

转载 作者:行者123 更新时间:2023-12-03 09:15:49 25 4
gpt4 key购买 nike

我已经安装了vs2012 (11.0.50727.1)
我打开了一个新的 MVC4 with .NET 4.5 解决方案,
我创建了一个简单的HomeController,并且因为我想在本地启动它,所以我收到了一个非常奇怪的错误:
怎么解决呢?这是什么错误,为什么会发生???

预先感谢您的帮助。

    Server Error in '/' Application.
Entry point was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.EntryPointNotFoundException: Entry point was not found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[EntryPointNotFoundException: Entry point was not found.]
System.Web.Mvc.IDependencyResolver.GetService(Type serviceType) +0
System.Web.Mvc.DependencyResolverExtensions.GetService(IDependencyResolver resolver) +56
System.Web.Mvc.SingleServiceResolver`1.GetValueFromResolver() +44
System.Lazy`1.CreateValue() +180
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +22
System.Lazy`1.get_Value() +10749357
System.Web.Mvc.SingleServiceResolver`1.get_Current() +15
System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext requestContext) +121
System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext requestContext) +33
System.Web.Mvc.MvcRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler(RequestContext requestContext) +10
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +9709656
System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +82
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

最佳答案

当您将项目从MVC3切换到MVC4时,如果忘记将web.config中的System.Web.WebPages.Razor, Version=1.0.0.0更改为System.Web.WebPages.Razor, Version=2.0.0.0,也会出现相同的错误。

关于asp.net-mvc-4 - 找不到入口点异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13154241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com