<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Encryption/Decryption cache files</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Encryption/Decryption cache files</description>
  <pubDate>Wed, 10 Jun 2026 03:48:10 -700</pubDate>
  <lastBuildDate>Thu, 18 Aug 2011 14:19:40 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2900</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Encryption/Decryption cache files : Thanks for the insight, we compiled...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11462#11462</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1121" rel="nofollow">prempos</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 18-Aug-2011 at 2:19pm<br /><br />Thanks for the insight, we compiled using the modification suggested and all is well.<div><br></div><div>thanks again.</div><div><br></div><div>Pierre &amp; Kevin</div>]]>
   </description>
   <pubDate>Thu, 18 Aug 2011 14:19:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11462#11462</guid>
  </item> 
  <item>
   <title>Encryption/Decryption cache files :   Instead of using the CryptoFns.SimpleDESDecrypt...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11459#11459</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 17-Aug-2011 at 4:05pm<br /><br />Instead of using the CryptoFns.SimpleDESDecrypt and other logic from that learning unit, I would recommend using chained streams.&nbsp; You can find an example (for DevForce 2010 but still applicable to Classic) here - <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sample-save-restore-chained-streams" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-save-restore-chained-streams<div>&nbsp;</div></a><div>The SimpleDESDecrypt method is working on the entire encrypted string at one time and not in chunks, and it also allocates a MemoryStream without providing an initial capacity, which might be causing the problem.&nbsp; I don't want to post the source code here, but I can provide the code for the SimpleDESEncrypt and SimpleDESDecrypt functions if you want to try tweaking them to see if the problem goes away.&nbsp; PM or email me if interested.</div><div>&nbsp;</div><div>Regarding saving and restoring smaller EntitySets, we don't have any samples of this I'm afraid.&nbsp; The Developer's Guide has a general discussion on multiple EntitySets in the "Disconnected" chapter.&nbsp; The PM.SaveEntitySet method has several overloads which allow you to pass only the entities of interest.&nbsp; So for example, you could use PM.GetEntities to retrieve Customers, and then pass that EntityList or array into the SaveEntitySet method.</div>]]>
   </description>
   <pubDate>Wed, 17 Aug 2011 16:05:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11459#11459</guid>
  </item> 
  <item>
   <title>Encryption/Decryption cache files : I&amp;#039;m also working on the program...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11456#11456</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=401" rel="nofollow">kjohnson</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 17-Aug-2011 at 2:12pm<br /><br />I'm also working on the program experiencing the System.OutOfMemoryException error and wanted to add in a few things.<br><br>We are using sample code from the Security Encrypting a Local Cache File learning unit. The main modification we made to the code is to help in catching errors. And as was mentioned previously we are receiving this error when we attempt to decrypt the EntitySet before restoring it. <br><br>Saving and restoring smaller EntitySets would be helpful in correcting this problem, but I didn't see anything in the learning units regarding this. Are there any resources or samples that would show how to cache only objects of EntityType Customer to a local cache file?<br>]]>
   </description>
   <pubDate>Wed, 17 Aug 2011 14:12:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11456#11456</guid>
  </item> 
  <item>
   <title>Encryption/Decryption cache files : Thanks for the Head up...The error...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11455#11455</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1121" rel="nofollow">prempos</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 17-Aug-2011 at 1:50pm<br /><br />Thanks for the Head up...<div><br></div><div>The error occurs only when trying to decrypt, no errors with envryption.</div><div><br></div><div>Thank you&nbsp;for the suggestions, I appreciate that.</div><div><br></div><div>Also, we are using&nbsp;&nbsp;the IdeaBlade.Util.CryptoFns.SimpleDESEncrypt() method</div><div><br></div><div>Pierre</div><div ="chat in"><div ="clear"></div></div><div ="break"></div>]]>
   </description>
   <pubDate>Wed, 17 Aug 2011 13:50:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11455#11455</guid>
  </item> 
  <item>
   <title>Encryption/Decryption cache files :    Afraid we can&amp;#039;t help...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11454#11454</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 17-Aug-2011 at 12:48pm<br /><br />Afraid we can't help with the differences between WEPOS and Windows 7 (a WEPOS forum might be able to help with why 2G of memory could be sufficient in standard Windows but not WEPOS), but we can help troubleshoot&nbsp;the general out-of-memory problem.<div></div>You didn't say how you're doing encryption/decryption.&nbsp; Are you using sample code from one of the learning units or your own?<div>&nbsp;</div><div>Is the error specifically occuring during decryption or somewhere within the PM.RestoreEntitySet&nbsp;or EntitySet.Load logic?&nbsp; The load/restore logic uses a BinaryFormatter to deserialize the provided stream, and doesn't have any knobs to control its behavior.&nbsp; </div><div>&nbsp;</div><div>A few things to look at would be -</div><ul><li>An out-of-memory problem during serialization or deserialization is usually due to problems with the allocation of progressively larger buffers.  You can sometimes&nbsp;fix this by setting the capacity on a *Stream or StringBuilder in its constructor to the size needed.&nbsp;&nbsp;</li><li>Try calling GC.Collect before doing the restore.</li><li>Think about saving and restoring smaller EntitySets.&nbsp; Instead of caching all entities within a PM into a single file, maybe create smaller cache files by&nbsp;functionality or feature.</li><li>Try using the EntityDataSetSurrogate&nbsp;directly.&nbsp; This is the what is actually used under the hood.&nbsp; If you serialize/deserialize it directly you'll have more control over this logic.&nbsp; </li></ul><div>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 17 Aug 2011 12:48:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11454#11454</guid>
  </item> 
  <item>
   <title>Encryption/Decryption cache files : Hello,We are getting an &amp;#034;Exception...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11445#11445</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1121" rel="nofollow">prempos</a><br /><strong>Subject:</strong> 2900<br /><strong>Posted:</strong> 16-Aug-2011 at 6:55pm<br /><br />Hello,<br><br>We are getting an "Exception of type" System.OutOfMemoryException" was thrown<br><br>when reading cache file, and decrypting cache file in the debug log file. The computer is a wepos2010 (windows embeded pos) with 2 GB memory. WEPOS is the scaled down OS from windows XP Microsoft<br><br>Any thoughts.<br><br>This same build seems to work fine on windows7 systems with 2 GB memory.<br><br>Thanks.<br>Pierre<br>]]>
   </description>
   <pubDate>Tue, 16 Aug 2011 18:55:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2900&amp;PID=11445#11445</guid>
  </item> 
 </channel>
</rss>