<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>ASP.NET MVC</title><link>http://forums.asp.net/1146.aspx</link><description>Discussions regarding Model-View-Controller (MVC) support in ASP.NET.  &lt;a href="http://forums.asp.net/1215.aspx"&gt;T4MVC subforum&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346976.aspx</link><pubDate>Fri, 09 May 2008 00:18:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346976</guid><dc:creator>shopvisible</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346976.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346976</wfw:commentRss><description>Our CMS generates flat URLs based upon the name.&amp;nbsp; In this example, the customer did enter in Cutlery &amp;amp; Accessories, which we convert to Cutlery-&amp;amp;-Accessories.&amp;nbsp; This has worked from IIS 3 thru 6 and only now is an issue.&amp;nbsp; There must be a setting in IIS 7 to ignore the &amp;amp;?</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346967.aspx</link><pubDate>Fri, 09 May 2008 00:03:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346967</guid><dc:creator>ariyawansa@gmail.com</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346967.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346967</wfw:commentRss><description>&lt;span style="font-size:10pt;font-family:Arial;"&gt;Hi,&lt;/span&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Depending on the
requirement, you may be bale to get a way by a simple find and replace technique I
used in few pages, as long as your not depending on the text that your passing
via Query parameter. I assume that you need this to build the XML sitemap.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Example.&lt;/span&gt;&lt;/p&gt;



&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Public address: (&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Assuming the id for “Cutlery-&amp;amp;-Accessories”
is 14&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;/Cutlery and Accessories/14/Cutlery-and-Accessories.asp&lt;/span&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Real address:&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;/Cutlery/productList.asp?categoryid=$2&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;The Regexp:&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;/&lt;span&gt;(.{1,})/ ([0-9]+)/ (.{1,}) (\.htm|\.html)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Since your passing the ID to the page, there is no reason that you cannot replace “&amp;amp;” with
“And” or a &amp;quot; &amp;quot;, you can still get the description with a DB call by ID.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;however as i said it&amp;#39;s depending on your requirement.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Cheers and Good&amp;nbsp; luck&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Krish&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346792.aspx</link><pubDate>Thu, 08 May 2008 21:01:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346792</guid><dc:creator>shopvisible</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346792.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346792</wfw:commentRss><description>It seems the 1st setting for allowingRestrictedChars would be the right answer, but this article pertains to IIS 6.0, do you think it will have the similar result on IIS 7?</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346761.aspx</link><pubDate>Thu, 08 May 2008 20:41:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346761</guid><dc:creator>ksirg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346761.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346761</wfw:commentRss><description>&lt;p&gt;Oh sorry, when I set all three things :&lt;/p&gt;&lt;ol&gt;&lt;li&gt;AllowRestrictedChars &lt;a href="http://support.microsoft.com/kb/820129"&gt;http://support.microsoft.com/kb/820129&lt;/a&gt;&lt;/li&gt;&lt;li&gt;VerificationCompatibility - &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;826437"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;826437&lt;/a&gt; without instaling service pack 1 to .net 1.1&lt;/li&gt;&lt;li&gt;and set on asp.net page ValidateRequest=false&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;its start working :)&lt;/p&gt;&lt;p&gt;I hope that helps.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346710.aspx</link><pubDate>Thu, 08 May 2008 20:17:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346710</guid><dc:creator>ksirg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346710.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346710</wfw:commentRss><description>&lt;p&gt;I try all methods above, even change some settings in registry and nothing help.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When I enter on my website on localhost I see&lt;/p&gt;&lt;p&gt;Error Summary&lt;br /&gt;HTTP Error 400.0 - Bad Request&lt;br /&gt;ASP.NET detected invalid characters in the URL.&lt;br /&gt;Detailed Error Information&lt;br /&gt;&lt;b&gt;Module&amp;nbsp;&amp;nbsp;&amp;nbsp; WindowsAuthentication&lt;br /&gt;Notification&amp;nbsp;&amp;nbsp;&amp;nbsp; AuthenticateRequest&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Handler&amp;nbsp;&amp;nbsp;&amp;nbsp; StaticFile&lt;/b&gt;&lt;br /&gt;Error Code&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000&lt;br /&gt;Requested URL&amp;nbsp;&amp;nbsp;&amp;nbsp; http://site.com:80/producenci/H&amp;amp;M&lt;br /&gt;Physical Path&amp;nbsp;&amp;nbsp;&amp;nbsp; D:\ftp\LocalUser\szafa\web\producenci\H&amp;amp;M&lt;br /&gt;Logon Method&amp;nbsp;&amp;nbsp;&amp;nbsp; Not yet determined&lt;br /&gt;Logon User&amp;nbsp;&amp;nbsp;&amp;nbsp; Not yet determined &lt;br /&gt;&lt;/p&gt;&lt;p&gt;I wonder why it choose StaticFile handler to serve my request, shouldn&amp;#39;t be some MvcHandler?&lt;br /&gt;And why it use WindowsAuthentication&amp;nbsp; module in that request&lt;/p&gt;&lt;p&gt;&amp;nbsp;When it will be next version of asp.mvc?&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2346576.aspx</link><pubDate>Thu, 08 May 2008 19:11:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346576</guid><dc:creator>shopvisible</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346576.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2346576</wfw:commentRss><description>&lt;p&gt;Hi.&amp;nbsp; I am having a similar issue in a test site in IIS 7.&amp;nbsp; A URL such as: &amp;lt;SITENAME&amp;gt;/Cutlery-&amp;amp;-Accessories/Cutlery-&amp;amp;-Accessories.asp which has always worked in IIS6 and earlier suddenly no longer works in IIS 7, giving an error 400 as below.&amp;nbsp; The confusing thing to me is that it says asp.net detected the invalid characters, but this is a classic asp page, have I set something up improperly?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;HTTP Error 400.0 - Bad Request&lt;/h2&gt;
&lt;h3&gt;ASP.NET detected invalid characters in the URL.&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="content-container"&gt;
Detailed Error Information
&lt;div id="details-left"&gt;
&lt;table class="" cellspacing="0" cellpadding="0"&gt;

&lt;tr class="alt"&gt;
&lt;th class=""&gt;Module&lt;/th&gt;
&lt;td class=""&gt;ScriptModule&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;th class=""&gt;Notification&lt;/th&gt;
&lt;td class=""&gt;AuthenticateRequest&lt;/td&gt;&lt;/tr&gt;
&lt;tr class="alt"&gt;
&lt;th class=""&gt;Handler&lt;/th&gt;
&lt;td class=""&gt;ASPClassic&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;th class=""&gt;Error Code&lt;/th&gt;
&lt;td class=""&gt;0x00000000&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div id="details-right"&gt;
&lt;table class="" cellspacing="0" cellpadding="0"&gt;

&lt;tr class="alt"&gt;
&lt;th class=""&gt;Requested URL&lt;/th&gt;
&lt;td class=""&gt;http://servu.shopvisible.net:80/Cutlery-&amp;amp;amp;-Accessories/Cutlery-&amp;amp;amp;-Accessories.asp&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;th class=""&gt;Physical Path&lt;/th&gt;
&lt;td class=""&gt;d:\shopvisible\sites\ServU-ShopVisible\Cutlery-&amp;amp;amp;-Accessories\Cutlery-&amp;amp;amp;-Accessories.asp&lt;/td&gt;&lt;/tr&gt;
&lt;tr class="alt"&gt;
&lt;th class=""&gt;Logon Method&lt;/th&gt;
&lt;td class=""&gt;Not yet determined&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;th class=""&gt;Logon User&lt;/th&gt;
&lt;td class=""&gt;Not yet determined&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2333278.aspx</link><pubDate>Fri, 02 May 2008 03:54:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2333278</guid><dc:creator>ariyawansa@gmail.com</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2333278.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2333278</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;Even though you encode the URL, Asp.Net page has a default behavior of rejecting suspicious request. Although its not recommended for pages that your absolutely sure of can be rendered by changing the page directive ValidateRequest.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; &lt;b&gt;ValidateRequest=&amp;quot;false&amp;quot;&lt;/b&gt; MasterPageFile=&amp;quot;~/Site.master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeFile=&amp;quot;DealerDetails.aspx.cs&amp;quot; Inherits=&amp;quot;Dealer_DealerDetails&amp;quot; Title=&amp;quot;Untitled Page&amp;quot; %&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Cheers&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2299667.aspx</link><pubDate>Tue, 15 Apr 2008 18:12:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2299667</guid><dc:creator>superevanc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2299667.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2299667</wfw:commentRss><description>&lt;p&gt;What you might be running into probably isn&amp;#39;t an ASP.NET MVC issue.&amp;nbsp; From what you describe it sounds like you are running into some of the IIS security features that block out potential attack urls.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Take a look at http://support.microsoft.com/kb/820129 and the AllowRerstrictedChars setting&amp;nbsp; also http://support.microsoft.com/default.aspx?scid=kb;EN-US;826437&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hope that helps track down your problem.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2284470.aspx</link><pubDate>Tue, 08 Apr 2008 18:08:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2284470</guid><dc:creator>ksirg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2284470.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2284470</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I use mix version and my routes don&amp;#39;t have &amp;quot;.mvc&amp;quot; extensions.&lt;/p&gt;&lt;p&gt;&amp;nbsp;And mvc do HtmlAttributeEncode&amp;nbsp; not UrlEncode&lt;/p&gt;&lt;p&gt;HtmlHelper.cs line 121&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;return&lt;/span&gt; String.Format(CultureInfo.InvariantCulture, _anchorTag, HttpUtility.HtmlAttributeEncode(url), HttpUtility.HtmlEncode(linkText));&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2281290.aspx</link><pubDate>Mon, 07 Apr 2008 15:03:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2281290</guid><dc:creator>developmentalmadness</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2281290.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2281290</wfw:commentRss><description>&lt;p&gt;Also, have you checked to see if you are using the &amp;quot;.mvc&amp;quot; extension in your url? It isn&amp;#39;t required on IIS 7.0, so if you are you can make sure to remove it. But just verify that your routes take the difference into account.&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2281258.aspx</link><pubDate>Mon, 07 Apr 2008 14:49:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2281258</guid><dc:creator>developmentalmadness</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2281258.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2281258</wfw:commentRss><description>&lt;p&gt;Which version are you using? The latest version automatically UrlEncodes the values in the path. Make sure you are using the MIX release (early march) and remove the call to UrlEncode.&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2279540.aspx</link><pubDate>Sun, 06 Apr 2008 15:22:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2279540</guid><dc:creator>ksirg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2279540.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2279540</wfw:commentRss><description>&lt;p&gt;I have the same issue. On my localhost machine it&amp;#39;s ok but on iis7 it throw &amp;quot;Bad Request&amp;quot;&lt;/p&gt;&lt;p&gt;I try all methods&amp;nbsp; above and also UrlEncodeUnicode&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Is there any solution for that ? Maybe it&amp;#39;s iis problem? Have you try with normal asp.net app?&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2166334.aspx</link><pubDate>Mon, 11 Feb 2008 19:01:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2166334</guid><dc:creator>sliderhouserules</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2166334.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2166334</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;KaziManzurRashid:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;I tried the foolowing prior posting this issue, i have added the result:&lt;br /&gt;&lt;br /&gt;Server.UrlEncode(tagItem.Name) -&amp;gt; Story/Tag/Business+%26+Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;Html.Encode(tagItem.Name) -&amp;gt; Story/Tag/Business%20&lt;font color="#990000" size="6"&gt;&amp;amp;&lt;/font&gt;%20Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;HttpUtility.UrlEncode(tagItem.Name) -&amp;gt; Story/Tag/Business+%26+Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;HttpUtility.UrlPathEncode(tagItem.Name) -&amp;gt; Story/Tag/Business%20&lt;font color="#990000" size="6"&gt;&amp;amp;&lt;/font&gt;%20Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;Any other workaround ?&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; The above highlighted ampersands are exactly what I was referring to. Ampersands are used to delimit query string parameters.&lt;/p&gt;&lt;p&gt;The fact that you&amp;#39;re getting HTTP 400 when you correctly encode the ampersand means there&amp;#39;s something else going on. I just wanted to clarify what I was saying.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2166320.aspx</link><pubDate>Mon, 11 Feb 2008 18:55:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2166320</guid><dc:creator>KaziManzurRashid</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2166320.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2166320</wfw:commentRss><description>&lt;p&gt;I tried the foolowing prior posting this issue, i have added the result:&lt;br /&gt;&lt;br /&gt;Server.UrlEncode(tagItem.Name) -&amp;gt; Story/Tag/Business+%26+Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;Html.Encode(tagItem.Name) -&amp;gt; Story/Tag/Business%20&amp;amp;%20Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;HttpUtility.UrlEncode(tagItem.Name) -&amp;gt; Story/Tag/Business+%26+Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;HttpUtility.UrlPathEncode(tagItem.Name) -&amp;gt; Story/Tag/Business%20&amp;amp;%20Finance/1 -&amp;gt; Html Error 400 - Bad Request&lt;br /&gt;&lt;br /&gt;Any other workaround ?&lt;/p&gt;</description></item><item><title>Re: Bug in Url Building</title><link>http://forums.asp.net/thread/2165864.aspx</link><pubDate>Mon, 11 Feb 2008 15:45:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2165864</guid><dc:creator>developmentalmadness</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2165864.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2165864</wfw:commentRss><description>&lt;p&gt;I agree, I think you&amp;#39;ve found a bug. But I&amp;nbsp;believe what sliderhouserules meant was UrlEncode it before you pass it as an argument, like this:&amp;nbsp;&lt;pre class="coloredcode"&gt;Url.Action(&lt;span class="kwd"&gt;new&lt;/span&gt; { action = &lt;span class="st"&gt;&amp;quot;Tag&amp;quot;&lt;/span&gt;, controller = &lt;span class="st"&gt;&amp;quot;Story&amp;quot;&lt;/span&gt;, name = HttpUtility.UrlEncode(tagItem.Name), page = 1 })
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;Or&lt;/p&gt;&lt;pre class="coloredcode"&gt;Url.Action(&lt;span class="kwd"&gt;new&lt;/span&gt; { action = &lt;span class="st"&gt;&amp;quot;Tag&amp;quot;&lt;/span&gt;, controller = &lt;span class="st"&gt;&amp;quot;Story&amp;quot;&lt;/span&gt;, name = Server.UrlEncode(tagItem.Name), page = 1 })&lt;/pre&gt;&lt;pre class="coloredcode"&gt; &amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;/pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using HttpUtility.UrlEncode is a security best practice according to msdn to protect against cross-site scripting attacks, but I haven&amp;#39;t seen it used much so I don&amp;#39;t know how well it actually works. And even the MVC framework uses both interchangeably, but since I&amp;#39;ve started using it I haven&amp;#39;t had any problems.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>