Why my code is not run without run as administrator visual studio?

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;
        }
c#
asp.net
visual-studio
server
asked on Stack Overflow Sep 6, 2017 by Ghanshyam Lakhani • edited Sep 7, 2017 by Ghanshyam Lakhani

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0