Lanc1988 Posted August 5, 2009 Posted August 5, 2009 I am trying to upgrade a small application that simply downloads a file from my website (an update basically) and then when its finished it launches the install for the update. The program works fine in vb.net 2003 with .NET framework 1.1 and when I upgrade to 2.0 it appears there are no problems but when I run the program it doesnt work at all and it doesnt give me any clues where the problems are. I've attached the program. Someone else wrote this code for me a couple years ago so I can only kinda follow along with it. Hopefully the fix is something simple. This program is a small part of a larger project that I have already converted to 2.0 and it works fine but this is keeping me from releasing the whole project. Thanks.Downloader.zip Quote
Administrators PlausiblyDamp Posted August 5, 2009 Administrators Posted August 5, 2009 When you say it doesn't work at all are you refering to the InvalidOperationException that is thrown due to cross thread calls? If so this is due to .Net 2 and later being more strict about updating the UI from anything other than the main UI thread - this was a bad idea even in .Net 1 it just wasn't enforced in .Net 1. Any line that is either in the StartDLThread method or is called from it cannot directly update the user interface, you need to get the form to invoke a method to do the real work. The following should give you an idea http://www.xtremedotnettalk.com/showthread.php?t=100158&highlight=invokerequired http://www.xtremedotnettalk.com/showthread.php?t=101944&highlight=invokerequired Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Lanc1988 Posted August 5, 2009 Author Posted August 5, 2009 Thanks for the info. I just noticed something that seems kinda strange for my updater application. I ran the .exe for it on my computer that doesnt have .net 1.0 or 1.1 installed (only 2.0, 3.0, and 3.5) and it runs and works perfectly.. how is this possible when it was created in vb.net 2003 with .net 1.1? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.