ana boies
ana boies

Reputation: 155

Site returning blank page after deployment

I'm working on a mvc site which is working fine at local, but when I deploy it on the server, a specific page doesn't work (all the other pages are working perfectly)..it's returning a blank page, with Status Code 200 ok. I'm deploying the site using a publish profile from Visual studio and web deploy. Any ideas what could be causing this?

Upvotes: 1

Views: 1880

Answers (1)

ana boies
ana boies

Reputation: 155

Managed to solve it myself, posting the answer in case someone else has the same problem. I just put a try catch in my controller (in the action method that should redirect to my view) and in the catch block I wrote this:

catch (Exception ex)
        {
            Response.StatusDescription = ex.Message;
        }

to be able to see the exception message in the browser.

Upvotes: 2

Related Questions