none
ClickOnce is unable to start the application RRS feed

  • Question

  • I’m working on a “Windows Forms” application which utilize ClickOnce technology. we are using Windows Task Scheduler to start the .application file on Windows Server 2012 R2. normally, ClickOnce service (dvsvc.exe) start and in turn it lunch the app. Suddenly, ClickOnce service is unable to start/ lunch the application. It just keep running in the background as Task manager show.

    I found below information message under Application log, right before the failure:

    Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. No user action is required. 

     DETAIL -

     8 user registry handles leaked from \Registry\User\S-******************************

    Process 7876 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\S-******************************

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************\Software\Microsoft\Windows NT\CurrentVersion

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\S S-******************************\Software\Microsoft\Windows\CurrentVersion\Internet Settings

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************\Control Panel\International

    Process 7876 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************\Control Panel\International

    Process 1544 (\Device\HarddiskVolume2\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe) has opened key \REGISTRY\USER\ S-******************************\Software\Microsoft\Windows\CurrentVersion\Explorer

     

    Re-install the application enables Task Scheduler in turn ClickOnce from start it but it will stop working every day around 5 p.m. each time I noticed the above message under "Application log"

    Restart the server temporarily solves the issue but it comes back again within few weeks.

    Please advise? 


    • Moved by Stanly Fan Wednesday, August 2, 2017 8:23 AM
    Tuesday, July 11, 2017 4:23 PM

All replies

  • Hi SWE84,

    Sorry for the late reply.

    >>Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.

    In fact, this error is not associated with clickonce itself, the problems would occur when profiles were not fully unloaded because some process, which could be any driver, application, or service, would still maintain hooks into a users profile registry hive, when the system was shut down or a user logged off.  It was mainly a problem that was seen in roaming profile situations, but it also happened on standalone systems.  
    The result would be that the profile would be corrupted and the next time that user logged on they would receive a message similar to "Windows cannot log you on because your profile cannot be loaded."
    Microsoft developed a utility called UPHClean, which, when installed, runs automatically when a system is shut down or a user logs off. It checks for any service, application, or driver that may still have the users registry hive open and cleans them up, thereby letting a users profile unload cleanly.

    For more messages please refer to the following link:

    Error 1530, User Profile Service in Event Viewer

    Windows detected your registry file is still in use by other applications or services

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Edited by Stanly Fan Friday, July 14, 2017 3:03 AM
    • Proposed as answer by Stanly Fan Tuesday, July 18, 2017 8:58 AM
    Friday, July 14, 2017 3:02 AM
  • Hi Stanly,

    Thanks for your reply.

    Based on below article, UPHClean functionality is included in Windows Server 2012 R2.

    I’m not sure how installing it would help fix the issue.

    UPHClean for windows server 2012 r2

    Is there are anything else we may try to remedy the issue?

    We are also evaluating other technologies beside ClickOnce, for example: Windows Services, PowerShell Script. As it meant to deploy an application to multiple end users. We only have one instance of the application running on a single server.

    Basically the application performs many jobs based on an internal scheduler (read/write to files, read/write to DB, log events…).

    Are there anything else we may consider to do the above in a small team environment?

    Thank you,

    Fady


    Monday, July 31, 2017 8:41 PM
  • Hi Fafy,

    For your description, I suggest you can ask your question to Windows Server Forum.

    Regards


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 2, 2017 8:23 AM