I am getting a blank page while deploying MVC application on IIS

后端 未结 13 1353
一生所求
一生所求 2020-12-06 00:27

I am currently deploying my application built using RC of MVC ASP.NET on the production server which is showing nothing now. The routes in my global.ascx are typical i.e. <

13条回答
  •  旧时难觅i
    2020-12-06 01:08

    This means you have an Exception thrown in your MVC application but you likely have a class in your MVC that's capturing, filtering, and hiding those exceptions. Those exceptions are still thrown but you cant see whats causing them. MVC still reroutes the page request but returns nothing because of the hidden exceptions. You cant stop the problem until you see the exceptions being thrown. You cant see the exceptions in the web page until you turn off MVC's exception handing filters.

    One thing that might be preventing you from seeing the exceptions is a GlobalFilterCollection called via an MVC filter in the global.asax when the website first loads. You can normally find these calls in the Global.asax file. That file generally calls the HttpApplication object when the website first loads and its events. In its events it then loads in the default MVC routes developers add, but can also load filters that process site-wide exception handling. Developers often stuff Exception handling via filters in the global.asax thinking they are intelligently handling exceptions and issues from the user, but which is a mistake. If you find a filter in there just comment them out. Suddenly all your errors will appear in your HTML page again once you do.

    You can then troubleshoot the problem! Good luck!

提交回复
热议问题