5

The admin users are able to create multimedia component using web 8 Core service of Tridion. But for non-admin users, there is an error as:

The remote server returned an unexpected response: (400) Bad Request.

This error occurs at UploadBinaryContent method call:

//streamclient is an object of StreamUploadClient class
AccessTokenData accessToken = client.GetCurrentUser();
if (accessToken.ExpiresAt <= DateTime.Now.AddMinutes(2))
{
  objfilestream = new FileStream(extractToFolder.ToString() + "\\" + fileToUpload.Name, FileMode.Open, FileAccess.ReadWrite);
  Stream stream = objfilestream;
  string filepath = streamClient.UploadBinaryContent(accessToken, stream);
}

Please can you help with this issue, so that non-admin users can also create multimedia components using web 8 core service.

2
  • 1
    Have you checked the publication and folder level permission for non-admin users? If they don't have component management permission at publication level or if they don't have write permission at folder level then the creation can fail.
    – Hiren Kaku
    Commented Jan 4, 2017 at 6:01
  • As Hiren says, this may be a security issue for the non-admin user. Can you try logging-in to the CME interface as that user (on one with the same permissions) and creating one manually in the same folder? Commented Jan 4, 2017 at 8:22

1 Answer 1

2

Increase buffer size limit in TcmServiceHost.exe.config, you need to add a maxBufferSize parameter (it is set to 500KB here):

<binding name="StreamUpload_netTcpBinding" maxBufferSize="524288" maxReceivedMessageSize="2147483647" transferMode="StreamedRequest" receiveTimeout="00:30:00" />

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.