In Sitecore MVC, why is Razor actionlink is displaying the url as api/sitecore/Controller/action?

- Pranay on Apr 23 '15 at 13:12
- viewed 2142 times

I am using sitecore 7.2 and integrated visual studio solution into it. The solution is working fine, I am able to create layouts, items, rendering etc. In my layout file(.cshtml) I have mentioned the URL to the home page using the razor action link as

@Html.ActionLink("Home", "Index", "Home")

But when it renders in the browser, the actual link is “/api/sitecore/Home/Index” as hown below. So when I click on the link it is redirecting to this path, instead of /home/index. This issue is not specific to the layout file. Any where in the solution if I use Html.ActionLink to create a hyperlink, it is rendering to api/sitecore/controller/action.

<a href="/api/sitecore/Home/Index">Home</a>

Any idea on why this is happening or is there a way to correct this?

Your Comments

You might also like

1. What is keystone and how it is used with sitecore?

2. Automation tools for Windows Mobile App

3. Responsive design in sitecore mvc using bootstrap

4. Html5 picture tag example and browser support

5. When and how to use Script Task in SSIS