<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: IPToCountry.NET</title>
	<atom:link href="http://barnabas.wordpress.com/projects/iptocountrynet/feed/" rel="self" type="application/rss+xml" />
	<link>http://barnabas.wordpress.com</link>
	<description></description>
	<lastBuildDate>Tue, 16 Oct 2007 11:39:39 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: George</title>
		<link>http://barnabas.wordpress.com/projects/iptocountrynet/#comment-301</link>
		<dc:creator>George</dc:creator>
		<pubDate>Fri, 10 Nov 2006 02:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://barnabas.wordpress.com/projects/iptocountrynet/#comment-301</guid>
		<description>Hi

I&#039;m a relative newbie in .NET so pardon my stupidity.

I&#039;m trying out your code and I&#039;m getting an error on the following line (***) in this function.

Public Shared Function GetCountryCode(ByVal IP As Long) As String

    ****    Dim Index As Integer = Array.BinarySearch(_Ranges, IP, New RangeFinder)****
        If Index &gt; -1 Then
            Return _Ranges(Index).Country
        End If
    End Function

It seems that _Ranges is nothing.

Here is what I&#039;ve done:
-----------------------------
Dim cc As New IPToCountry
    &#039;Dim ccode As String =     cc.GetCountryCode(&quot;216.104.194.173&quot;)
------------------------------  

Here is the error message:
---------------------------------
Value cannot be null. Parameter name: arrayHandleError at System.Array.BinarySearch(Array array, Object value, IComparer comparer) at magrosa.IPToCountry.GetCountryCode(Int64 IP) in c:\inetpub\wwwroot\magrosa\IpToCountry.vb:line 138 at magrosa.DBManager.PumpDbs() in c:\inetpub\wwwroot\magrosa\DBManager.vb:line 69 at magrosa.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\magrosa\index.aspx.vb:line 61 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
-----------------------

Can you help. I would like to use this functionality

Regards

George</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I&#8217;m a relative newbie in .NET so pardon my stupidity.</p>
<p>I&#8217;m trying out your code and I&#8217;m getting an error on the following line (***) in this function.</p>
<p>Public Shared Function GetCountryCode(ByVal IP As Long) As String</p>
<p>    ****    Dim Index As Integer = Array.BinarySearch(_Ranges, IP, New RangeFinder)****<br />
        If Index &gt; -1 Then<br />
            Return _Ranges(Index).Country<br />
        End If<br />
    End Function</p>
<p>It seems that _Ranges is nothing.</p>
<p>Here is what I&#8217;ve done:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Dim cc As New IPToCountry<br />
    &#8216;Dim ccode As String =     cc.GetCountryCode(&#8220;216.104.194.173&#8243;)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;  </p>
<p>Here is the error message:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Value cannot be null. Parameter name: arrayHandleError at System.Array.BinarySearch(Array array, Object value, IComparer comparer) at magrosa.IPToCountry.GetCountryCode(Int64 IP) in c:\inetpub\wwwroot\magrosa\IpToCountry.vb:line 138 at magrosa.DBManager.PumpDbs() in c:\inetpub\wwwroot\magrosa\DBManager.vb:line 69 at magrosa.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\magrosa\index.aspx.vb:line 61 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Can you help. I would like to use this functionality</p>
<p>Regards</p>
<p>George</p>
]]></content:encoded>
	</item>
</channel>
</rss>
