Try our conversational search powered by Generative AI!

Content Delivery API - Friendly URL returns Resource not found



I currently have an issue whereby when trying to call CD-Api with a friendly URL as shows below i get the error resource not found.

I have installed the core modules for CD-API, the client does not use find and no authentication required.

I have followed the blog posts several times to see if they work, but no luck

protected void Application_Start()
MvcHandler.DisableMvcResponseHeader = true;
ServiceLocator.Current.GetInstance<RoutingOptions>().UseTrailingSlash = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;

The strange thing is this worked perfectly in Alloy Site

Any help would be much appreciated.

Edited, Mar 26, 2020 22:44

Hi Mounir

If you miss the "Accept-Language" header from your request, it would cause 404 error.

Check my blog post to see if anything can help

Edited, Mar 27, 2020 0:59

Hi Vincent

Thanks, yea I also tried with language, same issue.

Mar 27, 2020 10:46

Hi Mounir

Are you able to get resonpose from /api/episerver/v2.0/site API? 

Mar 29, 2020 23:57

Yes, both local and server return that data.

On local, I can get content via 


But not via friendly url.

Another issue started occuring on the server when code is deployed, none of the cd API functionality works and I get access denied. But sites works.

Mar 30, 2020 10:09

Hi Mounir

I just had a very similar problem, after upgrading our episerver + addons to the newest version the Content delivery api returned 404 for friendly URLs but in our case only when hosted on IIS, when using IIS express it worked just fine.

after a long debug session i solved it by adding the ExtensionlessUrlHandler-Integrated-4.0 to our web.config and it started working on IIS again:


<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<!-- this is a workaround for an bug with episerver Content Api returning 404 after epi release 310 -->
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

I have no idea why this is needed now but perhaps someone from episerver can shred some light on this?

anyways I hope this can help with your problem :)


Apr 22, 2020 13:27

Hi Mounir,

I was having the same issue with the Quicksilver sample Commerce site. What worked for me was originally posted by Quan Tran in one of the threads you linked;

 "If you have configuration handlers in web.config like below, ContentApi friendly url will throw 404. The order of handlers should be reversed (or you can try removing StaticFileHandler)"

Just in case you missed that possible fix, I figured I'd post it since it worked for me. Plus, if anyone knows why that works I'd love to know as well.


May 21, 2020 12:46
* 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.