<?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.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx</link><description>Here is another issue that a customer had that I thought would be helpful to others. Problem The customer said they are getting Exception type: System.IndexOutOfRangeException every minute or so when accessing their web site.&amp;#160; The error looks like:</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#8899194</link><pubDate>Wed, 27 Aug 2008 10:09:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8899194</guid><dc:creator>Ramendra Kumar</dc:creator><description>&lt;p&gt;It gives An Exception for System.IndexOutOfRangeException: &lt;/p&gt;
&lt;p&gt;Sql Field IS int also. Could You Help ME&lt;/p&gt;
&lt;p&gt;totalsponsoe = Convert.ToInt32(sdr[&amp;quot;AppMstSponsorTotal&amp;quot;]);&lt;/p&gt;</description></item><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#8954214</link><pubDate>Tue, 16 Sep 2008 21:19:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8954214</guid><dc:creator>Rob Awe</dc:creator><description>&lt;p&gt;There's probably a typo in your field name.&lt;/p&gt;</description></item><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#8954254</link><pubDate>Tue, 16 Sep 2008 21:56:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8954254</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Good point Rob, remember that the SQL field names are case sensative.&lt;/p&gt;
</description></item><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#8999048</link><pubDate>Tue, 14 Oct 2008 07:35:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8999048</guid><dc:creator>Ariady Putra</dc:creator><description>&lt;p&gt;my problem is similar to Ramendra &amp;nbsp;Kumar, but i only get the System.IndexOutOfRangeException if i try to call &amp;lt;b&amp;gt;char&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;text&amp;lt;/b&amp;gt; data type &amp;nbsp;from SQL. other fields using int or varchar no problem. i've checked over and over the field name.&lt;/p&gt;
&lt;p&gt;bceData.Answer = sqlDataReader[&amp;quot;AnswerField&amp;quot;].ToString();&lt;/p&gt;
&lt;p&gt;the &amp;quot;AnswerField&amp;quot; is &amp;lt;b&amp;gt;text&amp;lt;/b&amp;gt; datatype in SQL. can you help me please?&lt;/p&gt;
&lt;p&gt;i have no permission to alter the database.&lt;/p&gt;</description></item><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#9001517</link><pubDate>Thu, 16 Oct 2008 09:51:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9001517</guid><dc:creator>Ariady Putra</dc:creator><description>&lt;p&gt;alright, please forget my previous comment :D the problem was in the stored procedure :D now everything is solved :D i'm still learning anyway :D&lt;/p&gt;</description></item><item><title>re: System.IndexOutOfRangeException on a webfarm</title><link>http://blogs.msdn.com/tom/archive/2008/08/13/system-indexoutofrangeexception-on-a-webfarm.aspx#9850892</link><pubDate>Tue, 28 Jul 2009 14:16:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9850892</guid><dc:creator>swapneel</dc:creator><description>&lt;P&gt;sql = "select Rlens_code,Llens_code from Spects where " &amp;amp; oprator &amp;amp; " = '" &amp;amp; Search &amp;amp; "'"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CM = New SqlCommand(sqlstr, frmMasterObj.cn)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim dr1 As SqlDataReader = CM.ExecuteReader&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If dr1.HasRows = True Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;While (dr1.Read)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If dr1("Llens_code") = "" Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblRtLensRef.Text = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblLtLensRef.Text = dr1("Llns_code").ToString()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If dr1("Rlens_code") = "" Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblLtLensRef.Text = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblRtLensRef.Text = dr1("Rlens_code").ToString()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End While&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dr1.Close()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;in this code if some value is null so how can we catch that null value&lt;/P&gt;</description></item></channel></rss>