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

3
  • Just a note, all the /profile pages react the same. /profile/ returns the same as /profile/gguerini and the same as /profile/bob. Commented Jan 13, 2010 at 4:44
  • weird one yeah, looks like you're returning a binary file and not some text. Commented Jan 13, 2010 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! ;) Commented Jan 13, 2010 at 17:37

2 Answers 2

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;
Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.