Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Magic: Application runs sometimes and fails sometimes [modified]

Magic: Application runs sometimes and fails sometimes [modified]

Scheduled Pinned Locked Moved C#
databasehelpquestionannouncement
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Gouda
    wrote on last edited by
    #1

    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

    D M 2 Replies Last reply
    0
    • M Muhammad Gouda

      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

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      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)

      M 1 Reply Last reply
      0
      • D DaveyM69

        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)

        M Offline
        M Offline
        Muhammad Gouda
        wrote on last edited by
        #3

        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++;

        M D 2 Replies Last reply
        0
        • M Muhammad Gouda

          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++;

          M Offline
          M Offline
          mav northwind
          wrote on last edited by
          #4

          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...

          1 Reply Last reply
          0
          • M Muhammad Gouda

            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++;

            D Offline
            D Offline
            DaveyM69
            wrote on last edited by
            #5

            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)

            1 Reply Last reply
            0
            • M Muhammad Gouda

              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

              M Offline
              M Offline
              Muhammad Gouda
              wrote on last edited by
              #6

              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++;

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups