0 out of 1 rated this helpful - Rate this topic

HttpRuntimeSection.RequestPathInvalidCharacters Property

Gets or sets a list of characters that are specified as invalid in a path that is part of an HTTP request.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute("requestPathInvalidCharacters", DefaultValue = "<,>,*,%,&,:,\,?")]
public string RequestPathInvalidCharacters { get; set; }

Property Value

Type: System.String
A comma-separated list of invalid characters. The following list contains the default set of invalid characters:
<,>,*,%,&,:,\\

To set this value in a configuration file, you can assign a comma-separated string of characters to the requestPathInvalidCharacters attribute of the httpRuntime element. For more information, see httpRuntime Element (ASP.NET Settings Schema).

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Default Characters
The correct Default values are "<,>,*,%,&,:,\\,?".  It looks as though the second reference to this (missing the ?) is incorrect.
what's the default?
  the definition says: "<,>,*,%,&,:,\,?"
then a little lower down it has the same thing but WITHOUT the question mark.

which is right?
htmlencode in web.config
When setting this property in web.config, remember to htmlencode, like this for default value:
<httpRuntime requestPathInvalidChars="&lt;,&gt;,*,%,&amp;,:,\,?"  />