I am running a script to upload templates from the same cms server. The script fails when I use the domain name of the machine however it works when I use the localhost as the targeturl parameter. For both cases, I am using the same $user, $password and $folder value. Please find the details below

Case 1: gives error 401

$cmsendpoint = 'http://abc.domain.com' (This is the domain name of the CMS server)

D:\"SDL Web"\bin\client\TcmUploadAssembly.exe /timeout:300 /verbose /uploadpdb:true /targeturl:$cmsendpoint /folder:$folder /username:$username /password:$password .\templating\lib\Templates.merged.dll ![enter image description here]1

Case 2: 200 OK

$cmsendpoint = 'http://localhost'

D:\"SDL Web"\bin\client\TcmUploadAssembly.exe /timeout:300 /verbose /uploadpdb:true /targeturl:$cmsendpoint /folder:$folder /username:$username /password:$password .\templating\lib\Templates.merged.dll

Can anyone guide me on why this occurs? Do I need to make any extra configuration?

Regards, Bimal

  • My question to you if it's working with localhost is there any reason why you looking into that issue on remote server by full DNS name? check the cms endpoint in remote server browser abc.domain.com is accessible? alternatively, you could try to upload from outside of your server, sometimes LB endpoint URL not allowed firewall then it needs either hostfile entry and ensure your IIS you have any specific hostname entries setup?
    – Velmurugan
    Oct 25, 2019 at 11:25
  • Hi Velu, I would like to make the script as flexible as possible so that when I pass a parameter in the shell it can be executed and uploaded to any other environment. Oct 25, 2019 at 11:49
  • This looks like a loopback issue. This normally happens when the server you are working on is getting access with an alias over HTTP. You can refer the post on how to disable loopbackback at stackoverflow.com/questions/63820272/…
    – Paras
    Jul 15, 2023 at 6:28

1 Answer 1


The localhost example is from the remote server in your first example?

What type of auth do you use? Try passing in the username with the domain included, I believe that will help.

  • yeah the localhost example is from the remote server. and regarding the username yes, I am sending the username with domain included. Oct 25, 2019 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.