***** If there is any type of built in MVC support for helping find these issues please let me know *****
Ok, this may be common sense to everyone else on the net and if so… Oh Well.
Tonight I was working on the MVC3 rewrite of the Dimecasts.net website and after a bit of refactoring my search feature was not working….Well it was hitting the controller action just fine and returning the data out of the controller with NO issues. However my search result div was not being updated dated correctly.
Fortunately for me I just happened to already have Fiddler up and running so I simply popped over to see what it had to say. I immediately noticed that Fiddler was giving me a 500 error on my controller action result:

When I took a look at the response output I noticed the following:

In case you cannot read the above let me summarize for you. Basically I had changed the response object I was returned back out of my controller but I did not change my partial view.
Once I changed my partial view to expect the correct data type as the result model everything was right as rain.
The moral of the story is 2 things
- Fiddler is your friend and WILL help you debug and diagnosis any errors you may have when doing anything http related
- When doing some refactoring remember to make the correct changes to your razor views or you may not get the results you expected.
Till next time,
Posted
10-10-2011 5:38 PM
by
Derik Whittaker