Tridion UI - "Bad Request"
Asked Answered
D

3

7

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

Devoir answered 10/7, 2012 at 10:24 Comment(0)
R
4

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

Resplendent answered 2/12, 2013 at 15:28 Comment(2)
Confirmed issue and this solution in Tridion 2013 SP1Megilp
Increasing the webHttpBinding fixed the issue for me. Also see Albert's excellent troubleshooting guide at albertromkes.com/2013/01/24/…Ruthie
W
1

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
Western answered 10/7, 2012 at 10:43 Comment(10)
Thank you for your answer Bart, I have indeed the oData service apparently working fine, i'll double check though.Devoir
Make sure you set your log levels to DEBUG and walk through the cd_core.log, I have seen this error before (can't remember exact cause) and fixed it by going through the webservice log and fixing whatever error was in there (something with the storage conf I believe)Uneventful
Thanks Nuno, I do get this error in my <webservice> cd_core.log: ERROR SessionManagerImpl - Could not clean session storage after session expired! But I am not sure if these both errors are related as they come up at different times...Devoir
if it cannot clean the storage, I think that indicates a database issue, which could certainly be related as your initial error message is indicating that it cannot update or add binaries, which is also a database action I think. Is the database correctly configured in the SessionWrapper in your cd_storage_conf.xml in the oData website, and is that the same one as specified in the storage conf of your staging site?Western
Thanks Bart, indeed both cd_storage_conf have the correct SessionWrapper configuration, I followed the instructions in the live content and I see changes in the database when updating pages using the UI...until the "Bad request" error comes up.Devoir
I checked with customer support and this error is only known when there is indeed an issue with the oData website or Preview website configuration. They mention double checking the correct jars and/or dlls are copied to both those locations, what type of oData service are you using, Apache or IIS?Western
I am using IIS. I'm also convinced that there is a problem with the jars and dlls but the trouble is finding the correct ones as there're different version within the UI installerDevoir
added some things to check for IIS in my answer, hope that helps, if it doesn't you are probably better of logging a support ticket so they can check out the config with you as it needs more attention then.Western
We've had this error too, and im willing to bet that it's the one Bart Koopman mentions. I believe it was due to an erroneous svc file. Out of the top of my head, it was something with the odata.svc or access_token.svc. Someone else solved it for me, so I'm sorry for being this vague. Maybe it'll put you in the right direction though.Milligan
Did you manage to solve this? I have this issue but it only occurs when a binary over a certain size is included within the page (~2mb). Not sure why though - cd_deployer_conf.xml for UI deployer service has the following set - <HTTPSReceiver MaxSize="104857600" Location="C:\tridion\incomingui" InProcessDeploy="true"/> and web.config has <httpRuntime maxRequestLength="102400" />. Anyone come across this?Alehouse
H
1

For me, the solution was to increase maxReceivedMessageSize to "524288000" and maxBufferSize to "524288000" in the standard web.config of the Session Preview Webservice

<webHttpBinding>
                <binding name="HttpBinding" maxReceivedMessageSize="524288000" maxBufferSize="524288000">
                    <readerQuotas maxArrayLength="81920" maxBytesPerRead="5120" maxDepth="32" maxNameTableCharCount="81920" maxStringContentLength="2097152" />
                    <security mode="TransportCredentialOnly">
                        <transport clientCredentialType="None" />
                    </security>
                </binding>
Hibernaculum answered 2/4, 2015 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.