Magic: Application runs sometimes and fails sometimes [modified]
-
I created an application that connects to MS Access Database I compiled, built, and ran the application, and everything went well Then I copied the *.exe file to another folder and other computers I ran it many times with no problems But, sometimes it does not work and displays the message (Unable to find a version of the runtime to run this application) And this problem is not solved till I rebuild the source code again I rebuild and run for 10s of times and the problem appears again What is the source of such aproblem, and what is the true solution
foreach(Minute m in MyLife) myExperience++;
modified on Monday, July 28, 2008 4:16 AM
-
I created an application that connects to MS Access Database I compiled, built, and ran the application, and everything went well Then I copied the *.exe file to another folder and other computers I ran it many times with no problems But, sometimes it does not work and displays the message (Unable to find a version of the runtime to run this application) And this problem is not solved till I rebuild the source code again I rebuild and run for 10s of times and the problem appears again What is the source of such aproblem, and what is the true solution
foreach(Minute m in MyLife) myExperience++;
modified on Monday, July 28, 2008 4:16 AM
A couple of suggetions. Create a set up project or publish your app using click once and install on the other computersrather than just copying the exe. If you've already made an installer, recompile it first. If that fails - you may need to reinstall the .NET framework, but if the problem is occuring on more than one computer then it's unlikely to be a framework error.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
A couple of suggetions. Create a set up project or publish your app using click once and install on the other computersrather than just copying the exe. If you've already made an installer, recompile it first. If that fails - you may need to reinstall the .NET framework, but if the problem is occuring on more than one computer then it's unlikely to be a framework error.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)DaveyM69 wrote:
Create a set up project or publish your app using click once and install on the other computersrather than just copying the exe.
you will be surprized when you know that this problem occurs with the executable file even while running from the bin directory itself another thing I recently noticed, is that th file size changes when it runs proberly its size is 452 kb when it fails, its size becomes 484 kb
DaveyM69 wrote:
If that fails - you may need to reinstall the .NET framework, but if the problem is occuring on more than one computer then it's unlikely to be a framework error.
yes, the problem occurs in more than machine I am installing .NET Framework version 1 and 2 together on the same machine Do you think I need to unistall one of them?
foreach(Minute m in MyLife) myExperience++;
-
DaveyM69 wrote:
Create a set up project or publish your app using click once and install on the other computersrather than just copying the exe.
you will be surprized when you know that this problem occurs with the executable file even while running from the bin directory itself another thing I recently noticed, is that th file size changes when it runs proberly its size is 452 kb when it fails, its size becomes 484 kb
DaveyM69 wrote:
If that fails - you may need to reinstall the .NET framework, but if the problem is occuring on more than one computer then it's unlikely to be a framework error.
yes, the problem occurs in more than machine I am installing .NET Framework version 1 and 2 together on the same machine Do you think I need to unistall one of them?
foreach(Minute m in MyLife) myExperience++;
Did you check the computer where you're experiencing troubles for malware/viri? A change of file size for no obvious reason sounds very suspicious. Not long ago I had a problem at a customer's site. One of our applications wouldn't run correctly on one computer - a keylogger or something like this had messed up the command line switches... Running a virus scan could be worth a try.
Regards, mav -- Black holes are the places where God divided by 0...
-
DaveyM69 wrote:
Create a set up project or publish your app using click once and install on the other computersrather than just copying the exe.
you will be surprized when you know that this problem occurs with the executable file even while running from the bin directory itself another thing I recently noticed, is that th file size changes when it runs proberly its size is 452 kb when it fails, its size becomes 484 kb
DaveyM69 wrote:
If that fails - you may need to reinstall the .NET framework, but if the problem is occuring on more than one computer then it's unlikely to be a framework error.
yes, the problem occurs in more than machine I am installing .NET Framework version 1 and 2 together on the same machine Do you think I need to unistall one of them?
foreach(Minute m in MyLife) myExperience++;
I've heard of problems when running v1 (with a service pack if I remember correctly) and then having v2. I seem to recall some major problems when the OS was Win98. Unless you have a specific reason for having 1.0 or 1.1 - I'd remove all versions then install 2.0, and if needed 3.0 & 3.5 (and relevant Service Packs). The file size change is worrying - that shouldn't be happening. Sounds virus like to me too. If that's happening on all the PCs then it may be your exe that's infected if indeed it is a virus.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
I created an application that connects to MS Access Database I compiled, built, and ran the application, and everything went well Then I copied the *.exe file to another folder and other computers I ran it many times with no problems But, sometimes it does not work and displays the message (Unable to find a version of the runtime to run this application) And this problem is not solved till I rebuild the source code again I rebuild and run for 10s of times and the problem appears again What is the source of such aproblem, and what is the true solution
foreach(Minute m in MyLife) myExperience++;
modified on Monday, July 28, 2008 4:16 AM
It seems to be really a virus activity, in spite of I scanned my machine and got none infected files But, I discovered the problem source The executable file is opened somehow and some bytes are appended making it unusable. So, the simple solution I did is .... ... I put the file in the READ ONLY access mode Now, everything works well Thanks to all participants
foreach(Minute m in MyLife) myExperience++;