Monday, December 13, 2010

MVC View Not Found Misdirection

I recently came across the following error:

image

I was deploying to a discountasp.net and could think of an infinite causes of the problem. I decided to write a simple little code block to verify the view was there and accessible:

image

This confirmed that the file was in fact there. Sure that the problem had to be with discountasp.net, I sent them an email and slept on it. Their response was that it was my fault:

image

I tried searching their forum and found it lacking so did some google searching when I found this:

http://forums.asp.net/p/1592374/4038196.aspx

Which basically states the obvious – what about your master page? Yeah – what about my master page? Wait – why didn’t my master page publish…?

image

Well that would do it… no idea how that happened – I wouldn’t have changed it on purpose.

image

Problem resolved – hopefully this saves someone else some time.