Try our conversational search powered by Generative AI!

Routing error



I am getting below error .. please guide 

The routed data is of type 'EPiServer.Core.PageData' and the binding context data 'currentContent' is of type 'EPiServer.Core.PageData', neither of which matches the requested type 'Models.Media.ImageFile'.


Nov 18, 2019 15:49

Whats the Model set in the PageView ?

Nov 18, 2019 17:49

Hi Dinesh,

It should be a code issue so can you supply the code snippet here so that someone can help?

Nov 19, 2019 7:59
Dinesh Yadav - Nov 19, 2019 11:17
Thanks for the reply Ravindra .. this issue come on specific database , if i change the database , its not coming.

Any specific table i need to target to see the issue.


Hi Dinesh,

Please check the following;

  1. Does your class Models.Media.ImageFile inherit from ImageData 
  2. Do you have a Partial View called ImageFile.cshtml in your ~/Views/Shared folder. This Partial View should have a Model like @model ImageFile.

It would help us if you could provide;

  • The code for your Models.Media.ImageFile class 
  • A snippet of code from the Page Property where the ImageData is being used. So that we see the Property Attributes and Type, eg is it ImageData, ContentArea, ContentReference?

I also encourage you to spend time reading in the Rendering section of the Episerver Developer Documentation

Edited, Nov 20, 2019 10:54


Thanks very much for the reply .. This issue is resolved now.

Under Admin -> Manage Websites -> Modify the website name to be pointing to correct link.



Nov 21, 2019 11:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.