1
與here同樣的問題。我正在關注simple sample to export the IOT設備列表以blob存儲,但在ExportDevicesAsync上遇到內部服務器錯誤。 我正在使用北歐,但我不認爲更換服務器確實是一個有效的修復程序。Azure IOT ExportDevicesAsync內部服務器錯誤
所有我找回的是:
An exception of type 'Microsoft.Azure.Devices.Common.Exceptions.ServerErrorException' occurred in mscorlib.dll but was not handled in user code
Additional information: {"Message":"ErrorCode:ServerError;InternalServerError","ExceptionMessage":"Tracking ID:c51dad0227604f21b9af3e8acbd77f4c-G:5-TimeStamp:06/03/2017 19:56:10"}
示例代碼(屏蔽連接字符串和鍵)
internal async Task GetAllDevices()
{
var ConnectionString =
"HostName=xxxx.azure-devices.net;SharedAccessKeyName=xxxxowner;SharedAccessKey=xxxxLr3xxxxXKKILLxxxxx";
registryManager = RegistryManager.CreateFromConnectionString(ConnectionString);
var key = "https://xxxxotblob1.blob.core.windows.newt/?sv=2016-05-31&ss=bfqt&srt=sco&sp=rwdlxxxxup&se=2017-06-04T04:42:14Z&st=2017-06-03T20:42:14Z&spr=https&sig=kxxxxxxxxxxxxxxx%3D";
JobProperties exportJob = await registryManager.ExportDevicesAsync(key,"device.txt", false);
while (true)
{
exportJob = await registryManager.GetJobAsync(exportJob.JobId);
if (exportJob.Status == JobStatus.Completed ||
exportJob.Status == JobStatus.Failed ||
exportJob.Status == JobStatus.Cancelled)
{
break;
}
await Task.Delay(TimeSpan.FromSeconds(5));
}
}
我在這裏幹什麼什麼了嗎?有沒有辦法找到我錯過的真正例外?
哪一行導致此異常? –
@ RitaHan-MSFT在線:JobProperties exportJob =等待registryManager.ExportDevicesAsync(key,「device.txt」,false); – Damo