Try our conversational search powered by Generative AI!

Santosh Achanta
Nov 22, 2012
  6453
(1 votes)

Issue with browsing files in browser having special characters in file name and fix

After upgrading one of our very old customer’s website from EPiServer 4.62 to CMS 6 R2, it was reported that documents with special characters in file name (for e.g. ‘S&R12.pdf’) throwing ‘System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (&).’ when they are being opened up in browser.

Fix for this is issue is to just add requestPathInvalidCharacters="" if you want to allow all special characters.

The above attribute must be added to the element <httpRuntime> in your website’s web.config so that it will look as follows:

<configuration>

    .

    .

    <system.web>

        .

        .

        <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" />

        .

        .

    </system.web>

    .

    .

</configuration>

If you want to restrict certain special characters then make sure you specify them as requestPathInvalidCharacters="&lt;,&gt;,*,%,:,&amp;,\"

Nov 22, 2012

Comments

Nov 22, 2012 08:15 AM

See my blogpost for how to activate validation on filenames in the EPiServer filemanager. I think you don't have this setting since you have upgraded from an EPi 4 site.

http://world.episerver.com/Blogs/Per-Nergard/Dates/2011/6/Hot-to-add-validation-of-folder-names-in-CMS5-filemanager/

Santosh Achanta
Santosh Achanta Jan 17, 2013 10:15 PM

Hi Per, the settings illegalCharactersRegex and illegalCharactersDisplayString doesn't help me with this problem unless I have the setting I have specified in this blog. Also in EPiServer 7 the settings you mentioned are no more valid.

Please login to comment.
Latest blogs
Optimizely Forms - How to add extra data automatically into submission

Some words about Optimizely Forms Optimizely Forms is a built-in add-on by Optimizely development team that enables to create forms dynamically via...

Binh Nguyen Thi | Apr 29, 2024

Azure AI Language – Extractive Summarisation in Optimizely CMS

In this article, I demonstrate how extractive summarisation, provided by the Azure AI Language platform, can be leveraged to produce a set of summa...

Anil Patel | Apr 26, 2024 | Syndicated blog

Optimizely Unit Testing Using CmsContentScaffolding Package

Introduction Unit tests shouldn't be created just for business logic, but also for the content and rules defined for content creation (available...

MilosR | Apr 26, 2024

Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog