The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

Unable to read director.xml. hexadecimal value 0x1F, is an invalid character. Options
RobertMcCarter
#1 Posted : Thursday, August 19, 2010 10:30:22 PM
Rank: Member
Groups: Member

Joined: 8/19/2010
Posts: 3
Location: Canada
Here is the exact stack trace I'm getting:

An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> Kjs.AppLife.Update.Controller.ValidationException: Unable to read director.xml. ---> System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(Stream inStream)
   at Kjs.AppLife.Update.Controller.Internal.DirectorDocument.a(Stream A_0)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Kjs.AppLife.Update.Controller.CheckForUpdateCompletedEventArgs.get_Result()

I've used the update URL and I can easily download the Director.xml (it's over normal HTTP).  I've opened it in a binary editor and there are no occurances of the hex character 0x1F, especially not at line 1 position 1.

My code looks like this:

  m_Controller.UpdateFound += OnSoftwareUpdateFound;
  m_Controller.CheckForUpdateCompleted += OnCheckForUpdateCompleted;
  m_Controller.DownloadUpdateCompleted += OnSoftwareUpdateDownloaded;
  m_Controller.CheckForUpdateAsync();


The exception is occuring when I try and reference CheckForUpdateCompletedEventArgs .Results

Here's the code:

private static void OnCheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs args) {
    try {
        if( args.Result==false ) {
            const string message = "No software updates were found.";
            ApplicationMessageList.Instance.AddMessage(message);
        } //if - no updates found
    } catch( Exception e ) {
        m_Log.ErrorException("Failed to check for updates!", e);
    }//catch
}

The OnSoftwareUpdateDownloaded call-back is never called.

Any help would be greatly appreciated!  I'm running on Windows 7 using VS2008 and .NET 3.5 SP1.

Thank you very much in advance,

Robert
brianh
#2 Posted : Friday, August 20, 2010 6:57:25 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Robert,

 

Can you email your director.xml file to techsupport <at>  kineticjump.com so that we can try and reproduce this?  I'm sure we can determine whats going on.

Brian Haas
Kinetic Jump Software
RobertMcCarter
#3 Posted : Friday, August 20, 2010 9:00:30 AM
Rank: Member
Groups: Member

Joined: 8/19/2010
Posts: 3
Location: Canada
I've e-mailed the Directory.Xml file to you.
Thank you very much for your help; everything else up to this point has been very easy, this seems to be really well designed software.
RobertMcCarter
#4 Posted : Friday, August 20, 2010 5:24:03 PM
Rank: Member
Groups: Member

Joined: 8/19/2010
Posts: 3
Location: Canada
Thank you for all of your time and help Brian!!

In case anybody else experiences this, Brian and I worked together and used Fiddler to discover that the problem was (for some reason) IIS 7 was sending the XML file compressed with gzip - even though the request didn't contain any headers indicating that this was okay.

Even more bizzarely, the same IIS 7 server worked for a sample client Brian made and ran from his machine, but did not work when the request came from my machine.

At any rate, I disabled static content compression using the IIS 7 manager for the Director.Xml file, and my application now works (from my machine) as well.

Thanks again Brian!

Sincerely,

Robert
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.