2016-05-12 12 views
4

Meine Website läuft gut aus Visual Studio, aber sobald ich es auf IIS bereitstellen, erhalte ich den folgenden Fehler.System.EntryPointNotFoundException MVC5

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.DependencyResolver.InnerSetResolver(IDependencyResolver resolver) +289 
    Rabobank.Risk.LicwidWorkflow.UI.UnityConfig.RegisterComponents() +125 
    Rabobank.Risk.LicwidWorkflow.UI.MvcApplication.Application_Start() +30 

[HttpException (0x80004005): Entry point was not found.] 
    System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12602733 
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175 
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304 
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404 
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475 

[HttpException (0x80004005): Entry point was not found.] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12619780 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12459397 

Ich habe keine Ahnung, warum das passiert. Alle Zeiger würden geschätzt werden

+0

Überprüfen Sie Ihre Datei web.config und überprüfen Sie die Assemblyverweise und ihre Version mit der referenzierten Version. – dcreight

+0

Stellen Sie sicher, dass Sie über die korrekte Version der Einheit verfügen, die die von Ihnen verwendete MVC-Version unterstützt. Stellen Sie beispielsweise sicher, dass Sie das Paket "Unity.MVC5" von Nuget verwenden, wenn Sie MVC5 verwenden. –

Antwort

1

Dies geschieht normalerweise bei Verwendung der Abhängigkeitsinjektion. Wenn mehrere Projekte sich gegenseitig referenzieren, stellen Sie sicher, dass sie auf dasselbe Framework oder kompatible Frameworks ausgerichtet sind. Überprüfen Sie außerdem alle package.config-Dateien, und stellen Sie sicher, dass das targetFramework für jede xml-Zeile mit dem Zielframework Ihres Projekts übereinstimmt.