4 Replies - 123 Views - Last Post: 13 May 2019 - 07:05 AM Rate Topic: -----

#1 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 112
  • Joined: 16-January 13

Where to put error.txt file?

Posted 13 May 2019 - 06:38 AM

I created an error.txt file to save catches error as code below.

Catch ex As Exception
            SaveTextToFile("Error in Main_load" & ex.ToString, "Error.txt")//savetexttofile is a function
 End try 


Also, I used the following step to release exe file.
1) Hit F5 to run,
2) Copy entire contents in bin/debug/*.* to a file server, including all dll files and exe file,
3) Make a shortcut to point to the exe file.

Question:

Where to put error.txt file so that after running and releasing I can view error.txt file on the file server for debugging?

Is This A Good Question/Topic? 0
  • +

Replies To: Where to put error.txt file?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14994
  • View blog
  • Posts: 59,870
  • Joined: 12-June 08

Re: Where to put error.txt file?

Posted 13 May 2019 - 06:49 AM

Where/how is the app being deployed?
Was This Post Helpful? 0
  • +
  • -

#3 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2836
  • View blog
  • Posts: 11,132
  • Joined: 03-December 12

Re: Where to put error.txt file?

Posted 13 May 2019 - 06:54 AM

So this is for a desktop application?

Add a configuration setting for a file location and have that point to a fileshare location would be my first thought.
Was This Post Helpful? 0
  • +
  • -

#4 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 112
  • Joined: 16-January 13

Re: Where to put error.txt file?

Posted 13 May 2019 - 06:55 AM

For some reasons(Do want to bother IT guys), I did not create a installation project but just do the following steps to deploy.


1) Hit F5 to run,
2) Copy entire contents in bin/debug/*.* to a folder of a file server, including all dll files and exe file,
3) Make a shortcut to point to the exe file.

Yes, it is desktop app.

This post has been edited by aspfun: 13 May 2019 - 06:56 AM

Was This Post Helpful? 0
  • +
  • -

#5 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14994
  • View blog
  • Posts: 59,870
  • Joined: 12-June 08

Re: Where to put error.txt file?

Posted 13 May 2019 - 07:05 AM

You can write it where ever.. typically I try and write it to a folder near the .EXE, but the 'local roaming' works as well for a temp folder.. or even c:-> temp.

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1