<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Rodney Viana's (MSFT) Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/rodneyviana/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/rodneyviana/feed.xml</link>
    <description>Post on Sharepoint, WCF, WIF and C#</description>
    <lastBuildDate>Thu, 17 Jan 2019 23:57:17 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Step by step video on how to fix the SharePoint Workflow issue caused by .NET patch</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/step-by-step-video-on-how-to-fix-the-sharepoint-workflow</link>
      <pubDate>Fri, 12 Oct 2018 15:05:52 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=1155</guid>
      <description><![CDATA[This post is a continuation of this previous post. It is also an extension of KB4465015. The video...]]></description>
      <content:encoded><![CDATA[This post is a continuation of this previous <a href="https://blogs.msdn.microsoft.com/rodneyviana/2018/09/13/after-installing-net-security-patches-to-address-cve-2018-8421-sharepoint-workflows-stop-working/">post</a>. It is also an extension of <a href="https://support.microsoft.com/en-us/help/4465015/sharepoint-workflows-stop-after-cve-2018-8421-security-update">KB4465015</a>. The video assumes you read the previous post and/or KB.

The page to the scripts mentioned in the video can be found here: <a href="https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad">https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad</a>

&nbsp;

[embed]https://www.youtube.com/watch?v=l25Gp08egC0[/embed]

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>After installing .NET security patches to address CVE-2018-8421, SharePoint workflows stop working (KB 4457916/4457035 and others)</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/after-installing-net-security-patches-to-address-cve-2018-8421-sharepoint-workflows-stop-working</link>
      <pubDate>Thu, 13 Sep 2018 16:58:18 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=1125</guid>
      <description><![CDATA[*** FINAL UPDATE VI *** SharePoint CUs are out
The Nov 2018 SharePoint CUs
The SharePoint with...]]></description>
      <content:encoded><![CDATA[<h2>*** FINAL UPDATE VI *** SharePoint CUs are out</h2>
<h1>The Nov 2018 SharePoint CUs</h1>
The SharePoint with fixes are available. Some environments using third-party solution may still need to follow the steps on this post:

<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4461501&amp;data=02%7C01%7Crviana%40microsoft.com%7C1490ab9f928a4281ea4d08d649a546d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636777371907546588&amp;sdata=mf6mLht%2BYRmtzS7jd6%2BH87fVszaVPUJJL6wMHWWWRTI%3D&amp;reserved=0">Description of the security update for SharePoint Enterprise Server 2016: November 13, 2018 (KB4461501)</a>

<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4461511&amp;data=02%7C01%7Crviana%40microsoft.com%7C1490ab9f928a4281ea4d08d649a546d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636777371907586622&amp;sdata=BI2OnorzpVjEcdOB%2BkFR8p9jFUIAKZpTQZsWHdxEiM0%3D&amp;reserved=0">Description of the security update for SharePoint Foundation 2013: November 13, 2018 (KB4461511)</a>

<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4461527&amp;data=02%7C01%7Crviana%40microsoft.com%7C1490ab9f928a4281ea4d08d649a546d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636777371907616643&amp;sdata=tRtTInEiHAwq32FWWhqk9w1wq2F1x9I1Jl%2FmdbZ1%2B0M%3D&amp;reserved=0">Description of the security update for SharePoint Server 2010 Office Web Apps: November 13, 2018 (KB4461527)</a>
<h1>Important</h1>
As some companies cannot make changes based on Blog posts, we worked on a public KB that can be found here: <a href="https://support.microsoft.com/en-us/help/4465015/sharepoint-workflows-stop-after-cve-2018-8421-security-update">https://support.microsoft.com/en-us/help/4465015/sharepoint-workflows-stop-after-cve-2018-8421-security-update</a>

The KB has a watered down version of Joe's script. If you have Nintex workflows, favor the scripts on this post.

We put together a video with step-by-step. It does not need to be a confusing thing. Found the video here (you can go straight to the video instead of following instructions here):

https://blogs.msdn.microsoft.com/rodneyviana/2018/10/12/step-by-step-video-on-how-to-fix-the-sharepoint-workflow/

&nbsp;
<h1>Symptom</h1>
After applying .NET Security Only patch to resolve CVE-2018-8421 (Remote Code Execution Vulnerability) , all SharePoint out of the box Workflows fail to execute and the log will show an error like this:

<span style="font-family: Courier New;font-size: 9pt">09/13/2018 01:59:07.57 w3wp.exe (0x1868) 0x22FC SharePoint Foundation Workflow Infrastructure <strong>72fs</strong> Unexpected RunWorkflow: Microsoft.SharePoint.SPException: &lt;Error&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type <strong>System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file."</strong> /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /&gt;&lt;CompilerError Line="-1" Column="-1"…
</span>

The error suggest that <span style="font-family: Courier New;font-size: 9pt"><strong>System.CodeDom.CodeBinaryOperatorExpression</strong></span> is not in the authorized types.
<h1>Cause</h1>
Workflow Foundation (WF) will only run workflows when all the dependent types and assemblies are authorized in the .NET config file (or added explicitly via code) under this tree:
<p style="margin-left: 36pt"><span style="font-family: Courier New;font-size: 9pt">&lt;configuration&gt;
</span></p>
<p style="margin-left: 36pt"><span style="font-family: Courier New;font-size: 9pt">       &lt;System.Workflow.ComponentModel.WorkflowCompiler&gt;
</span></p>
<p style="margin-left: 36pt"><span style="font-family: Courier New;font-size: 9pt">              &lt;authorizedTypes&gt;
</span></p>
<p style="margin-left: 36pt"><span style="font-family: Courier New;font-size: 9pt">                     &lt;targetFx&gt;
</span></p>
&nbsp;

However, after the update, the following lines are necessary for SharePoint 2013 and beyond:

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeBinaryOperatorExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePrimitiveExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodInvokeExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeFieldReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeThisReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePropertyReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="font-family: Courier New;font-size: 9pt"> </span>

And for SharePoint 2007 and 2010, use these lines:

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeBinaryOperatorExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePrimitiveExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodInvokeExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeFieldReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeThisReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePropertyReferenceExpression</span>" Authorized="True" /&gt;</span>
<h1>Solution</h1>
The solution is to add explicitly the types to all web applications' web.config:

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeBinaryOperatorExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePrimitiveExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodInvokeExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeFieldReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeThisReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePropertyReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="font-family: Courier New;font-size: 9pt"> </span>

Or (for SharePoint 2007 and 2010):

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeBinaryOperatorExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePrimitiveExpression</span>" Authorized="True" /&gt; </span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodInvokeExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeMethodReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeFieldReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodeThisReferenceExpression</span>" Authorized="True" /&gt;</span>

<span style="color: #000000;font-family: Calibri">              &lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="<span>CodePropertyReferenceExpression</span>" Authorized="True" /&gt;</span>

Please notice that sometimes SharePoint Timer Service (SPTimerV4) runs workflows. If you notice that the application showing the error is ULS logs in OWSTIMER.EXE, you should also include the authorized types in [SharePoint Hive Folder]\bin\OWSTIMER.EXE.config. The Hive Folder will change by version of SharePoint. For SharePoint 2016, it is normally at c:\program files\common files\microsoft shared\web server extensions\<strong>16</strong>. For 2013, at c:\program files\common files\microsoft shared\web server extensions\<strong>15</strong>.

&nbsp;
<h1>Additional Information</h1>
My colleague Joe Rodgers, who is Sr. PFE, put together this PowerShell script: <a href="https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad">https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad</a>

There are two scripts. Normally, the only necessary script is:

<span class="icon"></span><a href="https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad#file-add-codedomauthorizedtype-ps1" class="tooltipped tooltipped-s css-truncate"><strong class="user-select-contain gist-blob-name css-truncate-target">Add-CodeDomAuthorizedType.ps1</strong></a>

Uncomment this line to make the changes:

<span style="float: none;background-color: transparent;color: #6a737d;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">Add-CodeDomAuthorizedType</span>

If you have Nintex workflows you should run like this:

<span style="float: none;background-color: transparent;color: #6a737d;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">Add-CodeDomAuthorizedType</span> -<span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">IncludeNintexWorkflow</span>

To undo the changes, run:

<span style="float: none;background-color: transparent;color: #6a737d;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">Remove-CodeDomAuthorizedType</span>

The script needs to run only once on any WFE. All web.config files related to SharePoint on all servers will be modified. New web applications created after that will also include the changes. Even if a new WFE is added to the farm, the entries will also be included in web.config. The change is a permanent requirement from now on since the WF patch. You do not need to undo the change before applying the SharePoint patch addressing it.

There is a second script to update OWSTIMER.exe.config. This one should only run if you see the symptoms in ULS logs with process OWSTIMER.EXE. Otherwise, you do not need to update. if you have the problem though, you need to rerun the script if a new machine is added to the farm. No line needs to be uncommented for this one. The script name is:

<span class="icon"> </span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 32px;text-align: left;text-decoration: none;text-indent: 0px"> </span><a href="https://gist.github.com/joerodgers/2302b394796c865818839d843bae2dad#file-add-codedomauthorizedtypetoowstimerconfig-ps1" class="tooltipped tooltipped-s css-truncate"> <strong class="user-select-contain gist-blob-name css-truncate-target"> Add-CodeDomAuthorizedTypeToOWSTimerConfig.ps1</strong></a>
<h1>Note</h1>
Microsoft is aware of this issue and patches for SharePoint 2010, 2013 and 2016 are being worked as of 9/17/2018. I will update when we have an ETA. I had confirmation from the product team on 9/18/2018 that this information and solution on this post is in the line with the future patch and it is the recommended action plan until the patch is out. If anything change, I will update the post.

&nbsp;
<h1>Note 2</h1>
Some people using third-party workflows (like Nintex) need to also include this:

&lt;authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeTypeReferenceExpression" Authorized="True" /&gt;

If you are using SharePoint 2010, use this instead:

<span style="float: none;background-color: #ffffff;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">&lt;authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeTypeReferenceExpression" Authorized="True" /&gt;</span>

Using the script, you need to add to the line defining types:

CodeTypeReferenceExpression

&nbsp;

Example:

<span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px">        </span><span class="pl-smi">$typeNames</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-k">=</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-k">@</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px">( </span><span class="pl-s"><span class="pl-pds">"</span>CodeBinaryOperatorExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-s"><span class="pl-pds">"</span>CodePrimitiveExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-s"><span class="pl-pds">"</span>CodeMethodInvokeExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-s"><span class="pl-pds">"</span>CodeMethodReferenceExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-s"><span class="pl-pds">"</span>CodeFieldReferenceExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span class="pl-s"><span class="pl-pds">"</span>CodeThisReferenceExpression<span class="pl-pds">"</span></span><span class="pl-k">,</span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px"> </span><span class="pl-s"><span class="pl-pds">"</span>CodePropertyReferenceExpression<span class="pl-pds">", <strong>"<span style="text-align: left;color: #333333;text-indent: 0px;letter-spacing: normal;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;text-decoration: none;cursor: text;float: none;background-color: transparent">CodeTypeReferenceExpression</span>"</strong></span></span><span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 20px;text-align: left;text-decoration: none;text-indent: 0px">)</span>
<h1>Note 3</h1>
Joe updated his script to add a switch for Nintex workflows.

Call this way to include the extra type required by Nintex:

<span style="float: none;background-color: transparent;color: #6a737d;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">Add-CodeDomAuthorizedType</span> -<span style="float: none;background-color: transparent;color: #24292e;font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size: 12px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">IncludeNintexWorkflow</span>
<h1>Note 4</h1>
Some very rare cases require that you add All entries that exist in your web.config (include the new ones added by the script) to OWSTIMER.EXE.config

I explain this (narration by Keith Richie, thanks Keith Richie for adding narration) in the video referenced in the beginning of this post.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013/2016 Usage Reports fail to show the correct number of clicks from anonymous access</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/sharepoint-20132016-usage-reports-fail-to-show-the-correct-number-of-clicks-from-anonymous-access</link>
      <pubDate>Wed, 28 Mar 2018 11:04:17 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=1095</guid>
      <description><![CDATA[Symptom
When using a Search Center with anonymous access, click statistics do not compute correctly...]]></description>
      <content:encoded><![CDATA[<h2>Symptom</h2>
When using a Search Center with anonymous access, click statistics do not compute correctly for anonymous access but registers other user's accesses properly.

ULS logs will show entries like this:

<span style="font-family: Courier New;font-size: 10pt"><strong>w3wp.exe SharePoint Foundation CSOM ajwqj Medium Request does not have <span style="background-color: yellow">SPBasePermissions.UseRemoteAPIs</span> permission. Need to check it when each API is accessed
</strong></span>
<h2>Repro Steps</h2>
<ul>
 	<li>Set up web application for anonymous users:</li>
 	<li>From CA / Application Management, select the web Application and click on Authentication Providers, then the default Zone</li>
 	<li>From the Edit Authentication form, select Enable Anonymous Access and click Save</li>
 	<li>Navigate to the site collection / Site Settings / Site Permissions and click the Anonymous Access button on the ribbon</li>
 	<li>Configure anonymous access for the Entire Web Site</li>
 	<li>Close the browser and start a browser anonymous</li>
</ul>
<strong>NOTE:</strong> When you set up anonymous access for the site, you will need the Require Use Remote Interfaces Permission checked
<h2>Results</h2>
When using the Search Center as anonymous, the clicks will not be computed.
<h3>Expected Results</h3>
Anonymous and non-anonymous clicks should be computed.
<h2>Cause</h2>
The permission UseRemoteAPIs is somehow disabled on Search Center web site.
<h2>Solution</h2>
Run the following script:

[ps]
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$webUrl = 'https://portal.contoso.com/searchcenter' # please replace this url by your search center web URL
try
{
$web = Get-SPWeb $webUrl
if($web.AnonymousPermMask64.ToString().Contains('UseRemoteAPIs'))
{
  Write-Host &quot;Your web '$($web.Url)' is all set. No change needed&quot;;
  Write-Host &quot;Effective rights for anonymous: $($web.AnonymousPermMask64)&quot;;
} else
{
  Write-Host &quot;Your web '$($web.Url)' does not include the appropriate rights to anonymous&quot;
  Write-Host &quot;Current Effective rights for anonymous: $($web.AnonymousPermMask64)&quot;;
  Write-Host &quot;Adding the appropriate permission&quot;;
  $web.AnonymousPermMask64 = $web.AnonymousPermMask64.ToString() + &quot;, UseRemoteAPIs&quot;;
  $web.Update();
  Write-Host &quot;New effective rights for anonymous: $($web.AnonymousPermMask64)&quot;;
}
$web.Dispose();
} catch
{
  Write-Error &quot;Error: Fix could not be applied&quot;
  Write-Error $Error[0]

}

[/ps]



]]></content:encoded>
    </item>
    <item>
      <title>Leveraging the new Time Travel Trace API in Debugging tools to find when one or more SharePoint event happened</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/leveraging-the-new-time-travel-trace-api-in-debugging-tools-to-find-when-one-or-more-sharepoint-event-happened</link>
      <pubDate>Tue, 27 Mar 2018 18:33:05 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=1035</guid>
      <description><![CDATA[In my previous post, I showed a proof-of-concept script to list all occasions a process opened a...]]></description>
      <content:encoded><![CDATA[In my previous post, I showed a <a href="https://blogs.msdn.microsoft.com/rodneyviana/2018/03/08/leveraging-the-new-windbgx-and-time-travel-trace-script-to-list-all-access-to-files/">proof-of-concept script</a> to list all occasions a process opened a file. JavaScript is easy to program and works for most cases, however in some occasions you need to access resources not available from JavaScript and only a full-fledged debugging extension will do. In this post I will show some highlights of a debugging extension using the new <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview">Time Travel Debugging</a> and the new API which at the time of writing was still in preview and may change before final release. The extension contains some other commands as I wrote this for training purposes and decided to leave "as is", so if you are also only interested in writing your extension, you can get some ideas from it. The command for Time Travel Trace (TTD) is "!idnauls". The idea is to list all occasions when SharePoint logs something and show the time, event id (tag), TTD position, category, severity and message of the log entries. It can also filter by tag, category and message. The logic behind this is explained on a <a href="https://blogs.msdn.microsoft.com/rodneyviana/2016/05/26/creating-debugdiag-2-rule-to-generate-sharepoint-2010-2016-process-dump-based-on-uls-tags-and-message/">previous post</a>. This command only works with TTD dumps (.run) and it requires the new debugging tool which is also in <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools">preview version</a>. There is no need to use this extension for other end than learning. <a href="https://github.com/rodneyviana/netext/tree/master/Binaries">NetExt</a> includes a similar command (!widnauls) for this purpose. Special thanks to Ken Sykes and Bill Messmer for the help with new API.

Download project <a href="https://github.com/rodneyviana/blogdemos/raw/master/idnaext.zip">here</a>.
<h2>The command to enumerate all calls to SharePoint log</h2>
Knowing that most ULS log is done by calling these two export functions <span style="font-family: Courier New">"onetnative!ULSSendFormattedTrace", "Microsoft_Office_Server_Native!ULSSendFormattedTrace"</span>, and that tag ai108 translates to 0x21b6a2 per my previous post, this command would do the trick:
<div>
<table style="border-collapse: collapse;background: #d9d9d9" border="0"><colgroup> <col style="width: 977px" /></colgroup>
<tbody valign="top">
<tr style="height: 100px">
<td style="padding-left: 7px;padding-right: 7px;border: solid 0.5pt"><span style="font-family: Courier New">dx /g @$cursession.TTD.Calls("onetnative!ULSSendFormattedTrace", "Microsoft_Office_Server_Native!ULSSendFormattedTrace").Where(c =&gt; c.Parameters[0] == 0x21B6A2).Select(c=&gt; new { param1 = c.Parameters[0], param2 = c.Parameters[1], param3 = c.Parameters[2], param4 = c.Parameters[3], start = c.TimeStart, sequence = c.TimeStart.Sequence, steps = c.TimeStart.Steps } )</span></td>
</tr>
</tbody>
</table>
</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/032818_0035_Leveragingt1.png" />
<h2>Parameters</h2>
<ul>
 	<li>Parameters[0] – Contains the tag in numeric form and is used to filter</li>
 	<li>Parameters[1] – Contains the id of the product/category. This information is in SPLogLevel object and I used this snippet to get the code id and description:</li>
</ul>
<div>
<table style="border-collapse: collapse;background: white" border="0"><colgroup> <col style="width: 2000px" /></colgroup>
<tbody valign="top">
<tr style="height: 205px">
<td valign="middle" style="padding-left: 7px;padding-right: 7px;border: solid 0.5pt">
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: blue">Add-PSSnapin<span> </span></span><span style="color: blueviolet">Microsoft.SharePoint.Powershell<span> </span></span><span style="color: navy">-ErrorAction<span> </span></span><span style="color: blueviolet">SilentlyContinue</span>
</span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$logLevels </span><span style="color: darkgray">=</span> (<span style="color: blue">Get-SPLogLevel </span><span style="color: darkgray">| </span><span style="color: blue">Sort </span><span style="color: blueviolet">Id</span>)
</span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$lines </span><span style="color: darkgray">= </span><span style="color: blue">New-Object </span><span style="color: darkred">'System.Collections.Generic.List[string]'</span>;
</span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: darkblue">foreach</span>(<span style="color: orangered">$level </span><span style="color: darkblue">in </span><span style="color: orangered">$logLevels</span>)
</span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt">{
</span></p>
<p style="background: white"><span style="color: orangered;font-family: Lucida Console;font-size: 9pt">$lines<span style="color: darkgray">.</span>Add(<span style="color: darkred">"`tcatMap[0x</span>$($level<span style="color: darkgray">.</span>Id<span style="color: darkgray">.</span>ToString(<span style="color: darkred">""x"</span>))<span style="color: darkred">]=""</span>$($level<span style="color: darkgray">.</span>Area)<span style="color: darkred">|</span>$($level<span style="color: darkgray">.</span>Name<span style="color: darkgray">.</span>Replace(<span style="color: darkred">""|""<span style="color: darkgray">,<span style="color: darkred"> "":""</span>))<span style="color: darkred">"";"</span>);
</span></span></span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: blue">Write-Host<span> </span></span><span style="color: darkred">"`tcatMap[0x</span>$(<span style="color: orangered">$level<span style="color: darkgray">.</span>Id<span style="color: darkgray">.</span>ToString(<span style="color: darkred">""x"</span>))<span style="color: darkred">]=""</span>$($level<span style="color: darkgray">.</span>Area)<span style="color: darkred">|</span>$($level<span style="color: darkgray">.</span>Name<span style="color: darkgray">.</span>Replace(<span style="color: darkred">""|""<span style="color: darkgray">,<span style="color: darkred"> "":""</span>))<span style="color: darkred">"";"</span>;
</span></span></span></span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt">}
</span></p>
<p style="background: white"><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$lines </span><span style="color: darkgray">| </span><span style="color: blue">Out-File </span><span style="color: blueviolet">spcat.txt
</span></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<ul>
 	<li>Parameters[2] – Contains the severity which is defined <a href="https://msdn.microsoft.com/en-us/library/office/ff604025(v=office.14).aspx">here</a>.</li>
 	<li>Parameters[3] – Contains the pointer to the message string. There is a caveat here. A TTD string is only resolved when the context moves to the time of occurrence.</li>
</ul>
<h1>Logic in a nutshell</h1>
<ul>
 	<li>Run the command to list all times when one of the two functions are called.</li>
 	<li>Go to each position and retrieve the message since it can only be read when the context is moved to the position.</li>
 	<li>Calculate the current time (at target machine).</li>
 	<li>Transform the id of product/category into string using a simple table (this does not require moving the context)</li>
 	<li>Transform the severity id into string (also no context change)</li>
 	<li>Print the result with the TTD position</li>
</ul>
<h2>Extension command code (partial)</h2>
[cpp]
#define IfFailedReturn(x) if(FAILED(x)) return E_FAIL;

void DisplayFound(std::string &amp;FullMessage, std::string&amp; Part)
{
	if (Part.size() == 0)
	{
		g_ExtInstancePtr-&gt;Out(&quot;%s&quot;, FullMessage.c_str());
		return;
	}
	size_t i = 0;
	size_t p = 0;
	while (i &lt; FullMessage.size() - Part.size())
	{
		p = FullMessage.find(Part, i);
		if (p == std::string::npos)
		{
			g_ExtInstancePtr-&gt;Out(&quot;%s&quot;, FullMessage.substr(i).c_str());
			break;
		}
		g_ExtInstancePtr-&gt;Out(&quot;%s&quot;, FullMessage.substr(i, p - i).c_str());
		g_ExtInstancePtr-&gt;Dml(&quot;&lt;col fg=\&quot;wbg\&quot; bg=\&quot;srccmnt\&quot;&gt;%s&lt;/col&gt;&quot;, Part.c_str());
		i = p+Part.size();
	}
	

}

HRESULT MoveTo(IModelObject *spStart)
{

	//
	// SeekTo is a key on the object just like anything else.  The value of the key is a method.
	//
	CComPtr&lt;IModelObject&gt; spSeekToMethod;
	IfFailedReturn(spStart-&gt;GetKey(L&quot;SeekTo&quot;, &amp;spSeekToMethod, nullptr));

	//
	// Before we arbitrarily go about using it as a method, do some basic validation.
	//
	ModelObjectKind mk;
	IfFailedReturn(spSeekToMethod-&gt;GetKind(&amp;mk));
	if(mk != ObjectMethod)
	{
		return E_FAIL;
	}

	//
	// ObjectMethod indicates that it is an IModelMethod packed into punkVal.  You can QI to be extra
	// safe if desired.
	//
	VARIANT vtMethod;
	IfFailedReturn(spSeekToMethod-&gt;GetIntrinsicValue(&amp;vtMethod));
	//ASSERT(vtMethod.vt = VT_UNKNOWN); // guaranteed by ObjectMethod
	CComPtr&lt;IModelMethod&gt; spMethod;  // or whatever mechanism you want to guarantee the variant gets cleared.  variant_ptr, …
	spMethod.Attach(static_cast&lt;IModelMethod *&gt;(vtMethod.punkVal));

	//
	// Call the method (passing no arguments).  The result here is likely to be ObjectNoValue (there is no return value).
	//
	CComPtr&lt;IModelObject&gt; spCallResult;
	IfFailedReturn(spMethod-&gt;Call(spStart, 0, nullptr, &amp;spCallResult, nullptr));


	return S_OK;
}

EXT_COMMAND(idnauls,
	&quot;Command to list ULS position and tag and can be filtered by message or category&quot;,
	&quot;{nomessage;b,o;;Do not show the ULS log message (faster processing).}&quot;
	&quot;{tag;s,r;;Tag to search for (e.g.: -tag b4ly). Use * for all tags. Required}&quot;
	&quot;{category;b,o;;Search text in Category or Product and not in message (e.g. -category Claims). Faster processing. Severity not searched}&quot;
	&quot;{message;b,o;;Search text in message and not in category or product (e.g. -message disk is full). Slower processing.}&quot;
	&quot;{;x,o;;Optional filter for message (-message) or category (-category) (e.g.: -message disk is full). Must be the last parameter}&quot;)
{
	wasInterrupted = false;
	UINT64 startTime, endTime;

	
	std::string tag = GetArgStr(&quot;tag&quot;);

	std::string mess;
	if (HasUnnamedArg(0))
		mess = GetUnnamedArgStr(0);

	bool nomess = HasArg(&quot;nomessage&quot;);

	bool message = HasArg(&quot;message&quot;);

	bool catonly = HasArg(&quot;category&quot;);

	if (catonly &amp;&amp; message)
	{
		Out(&quot;Error: You have to use either -category or -message. Never both\n\n&quot;);
		Out(&quot;No search was performed\n&quot;);
		return;
	}

	if (message &amp;&amp; tag == &quot;*&quot;)
	{
		Out(&quot;Warning: When you combine -tag * and -message, it creates a very inefficient query.\n&quot;);
		Out(&quot;         -tag * will retrieve all ULS log entry and -message will require to move to an iDNA possition every time.\n&quot;);
		Out(&quot;         -tag &lt;tag&gt; will only retrieve the ULS logs with this tag and then move to the position to retrieve the message.\n&quot;);
		Out(&quot;Information: Notice that -tag * and -category is ok and still very fast as category is also filtered without moving to the position.\n\n&quot;);

	}

	if ((catonly || message) &amp;&amp; mess.size() == 0)
	{
		Out(&quot;Error: -category or -message require a filter pattern\n&quot;);
		Out(&quot;Example: !idnauls -tag ag9cq -message User was authentticated\n&quot;);
		Dml(&quot;3dbba3:1254	SharePoint Foundation	Claims Authentication	High	ag9cq\t&lt;b&gt;User was authenticated&lt;/b&gt;. Checking permissions.\n\n&quot;);
		Out(&quot;Example: !idnauls -tag * -category Web Content Management\n&quot;);
		Dml(&quot;3de9ae:14c0	&lt;b&gt;Web Content Management&lt;/b&gt;	Publishing Cache	High	ag0ld\n&quot;);
		Out(&quot;No search was performed\n&quot;);
		return;
	}
	map&lt;int, int&gt; catVector;

	if (catonly)
	{
		
		catVector = SPCategories::GetListAreaName(mess);
		if (catVector.size() == 0)
		{
			Out(&quot;No category/product contains '%s'\n&quot;, mess.c_str());
			Out(&quot;No search was performed\n&quot;);
			return;
		}
		Out(&quot;Warning: The string '%s' will only be searched on Category/Product, not in message\n&quot;, mess.c_str());
		mess.clear();
	}


	if (tag != &quot;*&quot; &amp;&amp; (tag.size() &lt; 4 || tag.size() &gt; 5))
	{
		Out(&quot;Tag: '%s' is invalid\n&quot;, tag.c_str());
		Out(&quot;It can be either '*' for all or be between 4 and 5 bytes\n&quot;);
		return;
	}
	unsigned int tagBin = StrToTag(tag);

	if (tagBin == 0 &amp;&amp; tag != &quot;*&quot;)
	{
		Out(&quot;Tag: '%s' is invalid\n&quot;, tag.c_str());
		Out(&quot;It does not contain a valid tag sequence\n&quot;);
		return;
	}


	if (tag == &quot;*&quot;)
	{
		swprintf_s(Buffer, MAX_MTNAME, L&quot;@$cursession.TTD.Calls(\&quot;onetnative!ULSSendFormattedTrace\&quot;, \&quot;Microsoft_Office_Server_Native!ULSSendFormattedTrace\&quot;).Select(c=&gt; new { param1 = c.Parameters[0], param2 = c.Parameters[1], param3 = c.Parameters[2], param4 = c.Parameters[3], start = c.TimeStart, sequence = c.TimeStart.Sequence, steps = c.TimeStart.Steps } )&quot;);
	}
	else
	{
		swprintf_s(Buffer, MAX_MTNAME, L&quot;@$cursession.TTD.Calls(\&quot;onetnative!ULSSendFormattedTrace\&quot;, \&quot;Microsoft_Office_Server_Native!ULSSendFormattedTrace\&quot;).Where(c =&gt; c.Parameters[0] == 0x%p).Select(c=&gt; new { param1 = c.Parameters[0], param2 = c.Parameters[1], param3 = c.Parameters[2], param4 = c.Parameters[3], start = c.TimeStart, sequence = c.TimeStart.Sequence, steps = c.TimeStart.Steps } )&quot;, tagBin);
	}

	std::wstring query(Buffer);

#if _DEBUG

	Out(&quot;%s = &quot;, tag.c_str());
	Out(&quot;%x	\n&quot;, tagBin);
	Out(&quot;dx %S\n&quot;, query.c_str());
#endif
	CComPtr&lt;IHostDataModelAccess&gt; client;
	HRESULT Status;
	REQ_IF(IHostDataModelAccess, client);

	CComPtr&lt;IDebugHost&gt; pHost;
	CComPtr&lt;IDataModelManager&gt; pManager;
	if (FAILED(client-&gt;GetDataModel(&amp;pManager, &amp;pHost)))
	{
		Out(&quot;Data Model could not be acquired\n&quot;);
		return;
	}

	CComPtr&lt;IDebugHostEvaluator2&gt; hostEval;
	CComPtr&lt;IModelObject&gt; spObject;
	pHost-&gt;QueryInterface(IID_PPV_ARGS(&amp;hostEval));

	startTime = GetTickCount64();
	if (!SUCCEEDED(hostEval-&gt;EvaluateExtendedExpression(USE_CURRENT_HOST_CONTEXT, query.c_str(), nullptr, &amp;spObject, nullptr)))
	{
		Out(&quot;Expression could not be evaluated\n&quot;);
		return;
	};


	CComPtr&lt;IModelObject&gt; pListOfBreaks;
	CComPtr&lt;IIterableConcept&gt; spIterable;
	if (SUCCEEDED(spObject-&gt;GetConcept(__uuidof(IIterableConcept), (IUnknown**)&amp;spIterable, nullptr)))
	{
		CComPtr&lt;IModelIterator&gt; spIterator;
		if (SUCCEEDED(spIterable-&gt;GetIterator(spObject, &amp;spIterator)))
		{
			//
			// We have an iterator.  Error codes have semantic meaning here.  E_BOUNDS indicates the end of iteration.  E_ABORT indicates that
			// the debugger host or application is trying to abort whatever operation is occurring.  Anything else indicates
			// some other error (e.g.: memory read failure) where the iterator MIGHT still produce values.

			std::vector&lt;UlsInstance&gt; queryResult; // It will store the list of parameters

			UINT32 Index = 0;
			//
			for (;;)
			{

				CComPtr&lt;IModelObject&gt; pBreakItem;
				CComPtr&lt;IKeyStore&gt; spContainedMetadata;

				HRESULT hr = spIterator-&gt;GetNext(&amp;pBreakItem, 0, nullptr, &amp;spContainedMetadata);
				if (hr == E_BOUNDS || hr == E_ABORT)
				{
					break;
				}


				if (FAILED(hr))
				{

					Out(&quot;There was a failure at an Item\n&quot;);
					continue;
					//
					// Decide how to deal with failure to fetch an element.  Note that pBreakItem *MAY* contain an error object
					// which has detailed information about why the failure occurred (e.g.: failure to read memory at address X).
					//
				}

				//
				// Read the values
				//
				CComPtr&lt;IModelObject&gt; tag;
				CComPtr&lt;IModelObject&gt; SevLevel;
				CComPtr&lt;IModelObject&gt; Category;
				CComPtr&lt;IModelObject&gt; Message;
				CComPtr&lt;IModelObject&gt; Start;
				CComPtr&lt;IModelObject&gt; Sequence;
				CComPtr&lt;IModelObject&gt; Steps;



				VARIANT vt_tag, vt_sevlevel, vt_category, vt_message, vt_sequence, vt_steps;

				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;param1&quot;, &amp;tag, NULL /* &amp;spContainedMetadata */))) { Out(&quot;Error reading param1&quot;); continue; }
				hr = tag-&gt;GetIntrinsicValue(&amp;vt_tag);
				//hr = tag-&gt;GetIntrinsicValueAs(VT_INT_PTR, &amp;vt_tag);
				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;param2&quot;, &amp;Category, NULL /* &amp;spContainedMetadata */))) { Out(&quot;Error reading param2&quot;); continue; };
				hr = Category-&gt;GetIntrinsicValue(&amp;vt_category);
				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;param3&quot;, &amp;SevLevel, NULL /* &amp;spContainedMetadata */))) { Out(&quot;Error reading param3&quot;); continue; };
				hr = SevLevel-&gt;GetIntrinsicValue(&amp;vt_sevlevel);

				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;param4&quot;, &amp;Message, NULL /* &amp;spContainedMetadata */)))
				{
					Out(&quot;Error reading param4&quot;);		continue;
				};
				hr = Message-&gt;GetIntrinsicValue(&amp;vt_message);
				if (hr = FAILED(pBreakItem-&gt;GetKeyValue(L&quot;start&quot;, &amp;Start, NULL /* &amp;spContainedMetadata */)))
				{
					Out(&quot;Error reading start&quot;); continue;
				};
				//hr = Start-&gt;GetIntrinsicValue(&amp;vt_start); // It fails here because the type in ObjectSynthetic
				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;sequence&quot;, &amp;Sequence, NULL /* &amp;spContainedMetadata */)))
				{
					Out(&quot;Error reading sequence&quot;);		continue;
				};
				hr = Sequence-&gt;GetIntrinsicValue(&amp;vt_sequence);

				if (FAILED(hr = pBreakItem-&gt;GetKeyValue(L&quot;steps&quot;, &amp;Steps, NULL /* &amp;spContainedMetadata */)))
				{
					Out(&quot;Error reading steps&quot;);	continue;
				};
				hr = Steps-&gt;GetIntrinsicValue(&amp;vt_steps);

				if (IsInterrupted())
				{
					break;
				}
				UlsInstance obj;


				obj.Category = vt_category.uintVal;
				obj.Message = vt_message.llVal; //vt_category.llVal);
				obj.SevLevel = vt_sevlevel.uintVal;
				obj.Sequence = vt_sequence.uintVal;
				obj.Steps = vt_steps.llVal;
				obj.tag = vt_tag.uintVal;
				obj.Index = Index;
				if (catVector.size() &gt; 0)
				{
					if (catVector.find((int)obj.Category) == catVector.end())
					{
						continue;
					}
				}

				// Only move if necessary
				bool show = true;
				string fullMess;
				
				if ((mess.size() &gt; 0 || !nomess) &amp;&amp; SUCCEEDED(MoveTo(Start)))
				{
					CComBSTR stringConv;
					CComPtr&lt;IDebugHostContext&gt; context;
					CComPtr&lt;IDebugHostMemory&gt; memory;
					if (SUCCEEDED(hr = pHost-&gt;QueryInterface(__uuidof(IDebugHostMemory), (void**)&amp;memory)))
					{
						ULONG64 BytesRead = 0;
						Location loc;
						loc.HostDefined = 0;
						loc.Offset = obj.Message;
						if (SUCCEEDED(hr = memory-&gt;ReadBytes(USE_CURRENT_HOST_CONTEXT, loc, Buffer, MAX_MTNAME * 2, &amp;BytesRead)))
						{
							
							Buffer[MAX_MTNAME - 1] = L'&#092;&#048;';
							fullMess = CW2A(Buffer);
							if (mess.size() &gt; 0)
							{
								show = fullMess.find(mess) != std::string::npos;
							}
						}

					}
					if (hr != S_OK)
					{
						fullMess = &quot;*** Unable to read memory ***&quot;;
						show = true;
					}

				}
				if (show)
				{
					Index++;
					Dml(&quot;&lt;link cmd=\&quot;!tt %S\&quot;&gt;%S&lt;/link&gt;\t&quot;, obj.IDnaPosition().c_str(), obj.IDnaPosition().c_str());
					string area;
					string prod;

					string sev = SPCategories::GetSevLevel(static_cast&lt;int&gt;(obj.SevLevel));

					SPCategories::GetAreaName(obj.Category, area, prod);
					if (!nomess)
					{
						SYSTEMTIME time;
						if (!GetTime(time, true))
						{
							Out(&quot;??/??/???? ??:??:??.??\t&quot;);
						}
						else
						{
							Out(&quot;%02i/%02i/%04i %02i:%02i:%02i.%02i\t&quot;, time.wMonth, time.wDay, time.wYear, time.wHour,
								time.wMinute, time.wSecond, time.wMilliseconds / 10);
						}
					}
					Out(&quot;%s\t&quot;, area.c_str());
					Out(&quot;%s\t&quot;, prod.c_str());
					Out(&quot;%s\t&quot;, sev.c_str());



					Out(&quot;%s\t&quot;, TagToStr(obj.tag).c_str());
					
					if (!nomess)
					{
						if (mess.size() &gt; 0 &amp;&amp; !catonly)
							DisplayFound(fullMess, mess);
						else
							Out(&quot;%s&quot;, fullMess.c_str());
					}
					queryResult.push_back(obj);
					Out(&quot;\n&quot;);
				}



			}
			Out(&quot;%u Instances\n&quot;, Index);
			endTime = GetTickCount64();
			Out(&quot;Search took %f seconds\n&quot;, (float)(((float)endTime - (float)startTime) / (float)1000));
		}
	}
}
[/cpp]
<h3>Example 1 – Looking for a particular tag and message</h3>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/032818_0035_Leveragingt2.png" />
<h3>Example 2 – Listing all instances</h3>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/032818_0035_Leveragingt3.png" />]]></content:encoded>
    </item>
    <item>
      <title>Leveraging the new WinDbgX and Time-Travel-Trace –Script to list all access to files</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/leveraging-the-new-windbgx-and-time-travel-trace-script-to-list-all-access-to-files</link>
      <pubDate>Thu, 08 Mar 2018 18:38:33 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=965</guid>
      <description><![CDATA[&nbsp; WinDbg Preview a.k.a. WinDbgX aesthetically looks like a marriage between Visual Studio (VS)...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>WinDbg Preview a.k.a. WinDbgX aesthetically looks like a marriage between Visual Studio (VS) and WinDbg, however VS and WinDbg have not many things in common. For me, this is the good news. The bad news is that the support for managed code is as limited as WinDbg’s. You can download the preview here: <a title="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools">https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools</a></p> <p>&nbsp;</p> <p>The most impressive feature of the new debugger is by far the ability to create dump files to later be analyzed as live debugging. This is called Time-Travel-Debugging (TTD). The idea is that you can record an actual live process (at a performance penalty) to later debug going back and forth in time, thus the name. A good use for this is to capture a ‘live dump’ on a production server and analyze the dump later on another environment with access to source code and symbols. If you are a software provider, this is golden. Sometimes, only a particular environment causes the error and your logs do not show much that can help you identify the problem. Recording on a place and debugging on your development lab does not require that you ship your private symbols and source code to a customer’s environment. You may learn more here: <a title="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview">https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview</a></p> <p>&nbsp;</p> <p>The analysis is done via a LinQ like syntax that can be used directly from the debugger command window or automated via a classic debugger extension or a JavaScript extension. In this post, I am presenting a proof-of-concept script that shows all instances when a file is accessed. More on WinDbg scripting here: <a title="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/javascript-debugger-scripting" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/javascript-debugger-scripting">https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/javascript-debugger-scripting</a></p> <p>&nbsp;</p> <h3>Proof of concept OpenFileList.js (this script only WORKS with TTD dumps – .run files)</h3> <div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;border-left: silver 1px solid;margin: 20px 0px 10px;line-height: 12pt;padding-right: 4px;max-height: 200px;background-color: #f4f4f4"> <div id="codeSnippet" style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white"><span style="color: #006080">"use strict"</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">var</span> FileAccess =</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    {</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_READ_DATA: 0x0001,    <span style="color: #008000">/* file &amp; pipe */</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_LIST_DIRECTORY: 0x0001,    <span style="color: #008000">/* directory */</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_WRITE_DATA: 0x0002,    <span style="color: #008000">// file &amp; pipe</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_ADD_FILE: 0x0002,    <span style="color: #008000">// directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_APPEND_DATA: 0x0004,    <span style="color: #008000">// file</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_ADD_SUBDIRECTORY: 0x0004,    <span style="color: #008000">// directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_CREATE_PIPE_INSTANCE: 0x0004,    <span style="color: #008000">// named pipe</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_READ_EA: 0x0008,    <span style="color: #008000">// file &amp; directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_WRITE_EA: 0x0010,    <span style="color: #008000">// file &amp; directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_EXECUTE: 0x0020,    <span style="color: #008000">// file</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_TRAVERSE: 0x0020,    <span style="color: #008000">// directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_DELETE_CHILD: 0x0040,    <span style="color: #008000">// directory</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_READ_ATTRIBUTES: 0x0080,    <span style="color: #008000">// all</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_WRITE_ATTRIBUTES: 0x0100,    <span style="color: #008000">// all</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        DELETE: 0x10000,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        WRITE_DAC: 0x40000,   </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        WRITE_OWNER: 0x80000, </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        SYNCHRONIZE: 0x100000, </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        ACCESS_SYSTEM_SECURITY: 0x11F01FF,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        GENERIC_READ: 0x80000000,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        GENERIC_WRITE: 0x40000000,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        GENERIC_EXECUTE: 0x20000000,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        GENERIC_ALL: 0x10000000</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    };</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">var</span> FileShare = </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    {</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_SHARE_NONE: 0,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_SHARE_READ: 0x00000001,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        FILE_SHARE_WRITE: 0x00000002,</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        FILE_SHARE_DELETE: 0x00000004</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    };</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><span style="color: #0000ff">function</span> PrintFileAccess(Access)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">{</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">var</span> flag = <span style="color: #006080">""</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access == 0)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">      <span style="color: #0000ff">return</span> <span style="color: #006080">"None"</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_ADD_FILE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = <span style="color: #006080">"FILE_ADD_FILE"</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_ADD_SUBDIRECTORY)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_ADD_SUBDIRECTORY"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_APPEND_DATA)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_APPEND_DATA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_CREATE_PIPE_INSTANCE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_CREATE_PIPE_INSTANCE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_DELETE_CHILD)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_DELETE_CHILD"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_EXECUTE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_EXECUTE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_LIST_DIRECTORY)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_LIST_DIRECTORY"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_READ_ATTRIBUTES)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_READ_ATTRIBUTES"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_READ_DATA)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_READ_DATA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_READ_EA)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_READ_EA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.GENERIC_ALL)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" GENERIC_ALL"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.GENERIC_EXECUTE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" GENERIC_EXECUTE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.GENERIC_READ)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" GENERIC_READ"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.GENERIC_WRITE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" GENERIC_WRITE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_TRAVERSE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_TRAVERSE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_WRITE_DATA)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_WRITE_DATA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.FILE_WRITE_EA)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" FILE_WRITE_EA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.DELETE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" DELETE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.WRITE_DAC)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" WRITE_DAC"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.WRITE_OWNER)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" WRITE_OWNER"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.SYNCHRONIZE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" SYNCHRONIZE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">if</span>(Access &amp; FileAccess.ACCESS_SYSTEM_SECURITY)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">       flag = flag.concat(<span style="color: #006080">" ACCESS_SYSTEM_SECURITY"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">return</span> flag;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">}</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white"><span style="color: #0000ff">function</span> PrintFileShare(Share)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">{</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">var</span> flag = <span style="color: #006080">""</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">if</span>(Share == 0)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">      <span style="color: #0000ff">return</span> <span style="color: #006080">"None"</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">if</span>(Share &amp; FileShare.FILE_SHARE_DELETE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">       flag = <span style="color: #006080">"FILE_SHARE_DELETE"</span>;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">if</span>(Share &amp; FileShare.FILE_SHARE_READ)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">       flag = flag.concat(<span style="color: #006080">" FILE_SHARE_READ"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">if</span>(Share &amp; FileShare.FILE_SHARE_WRITE)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">       flag = flag.concat(<span style="color: #006080">" FILE_SHARE_WRITE"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">return</span> flag;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">       </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">}</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><span style="color: #0000ff">function</span> findFileHandle()</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">{</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; <span style="color: #0000ff">var</span> fileOper = host.currentSession</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .TTD.Calls(<span style="color: #006080">"KERNELBASE!CreateFileW"</span>, <span style="color: #006080">"KERNELBASE!CreateFileA"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; <span style="color: #0000ff">var</span> locations = [];</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">for</span>(<span style="color: #0000ff">var</span> loc of fileOper)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    {</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        <span style="color: #0000ff">var</span> posObj = {Start: loc.TimeStart, FileNameAddr: loc.Parameters[0],</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">              Access: loc.Parameters[1], ShareMode: loc.Parameters[2],</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">              Result: loc.ReturnAddress, Ansi: loc.Function.includes(<span style="color: #006080">"CreateFileA"</span>) };</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">        locations.push(posObj);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">        </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    }</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">return</span> locations;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">}  </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><span style="color: #0000ff">function</span> printFileName(location)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">{</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; host.diagnostics.debugLog(<span style="color: #006080">"------------------------------------------------\n"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; location.Start.SeekTo();</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; host.diagnostics.debugLog((location.Result &gt; 0 ? <span style="color: #006080">"(SUCCESS) "</span> : <span style="color: #006080">"(Failure) "</span>) +</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">                       (location.Ansi ? host.memory.readString(location.FileNameAddr) : host.memory.readWideString(location.FileNameAddr)) + <span style="color: #006080">"\n"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">    <span style="color: #0000ff">var</span> access = host.evaluateExpression(location.Access.toString(16)+<span style="color: #006080">" &amp; 0xffffffff"</span>)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">var</span> share = host.evaluateExpression(location.ShareMode.toString(16)+<span style="color: #006080">" &amp; 0xffffffff"</span>)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #008000">// host.diagnostics.debugLog(access.toString(16) + " " + share.toString(16)+" ");</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">                        </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    host.diagnostics.debugLog(<span style="color: #006080">"Access: ["</span>+access.toString(16)+<span style="color: #006080">"] "</span>+PrintFileAccess(access)+<span style="color: #006080">" Share: ["</span>+</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">                    share.toString(16) + <span style="color: #006080">"] "</span>+PrintFileShare(share) + <span style="color: #006080">"\n"</span>);  </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">    <span style="color: #0000ff">return</span>;                   </pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">}</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><span style="color: #0000ff">function</span> invokeScript()</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">{</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; host.diagnostics.debugLog(<span style="color: #006080">"Collecting File Access information...\n"</span>);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; <span style="color: #0000ff">var</span> currentPosition = host.currentThread.TTD.Position;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; <span style="color: #0000ff">var</span> locations = findFileHandle();</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;&nbsp;&nbsp; <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> location of locations)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; {</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printFileName(location);</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; }</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;&nbsp;&nbsp; currentPosition.SeekTo();</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">}</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--></div></div>
<p>&nbsp;</p>
<p>This is an example of the output:</p>
<div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;border-left: silver 1px solid;margin: 20px 0px 10px;line-height: 12pt;padding-right: 4px;max-height: 200px;background-color: #f4f4f4">
<div id="codeSnippet" style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Collecting File Access information...</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 1DB4F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(2370.2184): Break instruction exception - code 80000003 (first/second chance not available)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Time Travel Position: 1DB4F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">KERNELBASE!CreateFileW:</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">00007ffe`d0258460 4883ec58        sub     rsp,58h</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">Collecting File Access information...</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">Setting position: 1DB4F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">(2370.2184): Break instruction exception - code 80000003 (first/second chance not available)</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">Time Travel Position: 1DB4F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">KERNELBASE!CreateFileW:</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">00007ffe`d0258460 4883ec58        sub     rsp,58h</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Collecting File Access information...</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 1DB4F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 42094:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 4211F:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 1DBCD:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 414C5:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint.Publishing\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Publishing.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 4219E:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 1DC4B:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Setting position: 4221C:4D</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">(SUCCESS) C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">Access: [0x4c4b400]  WRITE_DAC ACCESS_SYSTEM_SECURITY Share: [0x1]  FILE_SHARE_READ</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">------------------------------------------------</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">(...)</pre><!--CRLF--></div></div>]]></content:encoded>
    </item>
    <item>
      <title>After updating SharePoint 2013 to November 2017 CU or later you may not be able to open documents with Office</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/after-updating-sharepoint-2013-to-november-2017-cu-or-later-you-may-not-be-able-to-open-documents-with-office</link>
      <pubDate>Tue, 05 Dec 2017 19:45:40 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=946</guid>
      <description><![CDATA[*** UPDATED TO INCLUDE Stefan Gossner and Adam Soreson's INPUT ***
Symptom
After updating...]]></description>
      <content:encoded><![CDATA[*** UPDATED TO INCLUDE Stefan Gossner and Adam Soreson's INPUT ***
<h1>Symptom</h1>
After updating SharePoint 2013 to November 2017 CU from a previous version you will not be able to open Office documents (Word, Excel, PowerPoint) but other types of documents like .txt and .pdf files can be opened. There is no indication of the error in the ULS log.

Observing the network activity using a tool like Telerik's Fiddler, you will notice that the response from cellstorage.svc is 400 (bad format) or 401 (unauthorized). This is why the Office Integration piece fails and other file types succeed. The failed request will look like:
<pre>POST /_vti_bin/cellstorage.svc/CellStorageService</pre>
<h1>Cause</h1>
November CU brings a breaking update to stssoap.dll. This dll is normally cached in the _app_bin folder of the web application and it does get updated at the 15 hive bin folder but not at the local web applications bin folder.

For example, imagine a web application for portal.contoso.com, on location C:\inetpub\wwwroot\wss\VirtualDirectories\portal.contoso.com80. You will find stssoap.dll in  C:\inetpub\wwwroot\wss\VirtualDirectories\portal.contoso.com80\_app_bin\stssoap.dll version not to match the version in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\CONFIG\BIN\stssoap.dll.

The main cause for this is that the update was not done properly (i.e. via Wizard or using all the appropriate commands via PSConfig).

&nbsp;
<h1>Resolution</h1>
<span style="margin: 0px;color: #333333;font-family: 'Segoe UI',sans-serif;font-size: 10.5pt">The DLL version in the 15 hive should be at <strong><span style="margin: 0px;font-family: 'Segoe UI',sans-serif">15.0.4981.1000 (10/17/2017) or higher</span></strong>. The local version in local bin should be dated before <strong><span style="margin: 0px;font-family: 'Segoe UI',sans-serif">10/17/2017</span></strong>. <strong><span style="margin: 0px;font-family: 'Segoe UI',sans-serif">If this is not the case, this solution does not apply to you. The solution also applies to you if the version in 15 hive is newer than the version of the local bin for future stssoap.dll changes.</span></strong></span>

Make sure you run the update properly. <strong>Always prefer to use Configuration Wizard</strong> over PSConfig to update.

This command should update only the web applications _app_bin, but <strong>this is not the best solution</strong>:
<pre>PSConfig.exe -cmd applicationcontent -install</pre>
See more details <a href="https://blogs.technet.microsoft.com/stefan_gossner/2015/08/20/why-i-prefer-psconfigui-exe-over-psconfig-exe/">here</a>.

<strong>The best solution is to run the configuration Wizard</strong> or to emulate all the steps of the configuration wizard using this:
<pre>PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install</pre>
&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 and 2016 does not respect the user zone when sending alerts but the Cross Firewall Access Zone (an unusual scenario)</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/sharepoint-2013-and-2016-does-not-respect-the-user-zone-when-sending-alerts-but-the-cross-firewall-access-zone-an-unusual-scenario</link>
      <pubDate>Mon, 30 Oct 2017 13:04:02 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=945</guid>
      <description><![CDATA[&nbsp; Symptoms Consider you have a one Web Application with at least two zones. The extranet zone...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <h3>Symptoms</h3> <p>Consider you have a one Web Application with at least two zones. The extranet zone (<strong>https://sp2016 </strong>in this example) and an intranet zone (<strong>http:sp2016:100</strong> in this example). The cross firewall zone is the intranet zone (<strong>http:sp2016:100</strong> in this example). <strong>Notice that this is an unusual scenario</strong> as extranet is the natural candidate to the cross firewall access zone.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/10/image1196.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/10/image_thumb1119.png" width="644" height="315"></a></p> <p>&nbsp;</p> <p>A user with access to the extranet site navigates to a document library on the zone where he/she has access, and then add an alert for all changes for a document. The first e-mail will point to the zone where customer created the alert, subsequent alerts will point to the intranet zone which user cannot access from the extranet.</p> <p>&nbsp;</p> <h3>Steps to reproduce</h3> <ul> <li>Go to Library ribbon –&gt; Alert me&nbsp; -&gt; Set alert on this library</li></ul> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/10/image1197.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/10/image_thumb1120.png" width="644" height="356"></a></p> <p>&nbsp;</p> <ul> <li>The first e-mail will point to <strong>https://sp2016</strong> </li> <li>When a change occurs in the document the new alerts will point to the Cross Firewall Access zone (<strong>https://sp2016:100 </strong>in this example) .</li></ul> <p>&nbsp;</p> <h3>Cause</h3> <p>This is by design in 2013 and 2016 but it breaks with the behavior when compared to SharePoint 2010 which would send an e-mail based on where it was created.</p> <p>In SharePoint 2010 the alert link goes unmodified pointing to the location it was created. In 2013 and 2016, the direct link was modified and the link goes mediated by Redirect.aspx which will reroute the call to the<strong> Cross Firewall Access Zone.</strong></p> <h3>Workaround:</h3> <p>It is possible to override the behavior by enabling a special flag in the Farm. Below is the PowerShell script to do so.</p> <p>&nbsp;</p> <div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;border-left: silver 1px solid;margin: 20px 0px 10px;line-height: 12pt;padding-right: 4px;max-height: 200px;background-color: #f4f4f4"> <div id="codeSnippet" style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">$farm = Get-SPFarm</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">$farm.ServerDebugFlags.Add(34) #Flag <span style="color: #0000ff">to</span> disable ClickRedirect</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">$farm.Update()</pre><!--CRLF--></div></div>]]></content:encoded>
    </item>
    <item>
      <title>Tool to generate DebugDiag rule for SharePoint based on event id (Tag) and optionally a partial message</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/tool-to-generate-debugdiag-rule-for-sharepoint-based-on-event-id-tag-and-optionally-a-partial-message</link>
      <pubDate>Wed, 30 Aug 2017 17:44:58 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=915</guid>
      <description><![CDATA[When I updated my post on how to create DebugDiag rule based on event id (Tag), I received some...]]></description>
      <content:encoded><![CDATA[When I updated my post on how to create <a target="_blank" href="https://blogs.msdn.microsoft.com/rodneyviana/2016/05/26/creating-debugdiag-2-rule-to-generate-sharepoint-2010-2016-process-dump-based-on-uls-tags-and-message/" rel="noopener noreferrer" title="Debug Rule for SharePoint Tags">DebugDiag rule</a> based on event id (Tag), I received some feedback that modifying the scripts is quite error prone and more often than not the resulting script would not work as expected. To that end, I decided to create a visual tool that will create the rule template based on the parameters that matter. This rule template can be imported directly into DebugDiag. Please use DebugDiag 2 Update 2 (or later) which you can download from Microsoft. So let’s see two different scenarios.

Download the tool here: <a href="https://github.com/rodneyviana/blogdemos/raw/master/CreateSPDebugRule.zip" title="Download">Tool Binaries</a>

Unzip the files to your tool folders.

<strong>NOTE:</strong> Normally when you download an EXE (zipped or not) from the Internet, Windows will block the execution. To resolve this, right click on CreateSPDebugRule.exe and check ‘Unblock’ and click OK:

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image570.png"><img width="324" height="484" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb460.png" border="0" /></a>

&nbsp;
<h2>When the ULS log entry points to w3wp.exe</h2>
We plan to generate a dump file based on this fresh ULS entry:

<span style="font-family: Courier New">08/30/2017 14:48:18.80    w3wp.exe <strong>(0x3820)</strong>    0x2714    SharePoint Foundation    DistributedCache    <strong>air4a</strong>    Monitorable    Token Cache: Failed to get token from distributed cache for '0).w|s-1-5-21-3258600628-1467426315-3527673178-500'.(This is expected during the process warm up or if data cache Initialization is getting done by some other thread).    aa74149e-4d3f-b0b8-39ea-4e89c1505cc6
</span>

&nbsp;

<strong>IMPORTANT:</strong> The entry needs to be fresh because the process id changes when IIS resets.

&nbsp;

Along with the process name, ULS logs include the process id (PID) in hex format. In this case, the thread is 0x3820 which is  14368 in decimal. There is an easy way to identify the application pool via command prompt.

Run from an elevated command prompt (IT WILL NOT WORK ON POWERSHELL):

<span style="font-family: Courier New">%windir%\system32\inetsrv\appcmd list wp</span>

<span style="font-family: Courier New"></span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image571.png"><img width="644" height="333" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb461.png" border="0" /></a>

&nbsp;

So we learned the application pool name is ‘SharePoint – 80’.

You can fill out the form as below. Notice that I add a ‘partial message’ – this is necessary when a tag is too generic and you just want to capture when the message contains some pattern. The tag bz7l which I discussed in several occasions for example is very specific, it only occurs when a claim credential cannot be converted to Windows credential, so there is no need to add a partial message. In doubt, add a partial message. I can choose the number of dump files to be created by the rule (the default is 5).

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image572.png"><img width="643" height="484" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb462.png" border="0" /></a>

&nbsp;

You do not need to run the tool on the server where the dump will be captured, but if you do you have the advantage of Select the Application Pool by clicking the Select… button (you need to run the tool in administration mode for this). The selection window looks like that.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image573.png"><img width="481" height="484" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb463.png" border="0" /></a>

&nbsp;

If you have everything in place you click on Generate Template… and choose a name (the name will not affect the name of the rule name in DebugDiag).

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image574.png"><img width="644" height="404" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb464.png" border="0" /></a>

&nbsp;
<h2>To import the rule into DebugDiag</h2>
<ul>
 	<li>Run ‘DebugDiag 2 Collect’.</li>
 	<li>Click ‘Cancel’ to close the Rule Wizard.</li>
 	<li>Click the ‘Import’ button to load the rule you created with the tool</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image575.png"><img width="644" height="312" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb465.png" border="0" /></a>
<ul>
 	<li>Click Ok to accept the rule settings</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image576.png"><img width="644" height="402" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb466.png" border="0" /></a>

&nbsp;
<ul>
 	<li>Notice that the rule will not be active when you import. You need to right-click the rule and choose Activate Rule. If this is the first time you activate a rule there will be several pop-ups from DebugDiag, just accept all defaults.</li>
 	<li>Once the rule is active, the dump will be generated when the condition occurs.</li>
</ul>
&nbsp;
<h2>When the ULS log entry points to a process</h2>
For this scenario,, we plan to generate a dump file based on this ULS entry:

<span style="font-family: Courier New">08/30/2017 14:48:29.28    <strong>OWSTIMER.EXE</strong> (0x1A94)    0x04E4    SharePoint Server Search    Administration    <strong>ajzc7</strong>    Medium    Cleanup of <strong>Orphan Systems</strong> in server CONTOSOWFE    ac74149e-4d87-b0b8-39ea-409643feb4b7</span>

&nbsp;

Notice that this time, you do not need a fresh ULS log because we will capture based on a service (actually based on a process name). OWSTIMER.exe is the name for the SPTimerV4 service, The tool needs the process name which is how it shows in ULS log already. You can fill out this rule like below. Notice I chose ‘Application/Service’ this time. You can also use the Select… button to choose the process if you are running the tool on the server. This is the form filled out:

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/image577.png"><img width="644" height="484" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb467.png" border="0" /></a>

&nbsp;

Feel free to play around and adapt the tool by changing the source code if you want to. The project zip is somewhere at: <a href="https://github.com/rodneyviana/blogdemos" title="https://github.com/rodneyviana/blogdemos">https://github.com/rodneyviana/blogdemos</a>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell CmdLet to check OneDrive for Business or OneDrive Personal Status</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/powershell-cmdlet-to-check-onedrive-for-business-or-onedrive-personal-status</link>
      <pubDate>Tue, 06 Jun 2017 19:29:13 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=787</guid>
      <description><![CDATA[&nbsp; My good friend Neil Hodgkinson gave me a challenge: some partners and companies were asking...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>My good friend <a href="https://social.technet.microsoft.com/profile/Neil+Hodgkinson+-+MSFT+-+MCM" target="_blank">Neil Hodgkinson</a> gave me a challenge: some partners and companies were asking him how to verify the status of OneDrive. He gave me the idea to check the icon of the OneDrive folder and depending on the icon, tell the status. I created a proof-of-concept and then helped some folks at Microsoft Consulting Services to have a PowerShell cmdlet to do so. Not being enough the status of OneDrive using the regular OneDrive synchronization, I also included the status of OneDrive when synchronized via Groove (yes, people still use it).</p> <p>The project is open source and available in <a href="https://github.com/rodneyviana/ODSyncService" target="_blank">GitHub</a>. To get only the PowerShell cmdlet, download OneDriveLib.dll <a href="https://github.com/rodneyviana/ODSyncService/tree/master/Binaries/PowerShell" target="_blank">here</a>. License is MIT and can be found <a href="https://github.com/rodneyviana/ODSyncService/blob/master/license.txt" target="_blank">here</a>. It is an open source project so it is not entitled for Microsoft support but I will do my best to respond questions in this post. Just ask them in comments.</p> <p>&nbsp;</p> <h3>How to use:</h3> <ul> <li>Open PowerShell is normal mode (it will not work in Elevated mode for OneDrive own design)</li> <li>Import the module OneDriveLib.dll</li> <li>Run Get-ODStatus</li></ul> <p>&nbsp;</p> <h4>Syntax:</h4> <p>Get-ODStatus [-Type &lt;type-pattern&gt;] [-ByPath &lt;path&gt;]</p> <p>&nbsp;</p> <h4>Where:</h4> <p>-Type &lt;type-pattern&gt; let you filter by OneDrive type (e.g. Personal or Business) [optional]</p> <p>-ByPath &lt;path&gt; if the folder information is not in the registry you can test a particular folder (this form will return only a status string)</p> <p>&nbsp;</p> <h4>Examples:</h4> <p>Get-ODStatus –Type Business</p> <p>Get-ODStatus –ByPath c:\user\rodneyviana\onedrive</p> <p>&nbsp;</p> <p>Example of output</p> <div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;border-left: silver 1px solid;margin: 20px 0px 10px;line-height: 12pt;padding-right: 4px;max-height: 200px;background-color: #f4f4f4"> <div id="codeSnippet" style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4"><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">PS C:\ODTool&gt;<span style="color: #008000">; Import-Module OneDriveLib.dll</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">PS C:\ODTool&gt;<span style="color: #008000">; Get-ODStatus</span></pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">StatusString : UpToDate</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">LocalPath    : E:\MicrosoftOnedrive\OneDrive - Contoso</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">UserSID      : S-1-5-21-124012345-708012345-1543012345-802000</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">UserName     : CONTOSO\rodneyviana</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">ServiceType  : Business1</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">&nbsp;</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">StatusString : UpToDate</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">LocalPath    : D:\Onedrive</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">UserSID      : S-1-5-21-124012345-708012345-1543012345-802000</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: white">UserName     : CONTOSO\rodneyviana</pre><!--CRLF--><pre style="border-top-style: none;font-size: 8pt;overflow: visible;border-left-style: none;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4">ServiceType  : Personal</pre><!--CRLF--></div></div>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013/2016 RSS Viewer not working with external sites when through a proxy</title>
      <link>https://docs.microsoft.com/archive/blogs/rodneyviana/sharepoint-20132016-rss-viewer-not-working-with-external-sites-when-through-a-proxy</link>
      <pubDate>Tue, 25 Apr 2017 18:45:17 GMT</pubDate>
      <dc:creator><![CDATA[Rodney Viana - MSFT - SharePoint]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rodneyviana/?p=785</guid>
      <description><![CDATA[&nbsp;

Recently I worked on a case for a Fortune 500 company that was having problems to render...]]></description>
      <content:encoded><![CDATA[&nbsp;

Recently I worked on a case for a Fortune 500 company that was having problems to render the RSS Viewer Web Part in their SharePoint 2013 farm. They still have a SharePoint 2010 farm in the same network environment and this farm was not having problems rendering the RSS Viewer. The constraint was this: access to outside sites requires going through a proxy. Default proxy configuration is a tricky thing. It can be done in several ways: DHCP settings, DNS settings, registry settings, Internet Explorer (for the user logged in only) or for .NET applications via configuration. In production environment is always a good idea to inform the default proxy explicitly since auto-discovery may take a few seconds the first time the process try it for an endpoint. So, initially we configured their proxy explicitly by adding this in the web.config file of the SharePoint application. So, for the local domain ‘<strong>contoso.com</strong>’, proxy address ‘<strong>https://proxy.contoso.com:8080</strong>’ this is the configuration:
<div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;font-family: 'Courier New', courier, monospace;width: 97.5%;direction: ltr;text-align: left;margin: 20px 0px 10px;line-height: 12pt;max-height: 200px;background-color: #f4f4f4;border: silver 1px solid;padding: 4px">
<div id="codeSnippet" style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">system.net</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">defaultProxy</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">proxy</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">            <span style="color: #ff0000">usesystemdefault</span><span style="color: #0000ff">="false"</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">            <span style="color: #ff0000">autoDetect</span><span style="color: #0000ff">="false"</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">            <span style="color: #ff0000">proxyaddress</span><span style="color: #0000ff">="https://proxy.contoso.com:8080"</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">            <span style="color: #ff0000">bypassonlocal</span><span style="color: #0000ff">="true"</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">        <span style="color: #0000ff">/&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">      <span style="color: #0000ff">&lt;</span><span style="color: #800000">bypasslist</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">address</span><span style="color: #0000ff">="[a-zA-Z0-9\.]+\.contoso\.com$"</span> <span style="color: #0000ff">/&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">      <span style="color: #0000ff">&lt;/</span><span style="color: #800000">bypasslist</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">defaultProxy</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">system.net</span><span style="color: #0000ff">&gt;</span></pre>
<!--CRLF-->

</div>
</div>
This configuration is better placed one line below &lt;configuration&gt; or one line above &lt;/configuration&gt;. Another important thing concerning bypass list: one <strong>should never</strong> use <strong>*</strong> at the beginning of an exclusion item. System.Net uses RegEx to check whether the address is in exclusion or not and will fail if wildcard is used (specially if it starts with '*' which is a no-no in .NET RegEx. The regex equivalent to * is ‘<strong>[a-zA-Z0-9\.\-]+</strong>’.

They added the suggested configuration and analyzing the dump file we could confirm the proxy configuration was applied. Still we were seeing the error below in the ULS logs:

<span style="font-family: 'Courier New'">DATE TIME    w3wp.exe (0x15B4)    0x4878    SharePoint Portal Server    Web Parts    8imh    High    <strong>RssWebPart: Exception handed to HandleRuntimeException.HandleException System.Net.Sockets.SocketException (0x80004005): No such host is known</strong>     at System.Net.Dns.GetAddrInfo(String name)     at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)     at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)     at Microsoft.SharePoint.Utilities.CommonUtility.IsIntranetAddress(String hostName)     at Microsoft.SharePoint.Utilities.SPWebRequest.PreventIntranetCalls(Uri requestUri, SPContext context, String sharePointMarkValue, String appContextLoggingValue)     at Microsoft.SharePoint.Utilities.SPWebRequest.SafeCreate(Uri requestUri, SPContext context, Type callingType, String callingInstanceTag)     at Microsoft.SharePoint.WebControls.XmlUrlDataSource.FetchData(String requestUrl)     at Microsoft.SharePoint.WebControls.BaseXmlDataSource.Execute(String request)     at Microsoft.SharePoint.WebControls.BaseXmlDataSource.GetXmlDocument()     at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal()     at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathNavigator(String viewPath)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)</span>

&nbsp;

We captured a dump file and could confirm that .NET was indeed applying the proxy configuration. We did some more troubleshooting and we tested in a lab farm. Things worked like a charm for us. Also the SharePoint 2010 farm worked as expected. We noticed that the last public method called before failure was this one:

<span style="font-family: 'Courier New'"><strong>System.Net.Dns.GetHostAddresses(String hostNameOrAddress)</strong></span>

And this was odd, since proxy resolution will first try to request the page via the proxy server and then if, and only if, it fails it will try DNS resolution. Checking the source code (you may achieve the same result with reflection) we were able to find out the culprit: if SPFarm.Properties.DisableIntranetCalls or SPFarm.Properties.DisableIntranetCallsFromApps (if it is an App application) is set to true, SharePoint will use DNS to verify whether the address is intranet or internet. As the address cannot be resolved because the rss feed site is not in the DNS and can only be resolved via proxy which would be the next step after this, SharePoint throws the exception you see in the ULS log entry above.

So, how to resolve this issue? The solution is very counter-intuitive: set <strong>DisableIntranetCalls</strong> and <strong>DisableIntranetCallsFromApps</strong> to false and it will work. Then you may ask yourself, if the call is extranet why enabling internet calls will resolve the issue? The answer is the fact that if these properties are set to false the call to resolve the address via DNS will not be called so there will be no exception and the retrieval of the page will occur without a problem.

Is this change introducing security risk to SharePoint? Not at all. This property is rather to force people to use better web parts to list a feed of a local site.

This PowerShell script will disable the undesired DNS search if you are facing this issue:

&nbsp;
<div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;font-family: 'Courier New', courier, monospace;width: 97.5%;direction: ltr;text-align: left;margin: 20px 0px 10px;line-height: 12pt;max-height: 200px;background-color: #f4f4f4;border: silver 1px solid;padding: 4px">
<div id="codeSnippet" style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px"><span style="color: #008000"># These commands will prevent SharePoint from trying to resolve the RSS name host in DNS which may cause problem with proxies </span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px"><span style="color: #008000"># </span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px"> Add-PSSnapin Microsoft<span style="color: #ff0000">.</span>SharePoint<span style="color: #ff0000">.</span>PowerShell</pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px"></pre>

<!--CRLF-->

<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px"> <span style="color: #cc6633">$</span>farm = Get-SPFarm</pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px"> <span style="color: #cc6633">$</span>farm<span style="color: #ff0000">.</span>Properties<span style="color: #ff0000">.</span>DisableIntranetCalls = <span style="color: #cc6633">$</span>false</pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px"> <span style="color: #cc6633">$</span>farm<span style="color: #ff0000">.</span>Properties<span style="color: #ff0000">.</span>DisableIntranetCallsFromApps = <span style="color: #cc6633">$</span>false</pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px"> <span style="color: #cc6633">$</span>farm<span style="color: #ff0000">.</span>Update()</pre>
<!--CRLF-->

</div>
</div>
&nbsp;

How to verify if you are facing this problem in your environment. Run this in PowerShell (change the URL for the RSS feed to test):
<div id="codeSnippetWrapper" style="font-size: 8pt;overflow: auto;cursor: text;font-family: 'Courier New', courier, monospace;width: 97.5%;direction: ltr;text-align: left;margin: 20px 0px 10px;line-height: 12pt;max-height: 200px;background-color: #f4f4f4;border: silver 1px solid;padding: 4px">
<div id="codeSnippet" style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: white;border-style: none;padding: 0px">$url = New-Object System.Uri <span style="color: #006080">"https://blogs.msdn.microsoft.com/rodneyviana/feed/"</span></pre>
<!--CRLF-->
<pre style="font-size: 8pt;overflow: visible;font-family: 'Courier New', courier, monospace;width: 100%;color: black;direction: ltr;text-align: left;margin: 0em;line-height: 12pt;background-color: #f4f4f4;border-style: none;padding: 0px">[System.Net.Dns]::GetHostAddresses($url.DnsSafeHost)</pre>
<!--CRLF-->

</div>
</div>
&nbsp;

If it throws an exception, then the RSS web part will not render unless a proxy is set and the <strong>DisableIntranetCalls*</strong> properties are set to false.

Special thanks to <a target="_blank" href="https://blogs.msdn.microsoft.com/tdevere/">Tony DeVere</a> from Distributed Services team for his invaluable help in this case.
<h3>Additional information on Proxy discovery</h3>
&nbsp;

The .Net Framework proxy detecting/loading, is using the following setting combination
<a href="https://msdn.microsoft.com/en-us/library/sa91de1e.aspx">https://msdn.microsoft.com/en-us/library/sa91de1e.aspx</a>
<span style="font-family: 'Courier New'">&lt;proxy
autoDetect="true|false|unspecified"
bypassonlocal="true|false|unspecified"
proxyaddress="uriString"
scriptLocation="uriString"
usesystemdefault="true|false|unspecified "
/&gt;</span>

&nbsp;

By default, autoDetect is set as unspecified, which equals to enabled. It means the proxy is automatically detected. The proxy auto detection follows this white paper for design.
<a href="https://msdn.microsoft.com/en-us/magazine/cc300743.aspx">https://msdn.microsoft.com/en-us/magazine/cc300743.aspx</a>
“Automatic configuration is a two-step process. First, the user agent (Internet Explorer or the .NET Framework) tries to discover the URL of a configuration script. Typically, the configuration script is a JavaScript file that contains logic to determine whether to use a proxy and what proxy to use for a given target resource. The protocol for automatic detection is documented at Web Proxy Auto-Discovery Protocol. The user agent first tries a DHCPINFORM message. The reply to this message contains the URL of the configuration script. If that doesn't work, a DNS lookup for a well-known alias, WPAD, is issued. Then the configuration script's location is determined as <a href="https://&lt;machine">https://&lt;machine</a>&gt;/wpad.dat where the machine name is the result of the DNS lookup.

The second step is to download the configuration script from the URL and run the script. The specification of what the configuration script looks like is at Navigator Proxy Auto-Config File Format. And then parse and run the proxy auto configuration (PAC) script.”
This detection implementation is expensive, take time and also require you have either DHCP server or DNS set up correctly. If you are using a middle tier server type of client, for performance consideration, we will need to disable it to save the time spent on proxy detection routine.

The 2nd proxy detection is using IE proxy. It is controlled through setting, usesystemdefault="true|false|unspecified "
usesystemdefault -- &gt;  Specifies whether to use Internet Explorer proxy settings. If set to true, subsequent attributes will override Internet Explorer proxy settings. The default value is unspecified, which equals to true.
But this setting will not work well for a service. A service typically doesn’t have any IE profile with proxy setting. Creating a IE profile for a service account is like a hacking. Usesystemdefault setting is more designed for a log on user type of application instead of service. IE proxy connection is implemented through wininet.dll, but wininet.dll is not supported in service.
<a href="https://support.microsoft.com/kb/238425">https://support.microsoft.com/kb/238425</a>
INFO: WinInet Not Supported for Use in Services
So, we will discourage using the IE proxy setting and creating an IE profile for a service account to load proxy in .Net as it will make the proxy loading behavior hard to be predicted if a service has some user impersonation implemented.

For the middle tier or service type of client app, we can set the proxy use the following choice:
bypassonlocal="true|false|unspecified"
proxyaddress="uriString"
scriptLocation="uriString"
We can using proxy address to well specify the proxy information combined with proxy bypass rule. If you have to use the proxy auto configuration (PAC) script rule, you can use the choice in scriptLocation. This way, we can well control the proxy loading behavior to avoid delay on Proxy detection or unpredictable result for using impersonated account to load IE proxy setting.]]></content:encoded>
    </item>
  </channel>
</rss>