<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Working with Shapefiles in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583576#M14941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kindly look at this related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/15833-ShapeFiles-And-Text-files"&gt;http://forums.arcgis.com/threads/15833-ShapeFiles-And-Text-files&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can go to Advanced Search for "Shapefile" in ArcGIS API for Microsoft Silverlight/WPF forum, to get more related threads.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Dec 2010 16:03:16 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2010-12-08T16:03:16Z</dc:date>
    <item>
      <title>Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583575#M14940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Newbie question here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a Silverlight map in ESRI and want to add and plot shape files to it. How do I go about:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Adding Shapefiles to my application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Adding them to my map&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been going through google and forums for the last few hours now and no help whatsoever. Code examples would be MUCH APPRECIATED!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583575#M14940</guid>
      <dc:creator>KeithSearles</dc:creator>
      <dc:date>2010-12-08T15:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583576#M14941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kindly look at this related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/15833-ShapeFiles-And-Text-files"&gt;http://forums.arcgis.com/threads/15833-ShapeFiles-And-Text-files&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can go to Advanced Search for "Shapefile" in ArcGIS API for Microsoft Silverlight/WPF forum, to get more related threads.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 16:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583576#M14941</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-12-08T16:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583577#M14942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this if this helps&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://esrislcontrib.codeplex.com/"&gt;http://esrislcontrib.codeplex.com/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 16:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583577#M14942</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2010-12-08T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583578#M14943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try this if this helps&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://esrislcontrib.codeplex.com/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://esrislcontrib.codeplex.com/&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get this loaded in my project, but now I have this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code for loading just one of the shape files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
List&amp;lt;FileInfo&amp;gt; shapes = new List&amp;lt;FileInfo&amp;gt;();
FileInfo runwayShp = new FileInfo("Layers\\Runway.shp");
FileInfo runwayDbf = new FileInfo("Layers\\Runway.dbf");
shapes.Add(runwayShp);
shapes.Add(runwayDbf);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this is the error I receive:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;System.Security.SecurityException was unhandled by user code
&amp;nbsp; Message=File operation not permitted. Access to path 'Layers\Runway.shp' is denied.
&amp;nbsp; StackTrace:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.IO.FileSecurityState.EnsureState()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.IO.FileInfo..ctor(String fileName)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MidwayAirportApplication.MainPage.LoadShapeFiles()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MidwayAirportApplication.MainPage..ctor()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MidwayAirportApplication.App.Application_Startup(Object sender, StartupEventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
&amp;nbsp; InnerException: &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The file and directory are not read-only and are inside of the Client Bin folder...how can I get it to read it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583578#M14943</guid>
      <dc:creator>KeithSearles</dc:creator>
      <dc:date>2021-12-12T01:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583579#M14944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are not allowed to just read files from disk in Silverlight (imagine what malicious hackers would use that for in their silverlight apps).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You must use an OpenFileDialog and have the user pick the file for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't matter if it's in the clientbin folder. Remember that Silverlight runs on the 'client' and not on the webserver where the clientbin file resides.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 19:05:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583579#M14944</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-12-08T19:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583580#M14945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are not allowed to just read files from disk in Silverlight (imagine what malicious hackers would use that for in their silverlight apps).&lt;BR /&gt;You must use an OpenFileDialog and have the user pick the file for you.&lt;BR /&gt; &lt;BR /&gt;It doesn't matter if it's in the clientbin folder. Remember that Silverlight runs on the 'client' and not on the webserver where the clientbin file resides.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So how can I go ahead and use these shape files automatically? The shapes are to load on start up, and are not to be selected by the user.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 19:14:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583580#M14945</guid>
      <dc:creator>KeithSearles</dc:creator>
      <dc:date>2010-12-08T19:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583581#M14946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have 2 options: 1) Put the shapefile into the xap container, or 2) write code to download it from the server after the application loads.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 02:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583581#M14946</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2010-12-09T02:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583582#M14947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can put the shp and dbf in the sl project and read it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; StreamResourceInfo sr1 = Application.GetResourceStream(new Uri("RedBook;component/pics/redbook2.shp", UriKind.Relative));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stream pShpStream = sr1.Stream;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StreamResourceInfo sr2 = Application.GetResourceStream(new Uri("RedBook;component/pics/redbook2.dbf", UriKind.Relative));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stream pDbfStream = sr2.Stream;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShapeFile pShapeFileReader = new ShapeFile();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pShapeFileReader.Read(pShpStream, pDbfStream);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where 'RedBook' is the name of the project/solution name, 'pics' is a folder inside the project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;just add ctors to the Read function&amp;nbsp; (taken from &lt;/SPAN&gt;&lt;A href="http://esrislcontrib.codeplex.com/"&gt;http://esrislcontrib.codeplex.com/&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It works for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oren&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 04:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/working-with-shapefiles/m-p/583582#M14947</guid>
      <dc:creator>OrenGal</dc:creator>
      <dc:date>2010-12-09T04:45:32Z</dc:date>
    </item>
  </channel>
</rss>

