5

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

Guillermo Guerini
  • 997
  • 2
  • 12
  • 22
  • Just a note, all the /profile pages react the same. /profile/ returns the same as /profile/gguerini and the same as /profile/bob. – Jere.Jones Jan 13 '10 at 04:44
  • weird one yeah, looks like you're returning a binary file and not some text. – Michel Jan 13 '10 at 10:44
  • really weird.. but the funny thing is that it works on my computer! I'll try to clean up the page, put a " Hello World" and see what happen... I'll keep you updates guys. Thanks for now! ;) – Guillermo Guerini Jan 13 '10 at 17:37

2 Answers2

7

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;
Michael
  • 8,362
  • 6
  • 61
  • 88
maxspan
  • 13,326
  • 15
  • 75
  • 104
2

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.

Beep beep
  • 18,873
  • 12
  • 63
  • 78