22 July, 2012

Problem with downloading Media files from Sitecore if Windows Authentication enabled

UAT environment used to be locked with Windows/Basic Authentication. There is an issue with Sitecore media items (mainly XSLT) when site is locked with Windows Authentication. 401 unauthorized issue. We need to give anonymous access only to media items like XSLT. Thanks to Ankit Agarwal who gave the solution.

In applicationHost.config, add these lines,
<location path="<Sitecore>/~/media">
                    <anonymousAuthentication enabled="true" />
                    <basicAuthentication enabled="false" />

This solved the issue with Media items. 


  1. could you give a little more detail? where exactly is this file, how do you change it?

  2. Ooops. I missed this comment for a long time...

    applicationHost.config is the configuration file of IIS. It will be located in %WINDIR%\System32\inetsrv\config. You can change it using any text editor. Let me know if you need more information.


blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }