Click here to Skip to main content
15,918,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting this error: no clue as i am new to MVC and WCF. Fast help would help me thanks!!


The model item passed into the dictionary is of type
'MvcMovie.ServiceReference1.Movie[]', but this dictionary requires a model item
of type 'MvcMovie.Models.Movie[]'
Posted
Comments
Kenneth Haugland 14-Aug-12 0:29am    
I suppose there is something wrong in your definitions made in the WCF. They should return the same code, no?

It means your entity classes are broken. Typically the error means that you map a string in a class to an int in the DB ( for example ). This time, it looks like it's having trouble mapping a related type. Is the class with the error auto generated ? If not, can you change the definition to match ?

It's my recollection that the error reads backwards, so you will find you have the type it requires, but need to change it to the other type, to match the DB
 
Share this answer
 
Changed the model binding and re-configured the wcf service. Its working !!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900