Forum Discussion

aechague's avatar
aechague
Advocate II
3 years ago

The remote server returned an error: (400) Bad Request. when using XMLA + TOM

Hi, 

I'm doing some test to create derivated datasets from a starting dataset, clonning and editing them programatically (https://learn.microsoft.com/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=asallproducts-allversions) , to maintain them in a future as a synced copy with the original dataset, with some differences in particular (remove some tables, changing the source of other tables). Until now, these are the steps followed:

 

1.- Create an empty database

2.- Clone the model from the source database

3.- Remove some relationships and tables 

4.- Do a refresh (manually)

An they worked successfully. When I try a similar sequence with a populated model the process fails with this Bad Request (400):

 

1.- Create an empty database

2.- Clone the model from the source database

3.- Do a refresh (manually)

4.- Remove some relationships and tables  --> Here it fails

 

The complete message error is: 

ConnectionException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.AnalysisServices.HttpRequestResponseExtensions.GetResponseWithErrorHandling(HttpWebRequest httpWebRequest, Boolean isPbiPremium)
at Microsoft.AnalysisServices.HttpStream.WaitForAndUpdateHttpResponseContainingXmlaPayload()
at Microsoft.AnalysisServices.HttpStream.GetResponseStream()
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.ASAzureUtility.ThrowConnectionException(WebException ex, AsInstanceType asInstanceType)
at Microsoft.AnalysisServices.HttpStream.GetResponseStream()
at Microsoft.AnalysisServices.HttpStream.GetResponseDataType()
at Microsoft.AnalysisServices.CompressedStream.GetResponseDataType()
at Microsoft.AnalysisServices.XmlaClient.EndRequest(Boolean useBinaryXml)
at Microsoft.AnalysisServices.Core.Server.EndXmlaRequest()
at Microsoft.AnalysisServices.Core.Server.EndXmlaRequestWithReader(XmlaResultCollection& results)
at Microsoft.AnalysisServices.Core.Server.ExecuteReader(String command, XmlaResultCollection& results, IDictionary properties, Boolean wrapCommand)
at Microsoft.AnalysisServices.Tabular.ExecuteUtil.RunCommand(String commandText, Boolean requestImpact, Int64 impactSinceVersion, Server server, ImpactDataSet& impactDataSet)
at Microsoft.AnalysisServices.Tabular.ExecuteUtil.TryExecuteXmla(Model model, String xmlaRequest, XmlaResultCollection& xmlaResults)
at Microsoft.AnalysisServices.Tabular.Model.SaveChangesImpl(SaveOptions options)

 

and it occurs after several minutes of doing something (processing?)

Any Ideas?

 

Regards

Alexis

 

 

 

2 Replies

    • aechague's avatar
      aechague
      Advocate II

      Hi!, 

      Thanks for your answer. I believe is not related (at leas directly) with network issues. On the same line of the "service internal timeout" I found that when I execute all changes (example, remove multiple relationships) at once, the error appears more frequently. Instead, commiting changes one by one i'm able to apply the changes for the model with data. 
      That until now.

      Regards

      Alexis