private void SaveTokenToTemp(FileItem token) { var filePath = HttpRuntime.AppDomainAppPath + @"\Temp\" + token.FileGuid + ".jpg"; if (File.Exists(filePath)) { return; } // Save the file if it isn't in our temp already var stream = BlobStorageService.GetContentsFromStorageStreamed(token.FileGuid.ToString()); using (var fileStream = File.Create(filePath)) { stream.Seek(0, SeekOrigin.Begin); stream.CopyTo(fileStream); } }