I'm developing an ASP.NET MVC app and today, after one month, I uploaded a new version to my server (Discount Asp.NET). Since that, I'm having some problems to display one of the pages: http://www.jobbox.com.br/cocoonhealth/profile/gguerini Invalid characters are shown instead of the page.
All the other pages are ok. I tried to change the encoding, line breaks and etc. Nothing! I tested on my computer and another server: both places the page works great, but on the Discount.asp server, doesn't. I don't know what to do. I spent the entire day trying to figure out what happened.
http://www.jobbox.com.br/cocoonhealth/ - HOME PAGE http://www.jobbox.com.br/cocoonhealth/profile/gguerini - PROBLEM
I double check everything and there is nothing apparently wrong. I don't know what to so.
Have you seen anything similar before?
I appreciate your help. G
Go to your Global.asax.cs file and add this code in the Application_Error
event:
HttpApplication app = sender as HttpApplication;
app.Response.Filter = null;
Is this the only page where this is a problem? I saw something similar about a year ago with an old beta of MVC 1 ... I think it had something to do with returning the wrong type from the controller (i.e. returning a JSON result instead of a View result or something like that).
I'd suggest cutting your view down to its bare essentials ... i.e. the first line then a Hello World. If it still happens, check out the action that creates the view ... I'd bet it's not returning a view but something else.
If you still can't find it, post your bare essentials version of the view and relevant action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With