I am using iFrame as the field type in one of my Sitecore Template. In the source field of the iFrame field, I mentioned the route to my Controller action.
FieldType: IFrame
Source: /mvc/modules/products/getList
And in the routeconfig.cs file I configured the route as
routes.MapRoute(
"SitecoreModulesDefault",
"/mvc/modules/{controller}/{action}",
new { controller = "products", action = "getList" }
);
Then i create a content item of the above template type. When I check the the iFrame field, I see that the controller is not being called and I am seeing the error as "The requested document was not found" with the below Additional Information:
Requested URL: /mvc/modules/products/getList
User Name: sitecore\admin
Site Name: website
Some how the route is not redirecting to the controller action. Is there anything else to configure or Am I doing something wrong somewhere? Thanks in advance!
Note: I am using Sitecore 8.1 with MVC. Also, I cannot use a .aspx file here instead of a controller.