Sunday, 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">
        <system.webServer>
            <security>
                <authentication>
                    <anonymousAuthentication enabled="true" />
                    <basicAuthentication enabled="false" />
                </authentication>
            </security>
        </system.webServer>
    </location>

This solved the issue with Media items. 

2 comments:

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

    ReplyDelete
  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.

    ReplyDelete

Articles

Automatically create new version for Lock & Edit without workflow

Sitecore will create a new version on Lock and Edit if the item is tied to a workflow. For our case, version has to be created even withou...