We're using DD4T and in a view are rendering component links. The issue is that the link comes out like this: http://localhost:889/http://localhost/.... The relative path is correct, but the front part of the URL is all messed up.

The code that runs is DD4T.Web.Mvc.Html.LinkHelper, GetResolvedUrl() function:

if (string.IsNullOrEmpty(sourcePageUri) 
    && string.IsNullOrEmpty(excludeComponentTemplateUri))
  link = LinkFactory.ResolveLink(component.Id);

The link that is returned is what I've shown above. It seems like this could be related to the Unity configuration, but I just can't quite pinpoint it. Would anyone please shed some light here?


1 Answer 1


This is, of course, not related to DD4T and just the basic configuration in cd_link_conf.xml.

What needs to be specified is the Host element. As per the comments provided in the boilerplate cd_link_conf.xml file, specify the Domain, Port and Path. In my case, the Path was set to "http://localhost" and the domain was set to "http://localhost:889" causing dynamic linking to spit out the weird URL.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.