﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Application Framework / Issues  / XMLBasics not working when using encryption / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sun, 07 Sep 2008 16:35:00 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: XMLBasics not working when using encryption</title><link>http://forum.strataframe.net/Topic13482-10-1.aspx</link><description>[quote]Maybe it was just your esteemed presence??? &lt;IMG title=Wink src="http://forum.strataframe.net/Skins/Classic/Images/EmotIcons/Wink.gif" align=absMiddle border=0&gt;[/quote]&lt;/P&gt;&lt;P&gt;ROFL...that's good, because I obviously could not reproduce this on my side as it kept working....so I was in the scratching head phase :D</description><pubDate>Wed, 16 Jan 2008 14:46:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: XMLBasics not working when using encryption</title><link>http://forum.strataframe.net/Topic13482-10-1.aspx</link><description>OK, it's official...I'm loosing my mind.  :pinch::hehe::angry::crazy::blink:&lt;br&gt;&lt;br&gt;I created a simple sample to demonstrate the problem...except no problem. &lt;br&gt;&lt;br&gt;So I imported the class causing the problem and used it...except no problem.&lt;br&gt;&lt;br&gt;So I went back the to original project, and added a message box, to make sure I had the path right. Then I got rid of some encryption I was using. It worked. So I started backwards to find out where the problem showed up....except it didn't. It works now.  I have no idea what happened, but it works now. Maybe it was just your esteemed presence???  ;)</description><pubDate>Wed, 16 Jan 2008 12:35:15 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: XMLBasics not working when using encryption</title><link>http://forum.strataframe.net/Topic13482-10-1.aspx</link><description>Yep, I've looked at that sample. In fact, after that post and what I learned there, I've used XMLBasics a number of times, but not encrypted. &lt;br&gt;&lt;br&gt;If you take a look at the code I posted, you'll see what I'm doing.  If I include the flag to decrypt, it bombs. If I don't include that flag, it works.&lt;br&gt;&lt;br&gt;This bombs with the exception:&lt;br&gt;[codesnippet]retSet = XmlBasics.OpenXmlFile(Me.GetCurrentVersion(),Me.TableName, fullPath, Me.GetXmlStructure()              , True)/codesnippet] &lt;br&gt; &lt;br&gt;This works:&lt;br&gt;[codesnippet]retSet = XmlBasics.OpenXmlFile(Me.GetCurrentVersion(),Me.TableName, fullPath, Me.GetXmlStructure()           )/codesnippet]&lt;br&gt;&lt;br&gt;The file it can't find isn't mine.  My path is something like e:\samples\encryptedxml\bin\debug\exml.dat.</description><pubDate>Wed, 16 Jan 2008 11:20:57 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: XMLBasics not working when using encryption</title><link>http://forum.strataframe.net/Topic13482-10-1.aspx</link><description>First, if the file already exists on disk asn was NOT created by the OpenXmlFile (or WriteXmlFile), the you are going to get an error.  OpenXmlFile will create the file if it does not exist and it stores two tables within the data set.  Have you looked at this sample yet: &lt;A href="http://forum.strataframe.net/FindPost13102.aspx"&gt;http://forum.strataframe.net/FindPost13102.aspx&lt;/A&gt; ?  It should give you a better idea of how to open and XmlFile through XmlBasics and to update the structure etc.&lt;/P&gt;&lt;P&gt;In this example, does the tmp file already exist?  Also, what is in your path?  If you would like, you could create me a quick sample and I will change your code to show you how to correct your error. :)</description><pubDate>Wed, 16 Jan 2008 07:06:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>XMLBasics not working when using encryption</title><link>http://forum.strataframe.net/Topic13482-10-1.aspx</link><description>I'm attempting to use XMLBasics to store some startup options and am having trouble getting it to work. I keep getting an error whenever I try to open it encrypted when it has no data in it yet. A couple of things are confusing the heck out of me.  First, when I look at the source code (that I have), there is no OpenXMLFileBase method in XMLBasics.  I'm thinking y'all have changed this one lately.  Second, it appears to be loosing the a temp file (the file listed as not being found is not the file I'm opening) during the encryption process. If I turn off encryption, it works fine.   &lt;br&gt;&lt;br&gt;Here's the code and the exception:&lt;br&gt;&lt;br&gt;Here is the function:&lt;br&gt;[codesnippet]Private Function GetDataSet() As DataSet&lt;br&gt;  '-- Establish a return variable&lt;br&gt;  Dim retSet As DataSet&lt;br&gt;  '-- Build the full path to the file&lt;br&gt;  Dim fullPath As String = Path.Combine(Me.GetPath(), Me.XmlFileName)&lt;br&gt;  '-- Open the file and get the data set&lt;br&gt;  retSet = XmlBasics.OpenXmlFile(Me.GetCurrentVersion() _&lt;br&gt;               , Me.TableName _&lt;br&gt;               , fullPath _&lt;br&gt;               , Me.GetXmlStructure() _&lt;br&gt;               , True)&lt;br&gt;  '--return the store data table&lt;br&gt;  Return retSet&lt;br&gt;End Function[/codesnippet]&lt;br&gt;&lt;br&gt;And the exception:&lt;br&gt;[quote]FileNotFoundException&lt;br&gt;  Could not find file 'C:\Documents and Settings\greg\Local Settings\Temp\glu221xf.tmp'.&lt;br&gt;&lt;br&gt;Source     : mscorlib&lt;br&gt;&lt;br&gt;Stack Trace:&lt;br&gt;   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&lt;br&gt;   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)&lt;br&gt;   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)&lt;br&gt;   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)&lt;br&gt;   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)&lt;br&gt;   at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)&lt;br&gt;   at System.Threading.CompressedStack.runTryCode(Object userData)&lt;br&gt;   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)&lt;br&gt;   at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)&lt;br&gt;   at System.Xml.XmlTextReaderImpl.OpenUrl()&lt;br&gt;   at System.Xml.XmlTextReaderImpl.Read()&lt;br&gt;   at System.Xml.XmlTextReader.Read()&lt;br&gt;   at System.Xml.XmlReader.MoveToContent()&lt;br&gt;   at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode, Boolean denyResolving)&lt;br&gt;   at System.Data.DataSet.ReadXml(String fileName, XmlReadMode mode)&lt;br&gt;   at MicroFour.StrataFrame.Xml.XmlBasics.OpenXMLFileBase(String CurrentVersion, String TableName, String PathAndFileName, List`1 ColumnStructure)&lt;br&gt;   at MicroFour.StrataFrame.Xml.XmlBasics.OpenXmlFile(String Version, String TableName, String PathAndFileName, List`1 ColumnStructure, Boolean DecryptFile)&lt;br&gt;   at ConnestionStringFileManager.ConnectionStrings.OpenStore() in E:\SacredSpaceSoftware\ConnestionStringFileManager\ConnectionStrings.vb:line 296&lt;br&gt;   at ConnestionStringFileManager.ConnectionStrings.GetData() in E:\SacredSpaceSoftware\ConnestionStringFileManager\ConnectionStrings.vb:line 323&lt;br&gt;   at ConnestionStringFileManager.ConnectionStrings.LoadStore() in E:\SacredSpaceSoftware\ConnestionStringFileManager\ConnectionStrings.vb:line 250&lt;br&gt;   at ConnestionStringFileManager.ConnectionStrings.Load() in E:\SacredSpaceSoftware\ConnestionStringFileManager\ConnectionStrings.vb:line 139&lt;br&gt;   at ConnestionStringFileManager.MainForm.cmdLoad_Click(Object sender, EventArgs e) in E:\SacredSpaceSoftware\ConnestionStringFileManager\MainForm.vb:line 46&lt;br&gt;   at System.Windows.Forms.Control.OnClick(EventArgs e)&lt;br&gt;   at System.Windows.Forms.Button.OnClick(EventArgs e)&lt;br&gt;   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)&lt;br&gt;   at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)&lt;br&gt;   at System.Windows.Forms.Control.WndProc(Message&amp; m)&lt;br&gt;   at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)&lt;br&gt;   at System.Windows.Forms.Button.WndProc(Message&amp; m)&lt;br&gt;   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp; m)&lt;br&gt;   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp; m)&lt;br&gt;   at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br&gt;[/quote]</description><pubDate>Tue, 15 Jan 2008 23:06:23 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>