OK this is a scenario where I can imagine an error like that might be thrown. Can I ask is it only against an open config host that this occurs, or does it occur on a 'closed' config host as well? I'm thinking this error might be an open config issue as I haven't tested that yet.
It might be a bit late to start debugging tonight, but I'll try and check it out tomorrow.
Incidentally don't worry about testing it against old LFS versions, I'm pretty sure that's not the problem.
Pushed release for LFS 0.6B to CodePlex. I added the new InSim packets and also reworked the options dialog so you can turn the new packets on/off. You can download the new release from CodePlex. As always please tell me of any bugs you find, or improvements you can suggest.
I've been wanting to add an auto-update feature to this, but I'm stuck trying to figure out a way to get the version number of the latest release from CodePlex. It seems CodePlex has an API that allows you to create and update releases, but nothing that allows you to simply get some info about what the most recent release actually is. Seems a bit of an oversight, to be honest. Obviously there are other options, for instance I could parse the releases page and read the release info from there, but that seems like complete overkill. I guess the best route will be just to upload some text file somewhere that contains the latest version number and download URL, and then use that to update the app. Still this would require me to either upload the file manually using FTP, or to write some kind of build script that uploaded it for me. It would be much nicer if CodePlex offered an API that you allowed to get the URL and version number of the latest release of the project.
This is the simplest way I can think to do it. Upload a text file somewhere with two lines, the version and the download URL.
1.2.3.4 http://www.website.com/downloadpage
Then you could read it like this (without any error checking). This checks if there is a new version, then launches your default browser to the download page.
<?php void UpdateApp() { var versionFile = new WebClient().DownloadString(VersionFileUrl); // Download file. var tokens = versionFile.Split(Environment.NewLine); var version = new Version(tokens[0]); // .NET has a handy version class. var url = tokens[1]; // Download page URL.
if (version > Assembly.GetExecutingAssembly().GetName().Version) { if (MessageBox.Show("A new version is available, do you want to download it?", "Download Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Process.Start(url); // Launch browser } } else { MessageBox.Show("The current version is up to date"); } } ?>
I had a bit of a brain wave today. Instead of storing the version info as a text file on some server somewhere, I could instead parse it from the RSS feed CodePlex provides for each project. As the RSS feed is generated automatically when I make a new release, this makes it much simpler to keep the latest version up to date. The code to do it is a little bit hacky, but it works. It's definitely better than editing and uploading a text file somewhere whenever I push out a new version.
I've been making lots of little tweaks to InSimSniffer over the last few weeks and I think I'll push out a new release soon. As always the latest changeset is on the CodePlex repository.
Compiled (binary) 1.3.2.0 version from CodePlex archive
Edit: btw in that archive contains binary exe's. In subfolder releases are 10 folders, and there are a files in each of them. Just open that file in some archive extractor (like 7-zip) (or just rename it to "something.zip")