<?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 AJAX Discussion and Suggestions</title><link>http://forums.asp.net/1007.aspx</link><description>This forum is the place for ASP.NET AJAX 'getting started' questions, general questions that don't fit in one of the other forums about AJAX </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: [BUG]Sys.Net.WebRequest.createUrl doesn't work properly sometimes</title><link>http://forums.asp.net/thread/1256190.aspx</link><pubDate>Wed, 12 Apr 2006 22:17:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1256190</guid><dc:creator>davidebb</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1256190.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1256190</wfw:commentRss><description>&lt;p&gt;Thanks Luis, I will open a bug to track this.&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;</description></item><item><title>Re: [BUG]Sys.Net.WebRequest.createUrl doesn't work properly sometimes</title><link>http://forums.asp.net/thread/1255807.aspx</link><pubDate>Wed, 12 Apr 2006 16:51:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1255807</guid><dc:creator>Luis Abreu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1255807.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1255807</wfw:commentRss><description>&lt;p&gt;hello again.&lt;/p&gt;
&lt;p&gt;any thoughts on this?&lt;/p&gt;</description></item><item><title>[BUG]Sys.Net.WebRequest.createUrl doesn't work properly sometimes</title><link>http://forums.asp.net/thread/1254909.aspx</link><pubDate>Tue, 11 Apr 2006 21:33:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1254909</guid><dc:creator>Luis Abreu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1254909.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1254909</wfw:commentRss><description>&lt;p&gt;hello.&lt;/p&gt;
&lt;p&gt;this is a bug i found in the sequence of this bug:&lt;/p&gt;
&lt;p&gt;&lt;a HREF="/thread/1254898.aspx"&gt;http://forums.asp.net/thread/1254898.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ok, so if you have a dataService that is calling a web service and you're not sending parameters, then there's a problem in the way the query string is built. for instance, i have this declaration on my page:&lt;/p&gt;&lt;font size=1&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&amp;lt;dataSource id=&lt;font color=#800000&gt;"mySource"&lt;/font&gt; autoLoad=&lt;font color=#800000&gt;"true"&lt;/font&gt; serviceURL=&lt;font color=#800000&gt;"WebService.asmx?mn=ObtemAlunos"&lt;/font&gt; serviceType=&lt;font color=#800000&gt;"Handler"&lt;/font&gt; /&amp;gt;
&lt;p&gt;the problem is that i get a GET request with this url:&lt;/p&gt;
&lt;p&gt;GET /codigo/cap06/WebService.asmx?mn=ObtemAlunos&amp;amp; &lt;/p&gt;
&lt;p&gt;&lt;font size=1&gt;&lt;/font&gt;&lt;font size=1&gt;&lt;font size=3&gt;the problem is that the the Sys.Net.WebRequest.createUrl adds the url returned from the Sys.Net.WebRequest.createQueryString without checking for the length of the returned string. in my previous scenario, the _parameters object of the datasource class is created as an empty object (which is different from null) and due to that, the createQueryString is returning an empty string.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=1&gt;&lt;font size=3&gt;i think that the Sys.Net.WebRequest.createUrl should be changed so that it looks like this:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size=1&gt;&lt;font size=3&gt;&lt;font size=1&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size=3&gt;Sys.Net.WebRequest.createUrl = &lt;font color=#0000ff&gt;function&lt;/font&gt;(url, queryString) {&lt;br /&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt; (!queryString) {&lt;br /&gt;&amp;nbsp; &lt;font color=#0000ff&gt;return&lt;/font&gt; url;&lt;br /&gt;}
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt; sep = &lt;font color=#800000&gt;'?'&lt;/font&gt;;&lt;br /&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt; (url &amp;amp;&amp;amp; url.indexOf(&lt;font color=#800000&gt;'?'&lt;/font&gt;) != -1) &lt;br /&gt;&amp;nbsp;&amp;nbsp; sep = &lt;font color=#800000&gt;'&amp;amp;'&lt;/font&gt;;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt; string = Sys.Net.WebRequest.createQueryString(queryString); &lt;br /&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;( string != &lt;font color=#0000ff&gt;null&lt;/font&gt; &amp;amp;&amp;amp; string.length != 0 )&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;return&lt;/font&gt; url + sep + Sys.Net.WebRequest.createQueryString(queryString);&lt;br /&gt;&lt;font color=#0000ff&gt;else&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff&gt;return&lt;/font&gt;&lt;font size=1&gt;&lt;font size=3&gt; url;&lt;br /&gt;&lt;/font&gt;&lt;font size=3&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size=3&gt;thanks.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item></channel></rss>