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. strange behaviour of console application

strange behaviour of console application

Scheduled Pinned Locked Moved C#
helpregexcsharpvisual-studiosysadmin
2 Posts 2 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.
  • S Offline
    S Offline
    stephan_007
    wrote on last edited by
    #1

    hy everyone! i do have a strange problem maybe someone of you knows a solution to this or a good way to find out: i do have a console application (parser) which reads from file, splits the input if necessary and writes the data to outputfiles. the number of outputfiles depends on the input type, meaning if the file is split into parts then there are as many outputfiles as there are parts. the program searches a directory using a search pattern, then splits the file if necessary and performes the parsing and inserts data which match the tokens in the output template and renames the final file from tmp to the final extension. sounds easy. on my system it works well (Vista, Visual Studio 2005). But when I execute the program on a Win2003 Server it looks like some parts of the code are left behind. e.g. i do have two files, the first one is split into two parts, but i do only get one output file. a second file which is parsed afterwards (the instance is still running because i first read all filenames which match the pattern) and is not split returns the one outputfile. so somewhere the second outputfile of the first inputfile is lost, the program doesn't crash it doesn't write a failure into log (because i write a log entry when starting, when finishing and when an exception occures). the start logentry is in the logfile, but no failure nore the finish entry. but both files are moved to the success folder and not to the error folder, so it looks like it was parsed correctly. but after the move statement in the code the logmessage is insert into the logfile. so the code has to be used because the one file is there as well. so to me it looks like as if the parser just sends some input to nirvana and not to the output or "ignores" parts of the code. and the strange thing is, when i run the program on my vista machine, everything is ok. well, the main problem in my case is, i can't install Visual Studio on the server because it is not mine, it's a client's machine i programmed the parser with. so my first idea would be to insert logfile entries when entering one of my functions and one when leaving to see, when the operation suddenly stopps. did anyone of you encounter similar problems during coding console applications in circumstances like me? or does anyone of you have a hint on which could be the reason to help me solve this strange behaviour more quickly? thanks for any advice and hints, because i nevery had behaviours like this before. all my programs i coded bevour could be used no mat

    P 1 Reply Last reply
    0
    • S stephan_007

      hy everyone! i do have a strange problem maybe someone of you knows a solution to this or a good way to find out: i do have a console application (parser) which reads from file, splits the input if necessary and writes the data to outputfiles. the number of outputfiles depends on the input type, meaning if the file is split into parts then there are as many outputfiles as there are parts. the program searches a directory using a search pattern, then splits the file if necessary and performes the parsing and inserts data which match the tokens in the output template and renames the final file from tmp to the final extension. sounds easy. on my system it works well (Vista, Visual Studio 2005). But when I execute the program on a Win2003 Server it looks like some parts of the code are left behind. e.g. i do have two files, the first one is split into two parts, but i do only get one output file. a second file which is parsed afterwards (the instance is still running because i first read all filenames which match the pattern) and is not split returns the one outputfile. so somewhere the second outputfile of the first inputfile is lost, the program doesn't crash it doesn't write a failure into log (because i write a log entry when starting, when finishing and when an exception occures). the start logentry is in the logfile, but no failure nore the finish entry. but both files are moved to the success folder and not to the error folder, so it looks like it was parsed correctly. but after the move statement in the code the logmessage is insert into the logfile. so the code has to be used because the one file is there as well. so to me it looks like as if the parser just sends some input to nirvana and not to the output or "ignores" parts of the code. and the strange thing is, when i run the program on my vista machine, everything is ok. well, the main problem in my case is, i can't install Visual Studio on the server because it is not mine, it's a client's machine i programmed the parser with. so my first idea would be to insert logfile entries when entering one of my functions and one when leaving to see, when the operation suddenly stopps. did anyone of you encounter similar problems during coding console applications in circumstances like me? or does anyone of you have a hint on which could be the reason to help me solve this strange behaviour more quickly? thanks for any advice and hints, because i nevery had behaviours like this before. all my programs i coded bevour could be used no mat

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      No idea. But make sure that .net is updated?

      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