<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vb. &#8211; Tjitjing Blog</title>
	<atom:link href="http://localhost/index.php/tag/vb/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.tjitjing.com/</link>
	<description>This is my blog on technology related stuff and on occation other things too...</description>
	<lastBuildDate>Fri, 01 Oct 2010 07:55:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.16</generator>
	<item>
		<title>How to remove characters to avoid .NET Request Validation Error (A potentially dangerous Request.Path value was detected from the client)</title>
		<link>https://blog.tjitjing.com/index.php/2010/10/how-to-remove-characters-to-avoid-net-request-validation-error-a-potentially-dangerous-request-path-value-was-detected-from-the-client.html</link>
					<comments>https://blog.tjitjing.com/index.php/2010/10/how-to-remove-characters-to-avoid-net-request-validation-error-a-potentially-dangerous-request-path-value-was-detected-from-the-client.html#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 07:55:17 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[ASP.NET 4.0]]></category>
		<category><![CDATA[vb.]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=319</guid>

					<description><![CDATA[In .NET Framework 4 url checking &#8211; request validation &#8211; is different from .Net 2.0. This is the error you will see when you hit this: Server Error in &#8216;/&#8217; Application. A potentially dangerous Request.Path value was detected from the client Description: An unhandled exception occurred during the execution of the current web request. Please&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2010/10/how-to-remove-characters-to-avoid-net-request-validation-error-a-potentially-dangerous-request-path-value-was-detected-from-the-client.html">Continue reading <span class="screen-reader-text">How to remove characters to avoid .NET Request Validation Error (A potentially dangerous Request.Path value was detected from the client)</span></a>]]></description>
										<content:encoded><![CDATA[<p>In .NET Framework 4 url checking &#8211; request validation &#8211; is different from .Net 2.0. This is the error you will see when you hit this:</p>
<blockquote><p>Server Error in &#8216;/&#8217; Application.<br />
A potentially dangerous Request.Path value was detected from the client</p>
<p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
<p>Exception Details: System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client
</p></blockquote>
<p><strong>If you have control over the url, you can avoid using disallowed characters. The <a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestpathinvalidcharacters.aspx" rel="noopener noreferrer">default characters that are being checked for</a> are:<br />
<  >  *  %  &#038;  :  \\</strong></p>
<p>If you set your url&#8217;s programtically, e.g. from info in a database, simply do replace on these characters into something allowed.<br />
For example (VB.NET):<br />
[code]<br />
strUrl = strUrl.Replace(&quot;&amp;&quot;, &quot;-&quot;)<br />
[/code]</p>
<p>Another method is to revert back to .NET 2.0 request validation and/or change the characters that are being validated. This can be done by changing the following in the web.config file:<br />
[code]<br />
&lt;httpRuntime requestValidationMode=&quot;2.0&quot; requestPathInvalidCharacters=&quot;*,%,:&quot; /&gt;<br />
[/code]</p>
<p>I however, prefer the first method as request validation is a good thing: the purpose is to secure your site from injection attacks.</p>
<p>More info:<br />
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestvalidationmode.aspx" rel="noopener noreferrer">HttpRuntimeSection.RequestValidationMode Property</a><br />
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestpathinvalidcharacters.aspx" rel="noopener noreferrer">HttpRuntimeSection.RequestPathInvalidCharacters Property</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2010/10/how-to-remove-characters-to-avoid-net-request-validation-error-a-potentially-dangerous-request-path-value-was-detected-from-the-client.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
