Unable to publish FileBasedProject with windows username+password authentication

Hi,

I'm happy to see that I can already authenticate with windows username+password when creating a new instance of TranslationProviderServer(). I can read TMs, add them to the project etc. (Here I specify: useWindowsAuthentication=false)

However, it seems, that using the same credentials, I cannot publish the project to a GS 2017 server like:

var result = project.PublishProject(new Uri(server), useWindowsAuthentication = false, windowsUserName, windowsPassword, targetOrganization, (sender, args) => { });

I keep getting an "Authentication failed" error. If I use a non-windows SDL account, then it works. But not with a windows account.

(using useWindowsAuthentication=true I get "value cannot be null")

Can you please help? Is this supported at all? I remember that in the old times, TranslationProviderServer didn't work with explicit windows credentials either. But it seems to work now. That's why I was hoping that publishing also works.

I have Studio 2017 SR1 14.1.10011.20356, and GS: 14.2.7902.0 - SR1.

Thanks,

Tamas

Parents
  • Hello  ,

    I did some investigation and I was able to reproduce the issue also on my side, it seems that the problem comes from Studio, so I announced the Studio team regarding this error. Unfortunately, in this moment there is no workaround for this issue until it will be fixed in the API.


    With kind regards,
    Florentina-Lucia Caputa

    With kind regards,

    Florentina Caputa

  • Im facing the same issue... Im trying to publish to a GroupShare server, with Windows credentials. Interestingly the SDK help files indicate (http://producthelp.sdl.com/SDK/ProjectAutomationApi/2017/html/b280b7ec-6f15-4671-bc36-b739795789f3.htm): 

    The following parameters are required in order

    • Uri of the server in the form "protocol://address:portnumber". The protocol will he either "http" or "https", the address will be the location of the server, and the port number will be the port you set project server up on (default: 80). For example http://projectserver.mycompany.com:80
    • a boolean flag to indicate if you wish lo login with windows security
    • The user name you wish to log in as. (leave blank for windows authentication)
    • The password of the user. (leave blank for windows authentication)
    • The location on the server to which the project should be published.
    • A delegate function is needed should you require progress information or cancelation support. Enter null if these are not required

    I find it bizarre that I dont need to enter credentials in this case. In any case, when I do put credentials, I keep getting a "UserName" field is empty response. 

    Also, when I publish manually via the SDL interface, the Server properties allow me to specify to authenticate with a different (Windows) user. What would be the API equivalent of that option? 

    Have there been fixes to the API in this case? Im currently using SDL 2017... Is this fixed with 2019? 

  • Hi ,

    I was able to publish the project using this (Studio 2019):

    fileBasedProject.PublishProject(
    new Uri("Gs dev link"),
    true,
    "",
    "",
    "/",
    (sender, args) => { });

    or:

    fileBasedProject.PublishProject(
    new Uri("Gs dev link"),
    true,
    "windows user name",
    "windows password",
    "/",
    (sender, args) => { });

    Can you please tell me if you are able to publish the project?

  • Hello Andrea, I still get this error message: 

    User name: domainname\rmonette
    User password: XXXXXX
    ////////-->Log entry point<--////////
    The call to functionality 'PublishSdlProjectToGroupShare' by user generated an error on: Tuesday, September 3, 2019, 09:42:53.
    Message: Value cannot be null.
    Parameter name: userName
    Stack trace: at Sdl.ProjectAutomation.FileBased.FileBasedProject.PublishProject(Uri serverUri, Boolean useWindowsAuthentication, String userName, String password, String organizationPath, EventHandler`1 progressEventHandler)
    ////////-->Log exit point<--////////

    What should be the format of the user name/pwd in this cas? 

    Ive seen threads where they add keys to those fields... like this: 

    string strUserName = string.Format("user={0}", reqPublishProjectToGroupShare.UserName);
    string strUserPassword = string.Format("password={0}", reqPublishProjectToGroupShare.Password);

    R

Reply
  • Hello Andrea, I still get this error message: 

    User name: domainname\rmonette
    User password: XXXXXX
    ////////-->Log entry point<--////////
    The call to functionality 'PublishSdlProjectToGroupShare' by user generated an error on: Tuesday, September 3, 2019, 09:42:53.
    Message: Value cannot be null.
    Parameter name: userName
    Stack trace: at Sdl.ProjectAutomation.FileBased.FileBasedProject.PublishProject(Uri serverUri, Boolean useWindowsAuthentication, String userName, String password, String organizationPath, EventHandler`1 progressEventHandler)
    ////////-->Log exit point<--////////

    What should be the format of the user name/pwd in this cas? 

    Ive seen threads where they add keys to those fields... like this: 

    string strUserName = string.Format("user={0}", reqPublishProjectToGroupShare.UserName);
    string strUserPassword = string.Format("password={0}", reqPublishProjectToGroupShare.Password);

    R

Children