Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
aechague
Advocate II
Advocate II

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...) , 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 2
v-xiaotang
Community Support
Community Support

Hi @aechague 

Thanks for reaching out to us.

seems a network connection issue,maybe blocked by a firewall, there may be a problem with DNS or something.

please refer this article, How to Fix a 400 Bad Request Error (Causes and Fixes) (kinsta.com)

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors