Try our conversational search powered by Generative AI!

Santosh Achanta
Nov 22, 2012
  6445
(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
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

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog