How to know if telemetry and error reporting in Windows Insiders are able to connect to their corresponding servers [on hold]

I use Windows Insider fast ring and I want to make sure my network is not blocking any connection that Microsoft uses for telemetry services and error reporting, or any other services that is used to gather information from Insiders to improve Windows. I don’t want my work and tests be for nothing but for some reasons I need to make sure that my computer is properly sending data to Microsoft. I’m in a ME country right now so I’m worried about possible network filtering/blocking.

is there anyway to make sure the connection to Microsoft servers responsible for telemetry, error reporting etc etc in Windows Insider are working properly?

*I emphasize on Insider part because in order to download or see the new build notification in my Windows update, i need to use a VPN (any other updates are downloaded fine), so there is a blockade either from my side or Microsoft’s. so i just need to be sure if my Windows can send data to Microsoft without that VPN connection.

Progress reporting of a hierarchy of operations

I needed a way to track and report the progress of a hierarchy of operations, the only example I could find on the web is progressive but it’s written in Python, a language I don’t know.

So I just wrote my own from scratch in C# and I would like you to review it.

enter image description here

The example program, a console application:

  • generates a trivial example
  • prints the output to the console
  • there is an issue in GetProgressBar, I need to care about dividing by zero, I don’t know why

Code:

using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks;  namespace ConsoleApp1 {     internal static class Program     {         private static async Task Main()         {             var root = new ProgressNode {Name = "Root"};              var child1 = root.CreateChild("Child 1");             child1.CreateChild("Child 1A");             child1.CreateChild("Child 1B");              var child2 = root.CreateChild("Child 2");             child2.CreateChild("Child 2A");             child2.CreateChild("Child 2B");              var child3 = root.CreateChild("Child 3");             child3.CreateChild("Child 3A");             child3.CreateChild("Child 3B");              var child4 = root.CreateChild("Child 4");             child4.CreateChild("Child 4A");             child4.CreateChild("Child 4B");              root.ProgressChanged += OnProgressChanged;              var nodes = root.GetLeafs().ToArray();             var tasks = new List<Task>();              var random = new Random();              foreach (var node in nodes)             {                 var task = Task.Run(async () =>                 {                     var total = random.Next(1, 50 + 1);                     var delay = random.Next(10, 100 + 1);                      for (var i = 0; i < total; i++)                     {                         await Task.Delay(delay);                         node.SetProgress(total, i + 1);                     }                 });                 tasks.Add(task);             }              await Task.WhenAll(tasks);             Console.WriteLine("Done!");             Console.ReadKey();         }          #region Console output          private static readonly object Sync = new object();          private static void OnProgressChanged(object sender, EventArgs e)         {             var root = (ProgressNode) sender;              lock (Sync) // cheap hack for slow console             {                 Console.SetCursorPosition(0, 0); // another cheap hack                  var flatten = root.Flatten(s => s);                 foreach (var node in flatten)                 {                     var indent = 0;                     var current = node;                     while (current.Parent != null)                     {                         current = current.Parent;                         indent++;                     }                      var value = node.GetTotalProcessed();                     var total = node.GetTotalElements();                     var progress = GetProgressBar(50, value, total);                     var text = $  "{new string(' ', indent)} '{node.Name}' {progress} {value} of {total}\r\n";                     Console.WriteLine(text);                 }             }         }          public static string GetProgressBar(int width, int value, int total, char foreground = '█', char background = '░')         {             var d = 1.0d / Math.Max(total, 1) * value; // avoid division by zero             var i = (int) Math.Round(d * width);             var s1 = new string(foreground, i);             var s2 = new string(background, width - i);             var s3 = $  "{s1}{s2}";             return s3;         }          #endregion     } } 

The main class, ProgressNode:

It is modeled after the tree data structure, where each leaf node participates in progress reporting. Thanks to LINQ, counting the progress is rather easy.

Code:

using System; using System.Collections; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations;  namespace ConsoleApp1 {     /// <summary>     ///     Defines a node that participates in a hierarchy of progress.     /// </summary>     public sealed class ProgressNode : IEnumerable<ProgressNode>     {         public ProgressNode([CanBeNull] ProgressNode parent = null)         {             Parent = parent;         }          #region IEnumerable<ProgressNode> Members          /// <inheritdoc />         IEnumerator IEnumerable.GetEnumerator()         {             return GetEnumerator();         }          /// <inheritdoc />         public IEnumerator<ProgressNode> GetEnumerator()         {             return Children.GetEnumerator();         }          #endregion          #region Events          /// <summary>         ///     Occurs when progress has changed.         /// </summary>         public event EventHandler ProgressChanged;          private void OnProgressChanged()         {             ProgressChanged?.Invoke(this, EventArgs.Empty);         }          #endregion          #region Public Methods          /// <summary>         ///     Creates a child of this instance.         /// </summary>         /// <param name="name"></param>         /// <returns></returns>         public ProgressNode CreateChild([CanBeNull] string name = null)         {             var child = new ProgressNode(this) {Name = name};              Children.Add(child);              return child;         }          /// <summary>         ///     Gets the leaf nodes of this instance.         /// </summary>         /// <returns></returns>         public IEnumerable<ProgressNode> GetLeafs()         {             return this.Flatten(s => s).Where(s => s.IsLeaf);         }          /// <summary>         ///     Gets the count of total elements for this instance and its descendants.         /// </summary>         /// <returns></returns>         public int GetTotalElements()         {             if (IsRoot)             {                 return this.SelectMany(s => s).Sum(s => s.Progress.Total);             }              if (IsNode)             {                 return this.Sum(s => s.Progress.Total);             }              if (IsLeaf)             {                 return Progress.Total;             }              throw new InvalidOperationException("Instance state is not valid.");         }          /// <summary>         ///     Gets the count of elements processed for this instance and its descendants.         /// </summary>         /// <returns></returns>         public int GetTotalProcessed()         {             if (IsRoot)             {                 return this.SelectMany(s => s).Sum(s => s.Progress.Value);             }              if (IsNode)             {                 return this.Sum(s => s.Progress.Value);             }              if (IsLeaf)             {                 return Progress.Value;             }              throw new InvalidOperationException("Instance state is not valid.");         }          /// <summary>         ///     Sets the progress of this instance.         /// </summary>         /// <param name="total"></param>         /// <param name="value"></param>         public void SetProgress(int total, int value)         {             if (total <= 0)                 throw new ArgumentOutOfRangeException(nameof(total));              if (value <= 0 || value > total)                 throw new ArgumentOutOfRangeException(nameof(value));              if (!IsLeaf)                 throw new InvalidOperationException("Progress can only be set on a leaf node.");              Progress.Total = total;             Progress.Value = value;              Root.OnProgressChanged();         }          /// <inheritdoc />         public override string ToString()         {             return $  "{nameof(Name)}: {Name}, {nameof(Progress)}: {Progress}";         }          #endregion          #region Private Properties          private IList<ProgressNode> Children { get; } = new List<ProgressNode>();          private bool IsLeaf => Parent != null && !Children.Any();          private bool IsNode => Parent != null && Children.Any();          private bool IsRoot => Parent == null;          private Progress Progress { get; } = new Progress();          private ProgressNode Root         {             get             {                 var current = this;                  while (current.Parent != null)                 {                     current = current.Parent;                 }                  return current;             }         }          #endregion          #region Public Properties          /// <summary>         ///     Gets or sets the name of this instance.         /// </summary>         public string Name { get; set; }          /// <summary>         ///     Gets the parent of this instance.         /// </summary>         public ProgressNode Parent { get; }          #endregion     } } 

Helper classes:

This stores the actual progress for a leaf node:

namespace ConsoleApp1 {     /// <summary>     ///     Represents the progress of an operation.     /// </summary>     internal sealed class Progress     {         public int Total { get; set; }          public int Value { get; set; }          public override string ToString()         {             return $  "{nameof(Total)}: {Total}, {nameof(Value)}: {Value}";         }     } } 

This flattens a hierarchy of elements:

using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using JetBrains.Annotations;  namespace ConsoleApp1 {     [SuppressMessage("ReSharper", "InconsistentNaming")]     public static class IEnumerableExtensions     {         /// <summary>         ///     Flattens a hierarchy of elements.         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="source"></param>         /// <param name="selector"></param>         /// <returns></returns>         public static IEnumerable<T> Flatten<T>([NotNull] this T source, [NotNull] Func<T, IEnumerable<T>> selector)         {             if (source == null)                 throw new ArgumentNullException(nameof(source));              if (selector == null)                 throw new ArgumentNullException(nameof(selector));              yield return source;              foreach (var node in selector(source).SelectMany(s => Flatten(s, selector)))             {                 yield return node;             }         }     } } 

I’ve also put the project online for convenience: https://github.com/aybe/ProgressHierarchy

Thank you!

Network launched application randomly crashes on Windows 10 (1703/1809) reporting 0xc0000006 exception or error “Unable to process error”


Introduction

On Windows 10 (update 1703 or 1809), applications launched from a network drive crashes after period of 60 to 95 minutes. On Windows 7 applications runs flawlessly.

Symptoms

  • All attempts to launch applications from network drive succeed;
  • All affected 32 bit applications EXE/DLL logged an 0xc0000006 exception on Event Viewer.
  • On 16 bit application (Foxpro 2.6 for MS-DOS), occurs error “Unable to process error” or simply breaks and exits.
  • Once in a while “Fatal error 104 while attempting to report error 104” occured.
  • Failure happens even during continuous usage (no significant inactivity period occurs);
  • Failure only occured on Windows 10 32 bit/64 bit workstations either running Update 1703 or Update 1809. Windows 7 workstations were fine.
  • Gathered analysis points to “safe” random period from 60 to 95 minutes between first launch and break occurs;
  • Using Wireshark, error STATUS_NETWORK_SESSION_EXPIRED is consistently logged at failure ocurrs on some scenarios.
  • If there are several instances, launched at different times, they all fail at the same second;
  • A instance launch from a local drive runs fine even after an eventual fail on network launched instances;
  • All afected sites servers are running on Windows 2016 Server;
  • Network drive is functional after fail;
  • If the application is launch from local drive no problem occurs;
  • Network connectivity never fails (continuous PINGs) before, during or after application breaks;

System configuration

  • Internal lab Windows Server 2016 Essentials (1607)
  • Windows 10 32 bit / 64 bit (update 1703 and 1809) / ~~Windows 7~~
  • Cable
  • Switch

Server network configuration

Results of Powershell’s Get-SMBServerConfiguration command:

AnnounceComment                 :  AnnounceServer                  : False AsynchronousCredits             : 512 AuditSmb1Access                 : False AutoDisconnectTimeout           : 999999 AutoShareServer                 : True AutoShareWorkstation            : True CachedOpenLimit                 : 10 DurableHandleV2TimeoutInSeconds : 180 EnableAuthenticateUserSharing   : False EnableDownlevelTimewarp         : False EnableForcedLogoff              : True EnableLeasing                   : False EnableMultiChannel              : True EnableOplocks                   : True EnableSecuritySignature         : True EnableSMB1Protocol              : True EnableSMB2Protocol              : True EnableStrictNameChecking        : True EncryptData                     : False IrpStackSize                    : 15 KeepAliveTime                   : 2 MaxChannelPerSession            : 32 MaxMpxCount                     : 50 MaxSessionPerConnection         : 16384 MaxThreadsPerQueue              : 20 MaxWorkItems                    : 1 NullSessionPipes                : netlogon,samr,lsarpc NullSessionShares               :  OplockBreakWait                 : 35 PendingClientTimeoutInSeconds   : 120 RejectUnencryptedAccess         : True RequireSecuritySignature        : True ServerHidden                    : True Smb2CreditsMax                  : 8192 Smb2CreditsMin                  : 512 SmbServerNameHardeningLevel     : 0 TreatHostAsStableStorage        : False ValidateAliasNotCircular        : True ValidateShareScope              : True ValidateShareScopeNotAliased    : True ValidateTargetName              : True 

Workstation network configuration

Results of Powershell’s Get-SMBClientConfiguration command:

ConnectionCountPerRssNetworkInterface : 4 DirectoryCacheEntriesMax              : 16 DirectoryCacheEntrySizeMax            : 65536 DirectoryCacheLifetime                : 0 DormantFileLimit                      : 1023 EnableBandwidthThrottling             : True EnableByteRangeLockingOnReadOnlyFiles : True EnableInsecureGuestLogons             : True EnableLargeMtu                        : True EnableLoadBalanceScaleOut             : True EnableMultiChannel                    : True EnableSecuritySignature               : False ExtendedSessionTimeout                : 1000 FileInfoCacheEntriesMax               : 64 FileInfoCacheLifetime                 : 0 FileNotFoundCacheEntriesMax           : 128 FileNotFoundCacheLifetime             : 5 KeepConn                              : 600 MaxCmds                               : 50 MaximumConnectionCountPerServer       : 32 OplocksDisabled                       : False RequireSecuritySignature              : False SessionTimeout                        : 60 UseOpportunisticLocking               : False WindowSizeThreshold                   : 8 

What we had already done

  • Checked event viewer, even on SMBCLIENT and SMBSERVER sub-events, but unable to find correlation between events and application failure.
  • Tried enabling SMB1 on both server/workstation followed by a reboot;
  • Tried disabling antivirus (ESET) on both server/workstation followed by a reboot;
  • Disabled powersaving network on both server/workstation followed by a reboot;
  • Disabled autodisconnect (changing it to -1) followed by a reboot;
  • Tried disabling firewall on both server/workstation;
  • Case has been under lab surveilance for weeks with no success.

Is there anyone else facing the symptons and able to provide alternative solutions?

Thanks for you attention

Automating Site Usage Reporting: Top queries by month, abandoned queries etc

My question is almost identical to one raised 5 years ago:

Pragmatically download export search usage reports

Again, being able to access, download and schedule the distribution of reports with the dynamic links located on a site page:

https://tenant.sharepoint.com/myintranet/_layouts/15/Reporting.aspx?Category=AnalyticsSiteCollection 

The key requirement as @Petter has stated is to allow business users to access the reports without needing to bother SharePoint or Site collection admins.