I am sure this is quite straightforward but I am a bit stuck here. The routing defined for my app is just the default. I have the following controller defined.
If DocumentEditViewModel constructor's accessibility level is protected you will get also the same error.
Most likely you have dependency injections mechanism. But MVC requires "special" way to register container. Look at this link Adding Unity to Your Web Applications, patterns and practices
I had a slightly different problem. One of my Model classes was abstract
.
add to class DocumentEditViewModel default constructor
public DocumentEditViewModel (){}
The MVC framework is trying to create an instance of the DocumentViewModel class but it can't find a publicly accessible default constructor (that does not take any arguments). You can either define such a default constructor like @simplyDenis suggested or define a cusotm ModelBinder that can create the instance using your custom constructor.
Does DocumentEditViewModel have a parameterless constructor? I believe this is needed for modelbinding on your post view.