Config File Corruption (1 Viewer)

macmr

Portal Pro
August 21, 2011
105
17
Home Country
I have just had an issue where my Mediaportal.exe.config file became corrupt after a hard reset. I have fixed it by copying the contents of the Configuraion.exe.config file.

I have seen where other people are using a batch file to start up MP by copying a known good copy of Mediaportal.exe.config to eliminate possible PC reset corruption problems

Can someone explain why there are two files (Mediaportal.exe.config & Configuraion.exe.config) if they are essentially the same

Also do these files get updated at any time while using MP

Thanks
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi

    Can someone explain why there are two files (Mediaportal.exe.config & Configuraion.exe.config) if they are essentially the same
    There are two CONFIG files because there are two EXE files.

    As the file extension (.config) suggests, these files are intended to contain configuration for the associated EXE file. So, MediaPortal.exe.config contains configuration for MediaPortal.exe (MediaPortal), and Configuration.exe.config contains configuration for Configuration.exe (MediaPortal Configuration).

    The content is not intended to be the same.

    Also do these files get updated at any time while using MP
    Not by MP or MP Config, because MP's configuration (ie. all the settings you configure in MP Config) is stored in MediaPortal.xml. However they're read by the CLR when the application is started and/or running.

    Note that this answer only applies for MP. Some applications store both their custom configuration as well as the CLR application configuration in the CONFIG file.

    For more information about CONFIG files:
    http://www.codeproject.com/Articles/616065/Why-Where-and-How-of-NET-Configuration-Files
    https://msdn.microsoft.com/en-us/library/1xtk877y(v=vs.110).aspx
    https://msdn.microsoft.com/en-us/library/ms229689(v=vs.90).aspx
     

    macmr

    Portal Pro
    August 21, 2011
    105
    17
    Home Country
    Ok so even though copying the contents from Configuration.exe.config to Mediaportal.exe.config fixed the "side by side" error I should be using the correct Mediaportal.exe.config. Where would I get this for MP 1.14?

    It would appear from your reply that there really is no reason that I can't use a batch file to copy known good files to prevent this problem happening again when a hard PC reset does funny things

    I also had a corrupt gentle.config file but I think this file does get updated on occasion is that correct

    Thanks
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Where would I get this for MP 1.14?
    https://github.com/MediaPortal/Medi...ediaportal/MediaPortal.Application/App.config

    Note that the version number in the file changes for each release, and we also sometimes modify other parts of the file. Therefore you cannot use that version of the file for other versions of MediaPortal.

    It would appear from your reply that there really is no reason that I can't use a batch file to copy known good files to prevent this problem happening again when a hard PC reset does funny things
    If you want to set up such a recovery system then that's your prerogative. However, please be aware that absolutely any file - core OS files, driver files, program files, configuration files... - that any process had loaded before power loss can be corrupted. Therefore with the greatest respect, I think your stated expectation that you could prevent such a problem from happening again via a mechanism like the one you described is unrealistic.

    I'm not saying that such a recovery system would be completely useless. Rather, my point is simply that it would have limited utility. It may help you on certain occasions, but it certainly wouldn't prevent the problem. My advice would be to focus on preventing the PC from unexpectedly losing power in the first place rather than on recovery. If you had a power outage then there's obviously not much you can do short of getting a UPS. On the other hand, if you intentionally hard reset your PC - a practice I'd never recommend except as an absolute last resort - try to find a different resolution for the situation that caused you to choose to do that.

    I also had a corrupt gentle.config file but I think this file does get updated on occasion is that correct
    No, not really. The MP (client) copy of gentle.config is created [by copying from TV Server] when missing. However it's not updated under any normal/regular circumstances. In other words: neither MP nor TV Server would automatically notice or fix a corrupt gentle.config.
     

    macmr

    Portal Pro
    August 21, 2011
    105
    17
    Home Country
    Thanks for the pointer to the config file

    Yes I agree about the hard reset except as I try to fix the issues from my recent thread "PC Crashes While Recording" I don't have much option as Ctrl+Alt+Del won't work.

    The only issues I have had (only twice) when doing a hard reset have been with the above mentioned config files so at least a batch file may eliminate any issues with that and prevent the need to spend time to get it running again

    Thanks
     

    Users who are viewing this thread

    Top Bottom