Beispiel #1
0
        public async Task <FileStreamResult> GetCert()
        {
            try
            {
                var fileName = HttpContext.User.Identity.Name + ".p12";
                var blob     = await _blobDataRepository.GetDataAsync(fileName);

                Stream blobStream = blob.AsStream();
                return(File(blobStream, System.Net.Mime.MediaTypeNames.Application.Octet, fileName));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }
Beispiel #2
0
        private async Task <bool> TestBlobDataRepository(StringBuilder sb)
        {
            try
            {
                await _blobDataRepository.GetDataAsync();
            }
            catch (Exception e)
            {
                AddError(sb, $"The 'AccessDataRepository' throws an error {e}.");
                return(true);
            }

            AddText(sb, "The 'AccessDataRepository' checked.");
            return(true);
        }