How to Run K2 API as Service Account

  • 11 March 2014
  • 0 replies
  • 1 view

Badge +4

I have a site where windows auth and impersonation are true.  Most everything in the site needs to run as the logged in user.  However, I have a need to call the goto method and I'd prefer to not give my users admin server rights which apparently the goto method requires.  How can I configure the connstr to use the app pool account which does have admin rights instead of the logged in user?  I'd prefer to not set the userid and password in code for security purposes.

 

SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder builder = new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();
builder.Integrated = true;
builder.IsPrimaryLogin = true;
builder.Authenticate = true;
builder.EncryptedPassword = false;
builder.Host = K2HostServer;
builder.Port = K2HostServerPort;
builder.SecurityLabelName = "K2";
if (domain != "")
{
    builder.WindowsDomain = domain;
}
if (username != "")
{
    builder.UserID = username;
}
if (pwd != "")
{
    builder.Password = pwd;
}

0 replies

Be the first to reply!

Reply