Try our conversational search powered by Generative AI!

Routing error

Vote:
 

Hi,

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'.

Regards

#209563
Nov 18, 2019 15:49
Vote:
 

Whats the Model set in the PageView ?

#209570
Nov 18, 2019 17:49
Vote:
 

Hi Dinesh,

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

#209583
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.

Regards
Dinesh
Vote:
 

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 https://world.episerver.com/documentation/developer-guides/CMS/rendering/

#209883
Edited, Nov 20, 2019 10:54
Vote:
 

Hi,

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.

regards

Dinesh

#210354
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.