<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx</link><description>I use C# a lot to write small utilities and sometimes find that it is annoying to have to dig into the source code to figure out why .Net framework doesn’t work as I expected. This happens again when I am using LinkedIn API (BTW, this is the first occurence</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10260724</link><pubDate>Thu, 26 Jan 2012 04:20:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10260724</guid><dc:creator>Xiang Fan</dc:creator><description>&lt;p&gt;Charles, &amp;#39;SetValue&amp;#39; needs reflection permission (&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/6z33zd7h.aspx"&gt;msdn.microsoft.com/.../6z33zd7h.aspx&lt;/a&gt;) and you normally don&amp;#39;t have such permission under Silverlight or Windows Phone. So unfortunately this hack doesn&amp;#39;t work for those platforms.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260724" width="1" height="1"&gt;</description></item><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10260562</link><pubDate>Wed, 25 Jan 2012 15:30:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10260562</guid><dc:creator>Charles Dupuis</dc:creator><description>&lt;p&gt;This does not work on Windows Phone -&amp;gt; FieldAccessException&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260562" width="1" height="1"&gt;</description></item><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10257913</link><pubDate>Wed, 18 Jan 2012 05:24:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10257913</guid><dc:creator>Xiang Fan</dc:creator><description>&lt;p&gt;My concerns,&lt;/p&gt;
&lt;p&gt;1. If the code is in a component, it may or may not work depending on whether the executing assembly has the correct config file.&lt;/p&gt;
&lt;p&gt;2. The escaped slash does expose security issue, so I don&amp;#39;t want to enable the parser flag on all Uri objects with the same url scheme (It may be better to throw exception instead of silently alter the url).&lt;/p&gt;
&lt;p&gt;In my opinion, config file is more suitable for settings like assembly binding, etc.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257913" width="1" height="1"&gt;</description></item><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10257641</link><pubDate>Tue, 17 Jan 2012 16:16:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10257641</guid><dc:creator>Richard Deeming</dc:creator><description>&lt;p&gt;You&amp;#39;ll need to add the settings to the configuration file for your application - either YourAppName.exe.config or web.config - and it will affect all Uri parsing in the application.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257641" width="1" height="1"&gt;</description></item><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10257268</link><pubDate>Mon, 16 Jan 2012 20:46:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10257268</guid><dc:creator>Xiang Fan</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Does it work for component? My understanding is that the config file works for exe files.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257268" width="1" height="1"&gt;</description></item><item><title>re: System.Uri doesn’t allow embedded escaped slashes</title><link>http://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx#10257239</link><pubDate>Mon, 16 Jan 2012 19:30:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10257239</guid><dc:creator>Richard Deeming</dc:creator><description>&lt;p&gt;With .NET 4.0, you can change this setting in the config file:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/bb882619.aspx"&gt;msdn.microsoft.com/.../bb882619.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/ee656539.aspx"&gt;msdn.microsoft.com/.../ee656539.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;configuration&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;uri&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;schemeSettings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;clear/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;add name=&amp;quot;http&amp;quot; genericUriParserOptions=&amp;quot;DontUnescapePathDotsAndSlashes&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/schemeSettings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/uri&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257239" width="1" height="1"&gt;</description></item></channel></rss>