Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tridion UI - "Bad Request"

Tags:

tridion

I have installed Tridion UI 2012 folowing to the documentation and everything seems fine and I can use the UI features such as create a new page, modify an existing page and so on but everynow and then (I haven´t been able to limit when or why) I receive a "Bad Request" error when clicking the "Update Preview". The detailed error is displayed in the Event Viewer:

Log Name:      Tridion
Source:        Tridion Publishing
Date:          10/07/2012 12:03:37
Event ID:      100
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ZZZZZ

Description:
Unable to update or add Binaries using OData Service.
An error occurred while processing this request.
BadRequest


Component: Tridion.SiteEdit.FastTrackPublishing
Errorcode: 1003
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at System.Data.Services.Client.DataServiceContext.SaveResult.<HandleBatchResponse>d__1e.MoveNext()
   at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse()
   at System.Data.Services.Client.DataServiceContext.SaveResult.EndRequest()
   at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)
   at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.SaveBinaries(RenderedItem renderedItem, ContentDeliveryService service)
   at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.SaveBinaries(RenderedItem renderedItem, ContentDeliveryService service)
   at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable`1 publishedItemsInfo, TcmUri publishingTargetId)
   at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable`1 publishedItemsInfo, TcmUri publishingTargetId)
   at SyncInvokePreview(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Have you seen this error before? Any ideas how to avoid/repair it?

Regards Emma

like image 925
Emma Varona Avatar asked Jul 10 '12 10:07

Emma Varona


2 Answers

A little late to the party, but in my case this was caused by binaries that were too big. You can pinpoint the issue in more detail by following the steps: (Tridion 2011, SP1, HR2, but I assume this is also valid for 2013)

  1. On the CMS server, open the TcmServiceHost.exe.config and uncomment the body of the following tag:

    <system.diagnostics><sources>

  2. Locate the <sharedListeners> tag and create the directory that is mentioned in the initializeData attribute (or update this setting)

  3. Restart the TcmServiceHost service and click 'Update Preview'. The logfile shows up and you can open it in the SvcTraceViewer

Find the red entry and go from there.

To allow bigger binaries (consider the performance cost!) go to your OData Session Preview Service and do the following:

  1. Open the web.config and locate the <bindings><webHttpBinding> (the relevant binding of course, but usually this is the webHttpBinding.)

  2. Add a binding with the following properties (inside the <webHttpBinding> element):

    <binding name="AdustedBindingConfiguration" maxReceivedMessageSize="2097152000" maxBufferSize="2097152000"> <readerQuotas maxArrayLength="81920" maxBytesPerRead="5120" maxDepth="32" maxNameTableCharCount="81920" maxStringContentLength="2097152" /> </binding>

  3. Locate the <services><service> tag and find the relevante service ('Tridion.ContentDelivery.Webservice.ODataService' and update the bindingConfiguration attribute to match the name of the newly added binding (AdjustedBindingConfiguration in this case)

  4. Hit 'Update Preview' again

like image 173
Albert Romkes Avatar answered Oct 11 '22 09:10

Albert Romkes


I haven't seen exactly this one, but something similar when my Session Preview Content Delivery Endpoint URL was misconfigured.

Reading the error description I would guess your endpoint URL (the Session Preview oData service) is up and running, but it might have some other issues. I would checkout if you can manually browse that oData service and if that looks okay perhaps check out its logfiles for more details.

On IIS this typically means an issue with the correct jars and DLLs, please check the following steps for that:

  1. For the oData website, ensure DLLs are copied from the User Interface folder \Content Delivery\roles\webservice\dotNET\webapp\x86_64.zip\bin and jars are updated from \Content Delivery\roles\webservice\dotNET\webapp\x86_64.zip\bin
  2. For the oData website, verify if web.config nodes "bindingConfiguration" attribute are correct
  3. For Preview website, ensure DLLs are copied from the User Interface folder \Content Delivery\roles\web\dotNET\webapp\x86_64.zip\bin and all jars are replaced with contents from the User Interface folder \Content Delivery\roles\web\dotNET\webapp\x86_64.zip\bin\lib
like image 34
Bart Koopman Avatar answered Oct 11 '22 09:10

Bart Koopman