Jump to content

Wohli

Members
  • Content Count

    6
  • Joined

  • Last visited

About Wohli

  • Rank
    Member

Profile Information

  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am glad I could help and your application saved me way more time than I spent tracking down that issue.
  2. Tried to reproduce that behaviour at my machine (Win10) at home now and same error appears no matter if running as administrator or not. Wrote a small console app at work and tried to create the SWCharGen folder, which works with and without administrative permissions. Version 1.7.0.1 is able to create that folder too without administrative rights. I guess, without knowing the code, that the call is not made to create that folder, because the exception occurs when trying to read the settings file from that folder and not when creating it. No UnauthorizedAccessException is thrown, instead the DirectoryNotFound exception, so it should not be a permission problem. I think you are using a construct like: if(!Directory.Exists(path)) { Directory.CreateDirectory(path); } Could you verify that the path variable contains the proper string and maybe not only the path for the app folder or something like this?
  3. Just create a SWCharGen directory in C:\Users\<username>\AppData\Roaming
  4. The registry key "DataFolder" is properly set to C:\Users\<user name>\AppData\Roaming\SWCharGen. The problem is the app cannot create the SWChargen directory, although I run the app in administrative context. As you assumed I am able to create that directory by myself, because I am admin of my working machine and have the write permissions for that folder. But it is strange that I am not getting warned, as you mentioned, when the app tries to create the SWCharGen folder and fails. The app tries to start and simply stops working without any message. No loading screen appears, no error message, nothing. On the other hand could it be that you are using the value of the reg key as a string to create the directory? If that is the case this could be the real problem. The app data directory is one of those special folders that should be treated differently in .NET. Get the app data folder with var appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) and than use Path.Combine(appDir, @"\Roaming\SWCharGen\") for creating the directory. If that is not the case forget what I said . To help reporting errors it would be nice to have a file logging mechanism implemented that dumps exceptions (with all that inner exceptions and stack trace) to a file. If you have some time left have a look at log4net. Just get the nuget package and with a few lines of code you have your file appender ready. Anyway the workaround is to create the SWCharGen folder manually and the app starts. And a big thanks from me for all that time you spent coding this app. Where could I donate? Could not find it anymore anywhere.
  5. Can confirm that this happens with the Manual Install when the AppData folder is empty, but I think it doesn't matter whether Manual or Web. The problem is the Roaming folder and the event viewer gave me the hint. The app crashes when trying to read from the settings with a System.TypeInitializationException Stack: at SWCharGen.MySettings.get_CurrentTranslate(), but the underlying exception seems to be a System.IO.DirectoryNotFound exception, found in the Windows Error Reporting Information. The App cannot create the SWCharGen folder in "C:\Users\<username>\AppData\Roaming" and tries to read the settings from this folder. Tested on Windows 8.1 with or without administrator privileges and UAC turned on and off.
×
×
  • Create New...