Я получаю следующую неустойчивую ошибку в разных средах. Я подозреваю, что по какой-то причине вызов M SOAP завершается неудачно во время обработки, но я не мог найти причину этого или воспроизвести.
Exception : Microsoft.AnalysisServices.ResponseFormatException: The server sent an unrecognizable response. ---> System.Xml.XmlException: 'Element' is an invalid XmlNodeType. Line 6, position 21.
at System.Xml.XmlReader.ReadEndElement()
at Microsoft.AnalysisServices.XmlaReader.ReadEndElement()
at Microsoft.AnalysisServices.XmlaClient.ReadXmlaError(XmlReader reader)
at Microsoft.AnalysisServices.XmlaClient.ReadXmlaMessages(XmlReader reader, XmlaMessageCollection xmlaMessages)
at Microsoft.AnalysisServices.XmlaClient.CheckForException(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)
at Microsoft.AnalysisServices.XmlaClient.ReadEmptyRoot(XmlReader reader, XmlaResult xmlaResult, Boolean skipResults)
at Microsoft.AnalysisServices.XmlaClient.ReadEmptyRootS(XmlReader reader)
at Microsoft.AnalysisServices.XmlaDataReader..ctor(XmlReader xmlReader, CommandBehavior commandBehavior, Boolean isXmlReaderAtRoot, IXmlaDataReaderOwner owner)
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.XmlaDataReader..ctor(XmlReader xmlReader, CommandBehavior commandBehavior, Boolean isXmlReaderAtRoot, IXmlaDataReaderOwner owner)
at Microsoft.AnalysisServices.AmoDataReader..ctor(XmlReader xmlReader)
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, IEnumerable`1 parameters, Boolean requestImpact, Int64 impactSinceVersion, Server server, ImpactDataSet& impactDataSet)
at Microsoft.AnalysisServices.Tabular.ExecuteUtil.TryExecuteXmla(String xmlaRequest, Database db, Model model, TxManager txManager, XmlaResultCollection& xmlaResults)
at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveOptions saveOptions)
at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveFlags saveFlags)
at Microsoft.AnalysisServices.Tabular.Model.SaveChanges()
at ssasprocessXmla.Program.ProcessModel(Tables tableList, String connectionString, String db) in D:\Users\mbuzzoni\Desktop\mediolanum\Progetti\ProcessFull\Program.cs:line 188
это ConnectionString (я скрываю некоторые значения для конфиденциальности):
Provider=MSOLAP;Data Source=asazure://westeurope.asazure.windows.net/servername;User ID=aaa@aaaaa.onmicrosoft.com;Password=xxxxxxxxxx;Persist Security Info=True;Impersonation Level=Impersonate;Catalog=Model Name
это код:
Server svr = new Server();
ServerConnect(connectionString, ref svr);
if ((svr != null) && (svr.Connected))
{
log.Info("Connected");
}
Model model = svr.Databases[db].Model;
ModelOperationResult res = new ModelOperationResult();
//list of table's name in model from a json in input
foreach (KeyValuePair<Table, TableProp> table in tableList.getTables)
{
try
{
log.Info("Request refresh for table \"" + table.Key.Name+"\"");
model.Tables[table.Key.Name].RequestRefresh((Microsoft.AnalysisServices.Tabular.RefreshType)table.Value.execution_mode);
}
catch (Exception e)
{
log.Error(e.ToString());
}
}
try
{
res = model.SaveChanges();
}
catch (Exception e)//the exception was catched here
{
log.Error("Exception : " + e.ToString());
}
В настоящее время я использую библиотеку Microsoft.AnalysisServices.Tabular версия 13.0.2150.3
кто-нибудь может мне помочь?
По крайней мере, где я могу найти файл, к которому относится исключение (Строка 6, позиция 21)?