0

I'm executing code(create bitvise ssh server -user) normally(without run as administrator visual studio) then give error like Retrieving the COM class factory for component with CLSID {730D6BA1-01B1-5074-7182-990EF773DB5F} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). while open application using run as administrator visual studio then its working,please advise for how do i set this settings for run this code without run as administrator visual studio.,below is my code snippet.

using BssCfg726Lib;
try
        {
            var cfg = new CBssCfg726("BssCfg726.BssCfg726");
            cfg.SetSite("Bitvise SSH Server");
            cfg.LockServerSettings();
            cfg.LoadServerSettings();

            cfg.settings.access.winAccountsEx.@new.winDomain = "Domain_Name_from_SCI_DEPOLYE1";
            cfg.settings.access.winAccountsEx.@new.winAccount = "Domain_Name_from_SCI_DEPOLYE1";
            cfg.settings.access.winAccountsEx.@new.loginAllowed = cfg.DefaultYesNo.yes;
            cfg.settings.access.winAccountsEx.@new.xfer.mountPointsEx.Clear();
            cfg.settings.access.winAccountsEx.@new.xfer.mountPointsEx.@new.realRootPath = "C:\\Sftp\\User";
            cfg.settings.access.winAccountsEx.@new.xfer.mountPointsEx.NewCommit();
            cfg.settings.access.winAccountsEx.NewCommit();

            cfg.UnlockServerSettings();
            cfg.SaveServerSettings();
        }
        catch (Exception ex)
        {
            throw ex;
        }
  • 1
    Possible duplicate of [How do I force my .NET application to run as administrator?](https://stackoverflow.com/questions/2818179/how-do-i-force-my-net-application-to-run-as-administrator) – BWA Sep 06 '17 at 09:55
  • Your code snippet flies near to be completely useless... – Adriano Repetti Sep 06 '17 at 09:56
  • @Adriano Repetti : How could u said my code snippet is useless..,In short this is my code working while open visual-studio by run as administrator and not working without run as administrator. – Ghanshyam Lakhani Sep 07 '17 at 11:20
  • I agree with @Adriano Repetti, your code does not provide a Minimal, Complete, and Verifiable example https://stackoverflow.com/help/mcve – Isma Sep 07 '17 at 11:36
  • @Isma : now,i update my full code (For creating SFTP USER for bitvise server) – Ghanshyam Lakhani Sep 07 '17 at 11:50
  • @GhanshyamLakhani not that the updated code adds much more over that but the point is that you're asking "how to add something that requires administrative privileges without...administrative privileges?" If elevation is acceptable then you already have an answer in the marked dupe, if not then you should help us to understand why CBssCfg726 fails (not to mention that searching Google for that gives just FEW results then it might not be so obvious even what it is....). You know, the usual steps to reproduce your issue without spending 10 minutes trying to understand what your environment is – Adriano Repetti Sep 07 '17 at 12:11
  • Check the link provided by @BWA... should work. – Isma Sep 07 '17 at 12:31
  • Error reporting for out-of-process COM servers is rarely very good. The error code simply means that the process could not be started, it does not say why. That is supposed to be reported by the process itself, if you are lucky then you'd find something back in the Windows application log. It otherwise fits the bill, the product is sold as an effective solution to remotely administer servers. That of course always requires a user account with sufficient rights to do that. An admin account. Use Bitvise's support channels to get more help. – Hans Passant Sep 07 '17 at 12:57

0 Answers0