Unable to read beyond the end of the stream is error message

Topics: Data Access, SharpMap v0.9 / v1.x
Aug 5, 2007 at 4:37 AM
i have error at code :
myMap.ZoomToExtents();

Unable to read beyond the end of the stream is message

i need help
i think when run at
string path = Server.MapPath(@"~\App_data\countries.shp");
layCountries.DataSource = new SharpMap.Data.Providers.ShapeFile(path , true);

that is error
Unable to read beyond the end of the stream
Aug 8, 2007 at 6:49 PM
Have you put in debugging code to see value 'path' contains prior to sending it to the providers.shapefile constructor? While I don't have a definate answer for you, my bet is that either the path is bad and it is not finding the the shape file or the shape file is corrupt.

Bill
Coordinator
Aug 8, 2007 at 7:37 PM
It sounds like it might be a corrupt ShapeFile. Can you open it with some other tool, like ogrinfo.exe found in FwTools?