Я пытался решить проблему с получением / загрузкой файлов.Основной причиной ошибки была файловая служба, не работающая на тестовом сервере.Но работает на моем локальном компьютере.
Попытка выяснить, что блокирует или ограничивает запуск этой службы на тестовом сервере.
Вот исключение:
{"":["System.OperationCanceledException: The operation was canceled.
at System.Net.Http.HttpClient.HandleFinishSendAsyncError(Exception e,
CancellationTokenSource cts)
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask,
HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at System.Net.Http.HttpClient.GetStringAsyncCore(Task`1 getTask)
at Amazon.Runtime.Internal.Util.AsyncHelpers.<>c__DisplayClass1_1`1.
<<RunSync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Amazon.Runtime.Internal.Util.AsyncHelpers.ExclusiveSynchronizationContext.BeginMessageLoop()
at Amazon.Runtime.Internal.Util.AsyncHelpers.RunSync[T](Func`1 task)
at Amazon.Util.AWSSDKUtils.DownloadStringContent(Uri uri, TimeSpan timeout, IWebProxy proxy)
at Amazon.Util.EC2InstanceMetadata.GetItems(String relativeOrAbsolutePath, Int32 tries, Boolean slurp)
at Amazon.Util.EC2InstanceMetadata.get_IAMSecurityCredentials()
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials()
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials()
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentialsAsync()
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
at Sms.Office.PacmsTri.Services.File.FileStorage.WriteFileAsync(Stream file, String contentType, String filename, CancellationToken token) in C:\\agent\\_work\\1\\s\\source\\PacmsTri\\Services\\File\\FileStorage.cs:line 57
at Sms.Office.PacmsTri.Services.ReportServer.UploadAndGetFileStorageIdAsync(Stream outputStream, String fileName, String generatedfilename) in C:\\agent\\_work\\1\\s\\source\\PacmsTri\\Services\\ReportServer.cs:line 161
at Sms.Office.PacmsTri.Areas.Pacms.Controllers.PurchaseShipListController.EstimateCondition_Send(String qNo, Int32 orderByNum, String CcNames, String CcEmails, String ToSupplier, CancellationToken token) in C:\\agent\\_work\\1\\s\\source\\PacmsTri\\Areas\\Pacms\\Controllers\\PurchaseShipListOrder.cs:line 2792"]}