ASP.NET MVC 2 application works in VS, but errors in IIS

We inherited an MVC 2 application that runs in Visual Studio, but when we try to deploy it to a production server (Win 2008 x86) or even on the same local Win7 x64 machine, but using IIS, AppPool on both is ASP.NET 4.0 w / Integrated mode, we get the same NullReferenceException error:

    Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object. 
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.NullReferenceException: Object reference not set to an instance of an object.

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: 

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +30
   System.Web.PipelineStepManager.ResumeSteps(Exception error) +266
   System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +132
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +709

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 

Has anyone else experienced this? Any recommendations are appreciated.

Thank!

+3
source share
2 answers

, , , , HttpContext Application_Start. , HttpContext, Request, Response,... .

+7

codedom tbe web.config, issse. ( VS 2017

<system.codedom>    </system.codedom>
-2

All Articles