Quantcast
Channel: Share Poignant
Viewing all 36 articles
Browse latest View live

Why am I not seeing what I expect in the Security Event log?

$
0
0

 

 

 

Often the Windows Security Event log disappoints people when they're trying to find clues to some kind of permissions or rights problem--to a 401 unauthorized response from IIS, for a common example.

They open the log up, they see dozens of events, but they don't usually see the type of information they expected to see. And so it's common for Admins to think, "Oh, that's a worthless log." And so most people don't pay attention to this log.

This event log can be very helpful however. And often the real problem may be that there is no auditing going on. Perhaps this is because the default settings don't pump much noise into the security event log.

 

If you're working with a domain controller, you'd want to open the Domain Controller policy. Otherwise you'll want to open the local security policy. There are many ways to get there. By force of habit I just tend to run "secpol.msc."

 

 

 

 

Drill down into Local Policies > Audit Policy

Note where there is no auditing, where only successes are being audited, and where only failures are being audited, as seen below.

 

 

If there is no auditing going on, or if you're only auditing successes, perhaps that's why you're not seeing much in the Security Event log.

If you attempt to add checkmarks to "success" or "failure" for one of these auditing options and find that the checkboxes are greyed out as seen below. . .

 

 

. . . then you may need to talk to the domain admin who controls group policies to see about getting it adjusted.

After changes are made, I tend to prefer to run gpupdate /force and run IISRESET (I usually work with web servers) or reboot.

 

 

More info:

 

http://technet.microsoft.com/en-us/library/cc772979(v=WS.10).aspx#w2k3tr_sepol_local_set_knkn

Local Policy Settings > Audit Policy

 

How to enable and apply security auditing in Windows 2000

http://support.microsoft.com/kb/300549/EN-US

 

Security auditing settings are not applied to Windows Vista-based and Window Server 2008-based computers when you deploy a domain-based policy

http://support.microsoft.com/kb/921468/EN-US

 

 

 

 

 

 

 

 

 


Basic Steps for Making a Process Monitor (ProcMon) Capture

$
0
0

 

 

ProcMon is an indispensable tool that zillions of people have used. Here are some easy steps for starting, stopping, and saving a Procmon capture.

 

  1.  

  2. Unzip ProcessMonitor.zip

     

     

  3. Copy ProcMon.exe to the server or workstation that you're performing troubleshooting on

     

  4. Launch Procmon by double-clicking Procmon.exe

     

     

  5. When you see the option to set filters, generally you don't need to. You can always filter the results after the capture is complete. Just click OK

 

 

  1. Stop the capture by clicking the icon of the magnifying glass, as seen below. (By default the capture begins immediately when Procmon.exe is launched.) Alternatively, you can use the keyboard and press CTRL+E.

     

When the capture is stopped, a red slash mark should appear across the icon of the magnifying glass.

 

 

  1. If you really want to set some filters such that less data is captured, now is arguably the best time in my opinion. When in doubt, don't add any filters. But if there are some processes that you are certain that you can exclude from the capture, it's easy to do. For example, if you wanted to exclude Skype.exe because you see it in the capture and know it's irrelevant, just right-click Skype.exe and select "Exclude Skype.exe"

 

 

  1. Clear the events from the capture by clicking the icon that resembles an eraser on paper. (Or by clicking Ctrl+X.)

b

 

  1. Begin to take the steps necessary to reproduce the problem. But when you have one step that remains—when you are one mouse-click away from reproducing the problem—hesitate long enough to. . .

 

  1. Start the process monitor capture by clicking the icon of the magnifying glass.

     

  2. Perform your one last mouse click to reproduce the problem, wait for the problem to be fully reproduced, and then quickly. . .

     

  3. Click the icon of the magnifying glass again to stop the Procmon capture.

     

  4. From the file menu, save the capture with a unique name and with the .pml format.

     

One of the most basic, common, and first things I usually do is to set a filter on the procmon results that searches the results column for "Access Denied."

Start by clicking the icon (or CTRL+L) that looks a bit like a coffee filter or snow cone as seen below. . .

 

 

Toggle the first two options to RESULT + CONTAINS. Type in the word DENIED into the blank field. Click ADD and click APPLY.

 

 

Recommendations for Page Files on SharePoint Servers

$
0
0

 

 

Summary

 

Here are my notes on paging file recommendations for SharePoint (2007, 2010, and 2013). This is something I always like to check when a new farm is built or I'm looking at a poorly performing farm for the first time. Often they're set too low.

 

Also I tend to recommend moving the page file off of the system partition and onto a spare drive for multiple reasons. SharePoint health rules often complain about lack of free space on the C: drive. Moving the page file is one way to get around that problem and may give increased performance simultaneously.

 

 

150% size of RAM

 

 

One TechNet article says SharePoint servers needs to one paging file and that the paging file should be. . .

 

"equal to or greater than the total amount of available physical memory. . . We recommend that you either allow the system to manage the page file size or to set it at 150% of the size of the physical RAM." 

 

A reliable KB articlethat talks about Windows servers in general (but not SharePoint servers in specific) also harmonizes with this saying. . .

 

"the traditional model of the page file should be at least the size of physical ram plus 1 MB, or 1.5 times the default physical RAM. . . 1.5 times the physical memory."

 

Another TechNet article predicated upon a SharePoint 2010 Health Analyzer rule says. . .

   

A Windows best practice is to set the paging file size to equal to or greater than the total amount of available physical memory. Garbage collection is typically more effective at automatic recovery of heap memory when managed heap size approximates paging file size. When paging file size is smaller than RAM size, new allocations of managed memory are granted, which leads to more garbage collection and higher CPU usage. . . We recommend that you either allow the system to manage the page file size or to set it at 150% of the size of the physical RAM.

   

   

 

Move the Page File off of the C: drive  

 

 

 If you have more than one local drive on the server, it may be a good idea—sometimes a VERY good idea—to move your page file off of the C drive and onto the other drive. So what are the cons and pros for doing so? The arguments summarized below are from an old-but-good kb article.

 

Pro #1:

 

To enhance performance, move the paging file to a different partition. When the paging file is on the boot partition, Windows must perform disk reading and writing requests on both the system folder and the paging file. When the paging file is moved to a different partition, there is less competition between reading and writing requests.

Pro #2:

 

When you place a paging file on its own partition, the paging file does not become fragmented, and this counts as another definite advantage. If a paging file resides on a partition that contains other data, it may experience fragmentation as it expands to satisfy the extra virtual memory that is required. An unfragmented paging file leads to faster virtual memory access and greater likelihood of a dump-file capture that is free of significant errors.


Con #1:

 

However, if you completely remove the paging file from the boot partition, Windows cannot create a dump file (Memory.dmp) in which to write debugging information in the event that a kernel mode STOP error message occurs. This can lead to extended downtime if a debug procedure is necessary to troubleshoot the STOP error message.

[But really now. When was the last time you had to make a kernel dump of a server? Seven years ago? If you really need to make a kernel dump, you can switch the pagefile back to the C: drive temporarily, make your kernel dump, and switch it back to the other drive after making the dump. You might have to clear up some space on C: to do it. To make the dump, the size of the page file needs to equal the size or physical RAM]

 

What about two page files?

 

"[One possible solution to consider] is to create one paging file that is, by default, stored on the boot partition, and then create one paging file on another, less frequently accessed partition. Additionally, it is optimal to create the second paging file so that it exists on its own partition, with no data or operating-system-specific files. By design, Windows uses the paging file on the less frequently accessed partition over the paging file on the more heavily accessed boot partition. An internal algorithm is used to determine which paging file to use for virtual memory management."
 

   

 

 

Search Keywords:

   

 

Rule Name: The paging file size should exceed the amount of physical RAM in the system

Summary: The paging file size on some servers in the SharePoint farm is smaller than the total physical memory that is available on the servers.

Rule Name: Drives are running out of free space

Summary: Disk drives on one or more of the servers in the farm are running out of disk space.

Rule Name: Drives used for SQL databases are running out of free space.

Summary: The databases have one or more files that exceed the available free disk drive space. If this happens, operations will fail. A disk drive should have enough free space to allow the largest database file to automatically grow to twice its size.

   

   

   

ERROR 500.0 | Internal Server Error | AuthenticateRequest | StaticFile | 0x80070542

$
0
0

 

 

 

Symptoms:

 

  1. When browsing to the site without specifying the default page name in the browser, we received a 500 error:

     

    HTTP ERROR 500.0 - Internal Server Error

    The page cannot be displayed because an internal server error has occurred

    AuthenticateRequest

    StaticFile

    0x80070542

     

 

 

  1. Failed request tracing for the http 500 response further elaborated the problem with this:

     

    Either a required impersonation level was not provided, or the provided impersonation level is invalid.  (0x80070542)

     

     

    This problem did not happen when using anonymous authentication on the site—only with Windows Integrated authentication.

     

  2. When browsing to the site and specifying the default page name in the browser, the page was served without the 500 error but much of the necessary content was missing.

 

 

Solution Steps:  

 

  1. Per http://support.microsoft.com/kb/981949 we added the local IIS_IUSRS group to a GPO that allowed that group to have "impersonate a client after authentication" as a user assignment right and applied the policy to the web server.   (We couldn't apply it in the local security policy directly in this case.)

     

 

 

 

 

  1. Per http://support.microsoft.com/kb/981949 we added IIS_IUSRS group to the D:\inetpub\wwwroot folder's NTFS permissions. 

     

  2. Ran GPUDATE and IISRESET.

 

NullReferenceException when Attempting to Configure Managed Accounts

$
0
0

 

While attempting to visit Configure managed accounts (ManagedAccounts.aspx) in a SP2013 farm today, I got a correlation ID and the tip of the NRE iceberg: "Object reference not set to an instance of an object."

 

 

Here's what the salient part of the ULS logs looked like. . .

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation General                8nca       Medium                Application error when access /_admin/ManagedAccounts.aspx, Error=Object reference not set to an instance of an object.   at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation Runtime               tkau       Unexpected                System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation General                ajlz0       High       Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

 

Resolution

 

First you have to identify all the Managed Accounts that have automatic password reset enabled. If you're seeing this NRE you used to be able to check this through Central Admin, but now you can't. So run this cmdlet instead:

Get-SPManagedAccount | ? {$_.AutomaticChange -eq $true} | SELECT UserName

Here's what that looks like in a simple lab environment that is not experiencing the NRE:

 

 

This command displays the list of managed accounts in your farm that are set to have their passwords set to change automatically. Make a note of all the different accounts that are returned. You'll need one or more of them soon.

 

Second, look at all the Password Generation timer jobs associated with various accounts and servers. The Password Generation timer job is the job that "generates new password for an account, updates the account password, then launches jobs to deploy the new password to everything that uses it."

To do this, open Central Admin and select Monitoring, as seen below.

Then select Check job status. . .

Select Scheduled from the Timer.aspx page. . .

Look for "Password Generation" jobs for various accounts and various servers.

In my screenshot above I only find two jobs total. This is because I happen to only have one managed account that is set to have its password automatically changed by SharePoint and I happen to only have two SharePoint servers in this farm. You might have many more.

This could be a little tricky. What is not there that should be there? Compare the list of Password Generation jobs with the list of Managed Accounts that are set to have password changes. Look for one or more jobs that should be there but aren't there. A missing job is probably the null reference SharePoint is complaining about. If the job is there, leave it alone. Don't delete it. If the job should be there, and it isn't there, make note of the account that it's not there for. The root cause of this problem is that Central Admin is looking for a timer job that is not there.

Third, for any managed account that showed up in the list produced by "Get-SPManagedAccount | ? {$_.AutomaticChange -eq $true} | SELECT UserName" AND which does NOT have a Password Generation job, execute the script below to force the account to no longer have the AutomaticChange of passwords set to true.

 

$acct = Get-SPManagedAccount "<DOMAIN>\<UserName>" ß(Change that to the actual domain and username of the account in focus.)

$acct.AutomaticChange = $false

$acct.Update()

 

Or if you prefer, you can just do it for all the managed accounts.

Now you should be able to visit Configure managed accounts (ManagedAccounts.aspx) and set the account(s) to have an automatic password change schedule again.

Blank browser pages for Audit Log Reports in SP2007

$
0
0

 

 

Symptoms

 

Perhaps your audit log reporting functionality was working great last month but this month you're only seeing blank, empty pages in your browser. You can't run any reports successfully anymore in your MOSS 2007 farm. You can make it to SITE ACTIONS and then on to AUDIT LOG REPORTS.

 

You see all the links you're supposed to see at Reporting.aspx.

But you can't do anything with those links anymore.

Clicking any of these links should open a spreadsheet in Excel or, if Excel isn't installed on the client machine, it should render in the browser with some valid xml data that looks something like this:

 

But after installing the .net update 2905247/2894844/2894852/2894851/2894847/2894843 and rebooting things changed.

Now you just see blank pages whenever you click any of the links.

 

You can click the Run a Custom Report link and get a page but you won't be able to run any existing reports or create any new reports.

 

You'll just get a blank page.

 

Troubleshooting

 

Nothing interesting seems to show up in the SharePoint diagnostic/ULS logs.

But reproducing the problem while monitoring the application pool with a debugdiag crash rule (that is configured to log CLR exceptions) shows some great hints.

 

Type:     System.Web.HttpException
Message:  Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. http://go.microsoft.com/fwlink/?LinkID=314055
Type:     System.Web.UI.ViewStateException
Message:  NOT_FOUND
 Stack:   
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.ViewStateException.ThrowError(System.Exception, System.String, System.String, Boolean)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.UI.Util.DeserializeWithAssert(System.Web.UI.IStateFormatter, System.String)
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
  System.Web.UI.Page.LoadAllState()
  System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest()
  System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
  ASP._layouts_runreport_aspx.ProcessRequest(System.Web.HttpContext)
  System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
  System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
  System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
  System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
  System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
  System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)

 

 Type:     System.Web.HttpException
 Message:  Unable to validate data.
 Stack:   
         RetAddr          Call Site
  System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.UI.Util.DeserializeWithAssert(System.Web.UI.IStateFormatter, System.String)
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
  System.Web.UI.Page.LoadAllState()
  System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest()
  System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
  ASP._layouts_runreport_aspx.ProcessRequest(System.Web.HttpContext)
  System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
  System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
  System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
  System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
  System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
  System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
DetailID = 2
 Count:    1
 Type:     System.Web.HttpException
 Message:  Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. http://go.microsoft.com/fwlink/?LinkID=314055

   

Root Cause

 

By design, the installation of update 2905247/2894844/2894852/2894851/2894847/2894843 enables the use of ViewStateMac. Unfortunately this causes some problems for WSS-3.0/MOSS-2007 site collection audit log reports.

 

Solution/Workarounds

 

Some have uninstalled the update to get past this problem. I am not recommending that. This is an important security patch to have. Besides, some future .net patch will just put you back in the same place.

Others have disabled AspNetEnforceViewStateMac in the registry to get around this problem. I am not recommending that either. It's important for security reasons to have it enabled. (See http://blogs.msdn.com/b/webdev/archive/2014/09/09/farewell-enableviewstatemac.aspx.)

Disabling AspNetEnforceViewStateMac (followed by an IISRESET) does take the blank-page symptoms away. In a lab environment I opened up regedit, searched for AspNetEnforceViewStateMac, found it in two places, and changed the value of 1 (enabled) to 0 (disabled).

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AspNetEnforceViewStateMac (This is the only one you probably would want to test with.)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AspNetEnforceViewStateMac (This might be good to keep in mind if your application pool is running in 32-bit mode for some reason)

Restart IIS to iron in the changes.

 

Mainstream support for WSS 3.0/MOSS 2007 ended over two years ago. (See http://support2.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=SharePoint+Server+2007&Filter=FilterNO.) So it's not clear at this time if a design change can or will be made. If such a fix/change is produced, I'll try to make it known here.

Otherwise perhaps the time has come to stop trying to get audit reports and start speeding up the pace towards going to either SharePoint Online (O365) or SharePoint 2013!

 

 

More Information

 

http://blogs.msdn.com/b/webdev/archive/2014/09/09/farewell-enableviewstatemac.aspx - Farewell, EnableViewStateMac!

 

http://support2.microsoft.com/kb/2915218 - Resolving view state message authentication code (MAC) errors

    [Note that this article won't help if the problem began when the patch was installed.]

 

 

 

Additional Keywords:

 

Content modifications        Content_modifications.xml

Content type and list modifications     Content_type_and_list_modifications.xml

Content viewing         Content_viewing.xml

Deletion            Deletion.xml

Run a custom report         Run_a_custom_report.xml

Expiration and Disposition     Expiration_and_Disposition.xml

Policy modifications        Policy_modifications.xml

Auditing settings         Auditing_settings.xml

Security settings         Security_settings.xml

RunReport.aspx, SharePoint 2007,

http://support.microsoft.com/kb/2905247 - Microsoft security advisory: Insecure ASP.NET site configuration could allow elevation of privilege

Microsoft .NET Framework 3.5.1 2894844 Description of the security update for the .NET Framework 3.5.1 on Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1: December 10, 2013

Microsoft .NET Framework 3.5 2894852 Description of the security update for the .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2: December 10, 2013

2894851 Description of the security update for the .NET Framework 3.5 on Windows 8 and Windows Server 2012: December 10, 2013

Microsoft .NET Framework 2.0 2894847 Description of the security update for the .NET Framework 2.0 Service Pack 2 on Windows Vista Service Pack 2 and Windows Server 2008 Service Pack 2: December 10, 2013

2894843 Description of the security update for the .NET Framework 2.0 Service Pack 2 on Windows Server 2003: December 10, 2013

Dude, my audit reports don't work! Auditing reports blank. Blank auditing reports. Blank audit report. White browser. Empty browser window.

Best Practices for CRL Checking on SharePoint Servers

$
0
0

 

 

Problem

 

The fact is that SharePoint 2010 servers think they need to be able to reach out to http://crl.microsoft.com. They need get a current list of certificates for revoked (expired, key compromised, CA compromised, etc.) certificates.

But that's not an option for most of the SharePoint servers I work with. It's common for firewalls that prevent such outbound http calls and therefore prevent CRL checking. The inability to check the CRL (certificate revocation list) can create a myriad of strange performance problems and timeouts for w3wp.exe's, owstimer.exe, asp.net, and .net applications. Sometimes those problems are pretty easy to figure out with a bit of research (like a 15 second delay when browsing to a SharePoint page after an IISRESET) and sometimes the problems that show up are more mysterious.

There are dozens of blogs on this subject and a variety of approaches people take. So why write on this again? There are at least eight somewhat bewildering options that Admins may be forced to choose from. Sometimes one of those options works well for one farm and doesn't work well for another farm with a similar problem. Sometimes the impulse to get the problem fixed is stronger than the impulse to abide by best security best practices. Some of the advice is dated and deserves improvement. Also it's not clear what applies to SP2007, to SP2010, and/or to SP2013. I'm going to attempt to consolidate and evaluate all the options.

 

Detection

 

If a SharePoint server doesn't have access to the CRL, I expect that you've got some kind of CRL checking problem to one degree or another.

One good way to determine whether or not you need to consider one or more of these options for your servers is to set up CAPI2 logging. It's not enabled by default but it's easy to do. Steps can be found at http://support.microsoft.com/kb/2625048. (Also see http://www.microsoft.com/en-us/download/details.aspx?id=18844)

Another way that this problem is often detected is for a fiddler/netmon/wireshark trace is performed while reproducing the problem and calls to crl.microsoft.com are noticed. Sysinternals Utilities such as Process Monitor and Process Explorer can also show this traffic. It might be good to restart IIS and restart the SharePoint timer service while doing this.

You could also task your network administrator with checking the firewall/proxy logs (in a 72 hour period?) to see which servers are making calls to crl.microsoft.com.

 

Option 1 - Adjust a FIREWALL RULE to permit traffic from the servers to crl.microsoft.com

 

When a SharePoint Administrator asks a Network Administrator to open a hole in a firewall, the Network Admin usually laughs a knowing-laugh and says, "Not unless you can give me a really good reason!" The answer of, "So SharePoint will perform better," isn't usually good enough. But I'd highly recommend revisiting this option.

Try asking the network admin / security engineer to look at the logs produced by the firewall/proxy to get a sense of the frequency of calls to crl.microsoft.com. This information also would show which servers are making these calls. And from there perhaps a firewall rule can be adjusted to be adequate-but-still-strict.

This option is the most effective solution and it ironically may also be the most secure options. It avoids the problem of disabling the CRL checking—something that does tend to be a good idea from a security standpoint. Most of the other options in this list disable CRL checking in one way or another and that's not really a best security practice. I'm not the only one saying this. Consider these quotes:

  • "Note that disabling CRL check is not recommended in a production environment, unless you are troubleshooting an issue and wants to isolate if the problem is related to CRL validation. Make sure to turn it on again after performing the validation. . . While it is important to keep secure access to Internet from the enterprise standpoint, it is also important to make sure that applications that require Internet access to validate CRL are capable of doing it. CRL checking is a secure mechanism that helps validate the validity of a certificate. . . make sure to add crl.microsoft.com to the list (on your firewall or proxy) and you should avoid issues of this nature." (Reference)
  • ". . . disabling this option is not recommended for security reasons" (Ref.)
  • "Unblock access to the above URL so CRLs can be retrieved when needed. This is the *PREFERRED* approach." (Ref.)
  • "PREFERRED RESOLUTION: Allow the server and the services accounts to access the crl.microsoft.com domain." (Ref.)

 

Option 2 - Add crl.microsoft.com to the HOST FILE and point it to the local address

 

It is very common for a SharePoint Admin to add crl.microsoft.com to the host files of their SharePoint servers and point it to 127.0.0.1. This is certainly easy to do and is usually enough to keep the biggest, most obvious sharepoint performance problems problems at bay. However, the CRL is not at 127.0.0.1. So right there I think this is not the best possible solution. The processes on the server that want to check the CRL still cannot check the CRL. Maybe you avoid having to wait for a timeout this way but maybe there are better options for both performance, security, and thoroughness. Several people report that this isn't always good enough to stop all crl checking related problems.

 

Option 3 - Set generatePublisherEvidence to FALSE in in a .config file

 

This option is easy to implement, is highly recommended by many reputable sources, tends to give really good results (solves problems that the host file entry doesn't always solve), and has the added advantage of being able to be applied with impressive granularity. For example, it can be applied in a web.config file for a specific web application, a root web.config file so that many/all web applications are affected, or in an owstimer.exe.config file to only helps the owstimer.exe process.

SharePoint uses .NET and ASP.net. .NET applications (all managed code) attempts to download the CRL for any signed assembly it loads on startup. This is normal. Setting generatePublisherEvidence to false prevents that.

Should it be done? I note how MSDN seems to recommend it: "We recommend that services use the <generatePublisherEvidence> element to improve startup performance. Using this element can also help avoid delays that can cause a time-out and the cancellation of the service startup." The same article explains that most asp.net/.net applications don't need to verify the signatures (certificates, and therefore CRLs): "The common language runtime (CLR) tries to verify the Authenticode signature at load time to create Publisher evidence for the assembly. However, by default, most applications do not need Publisher evidence. Standard CAS policy does not rely on the PublisherMembershipCondition. You should avoid the unnecessary startup cost associated with verifying the publisher signature unless your application executes on a computer with custom CAS policy, or is intending to satisfy demands for PublisherIdentityPermission in a partial-trust environment. (Demands for identity permissions always succeed in a full-trust environment.)"

The same article also clarifies, "[i]n the .NET Framework 4 and later, this element has no effect on assembly load times." This suggests to me that this option is more important for SharePoint 2010 (which uses .net 2.0/3.5) than for SharePoint 2013 (which uses .net 4.0/4.5).

The fact that it is recommended for aspnet.config and for owstimer.exe.config by a SharePoint Escalation Engineer here is also encouraging.

The easy part is modifying the config file with one simple, short line:

<configuration>

<runtime>

<generatePublisherEvidence enabled="false"/>

</runtime>

</configuration>

The not-so-easy part is deciding config file(s) to add it to? A web.config file? If so, which web.config file? (There are many to choose from!) What about adding it to an owstimer.exe.config file? (Often overlooked.) What about other .net applications and services that might also run on a SharePoint server? Do you need to create a config file named <ApplicationName>.exe.config and add the line to it? I like the fact that you've got great granularity here. But that might increase the odds of setting it at the less than optimal place. If you want to set it for some specific process or specific web application, you can. And if you want to set it at a "global level" or "root level" instead you can do that. But even at the root level you have some options to wade through. Which of these files should you edit?

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet.config

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet.config

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config

C:\Windows\Microsoft.NET\Framework\v3.5\aspnet.config

C:\Windows\Microsoft.NET\Framework\v3.5\CONFIG\machine.config

C:\Windows\Microsoft.NET\Framework\v3.5\CONFIG\web.config

C:\Windows\Microsoft.NET\Framework64\v3.5\aspnet.config

C:\Windows\Microsoft.NET\Framework64\v3.5\CONFIG\machine.config

C:\Windows\Microsoft.NET\Framework64\v3.5\CONFIG\web.config

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\web.config

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\web.config

 

Some bloggers go for the aspnet.config file (ref.1, ref.2) recommends making the change at the aspnet.config file. This would affect all the web application and websites that use asp.net. It doesn't affect any process that uses CLR/.Net. Setting it at the machine.config level would disable it not just for asp.net but all .net/managed code running on the server.

One fine point here is that SharePoint 2010 uses 2.0 and 3.5. So you might want to edit the config file of your choice in both the 2.0 and 3.5 folders. It might be a good idea to do it in the x86 and x64 folders too.

SharePoint 2013 uses .net 4.0. So there is probably no need to make any changes in the 2.0 or 3.5 folders.

If you decide to set it at "the hive level" (14\CONFIG and/or 15\CONFIG) you might expect the web.config in the 14 hive to affect the site collections running in 2010 mode (which is possible on a SP2013 server if you upgraded the database from SP2010 but didn't upgrade the site collection) while the web.config in the 15 hive should affect site collections running in 2013 mode.

It's also good to keep in mind that that disabling the generation of publisher evidence in a web.config file or aspnet.config file won't affect Owstimer.exe. For SharePoint servers running owstimer.exe, you may want to consider creating an owstimer.exe.config file. (Ref.)

 

 

Option 4 – Export the SharePoint Root Authority certificate of the farm and import it into the Trusted Root Certification Authorities store of each SP server in the Farm

 

This option comes from "Workaround 1" in http://support.microsoft.com/kb/2625048 ("Site slowness because of SharePoint STS certificate CRL Checking"). It is also recommended as workaround 1 in http://support.microsoft.com/kb/2672574 (SharePoint 2010 – Performance issue on external BDC lists).

I'm a big fan of this option. I like this option because it doesn't seem controversial to me that SharePoint servers in a farm should trust this certificate. I'm a little surprised that this doesn't happen the moment a server is joined to the farm. When a SharePoint farm is created, a root certificate is created for the servers in that farm to use for internal communication. The validity of that certificate is checked frequently. If this certificate is found in the local certificate store of the sharepoint server, trust is assured and communication goes on like it should. If the certificate is needed and it is not in the local store of the server, the server tries to validate the certificate over the network. This can cause unwanted delays.

Another thing I like about this option is that it doesn't disable any CRL checks. It's less controversial from a security standpoint than some of the other options then. But it's also not going to cover as wide a variety of problems as other options may give.

 

 

 

Option 5 - Disable the automatic update of root certificates on the SharePoint Servers

 

Technically this option really has nothing to do with CRL checking or the lack thereof. But it does often come up in the discussion of CRL checking and possible causes for performance problems in SharePoint BDC, Infopath Services, or anything that relies on the Secure Store service. This is discussed in detail at http://support.microsoft.com/kb/2672574 (SharePoint 2010 – Performance issue on external BDC lists).

This option is found in several articles on the internet. Most interestingly it is found as Workaround 2 in http://support.microsoft.com/kb/2672574 and again as workaround 2 in http://support.microsoft.com/kb/2625048. Personally I prefer workaround 1 in both instances. But it's good to know what all the options are.

KB 2672574 gives the best hint as to why one should or shouldn't do this: "There should not be specific implications to SharePoint since we are using self-signed certs and manage them ourselves. The SharePoint certificates do have an expiry and we do have a health rule that watches for that IIRC and will warn the admin to update/re-roll them. The main aspect to think through is for "other" certificates used on the box (like SSL certificates, certificates to trust download packages or for SAFER policy etc) which are issues from certificates chained to those in the TRC store."

The gist of it is to launch gpedit.msc as admin on the SharePoint server(s). (This assumes that it's not all greyed out due to being controlled by Group Policy.) Drill down into Local Computer policy > Windows Settings > Security settings > Public Key Policies. Double-click the Certificate Path Validation Settings. In the Network retrieval tab, add a checkmark beside "Define the policy settings" and uncheck the option to "Automatically update certificates in the Microsoft Root Certificate Program (recommended)." Run gpupdate /force.

 

 

 

Option 6 - Change the registry key for Software Publishing "State" value to '0x00023e00'

 

One common workaround to attempt to disable CRL checking is to open the registry and set HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing "State" to dword:00023e00.

The steps are simple:

Start Registry Editor (Regedit.exe)

Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing

On the left side pane look for State key and double click to open it

Change the Value data to 146432 Decimal or 0x00023e00 Hexadecimal

No reboot is needed.

 

When "State" is set to 00023e00, certificate revocation is turned OFF. When "State" is set to 00023c00, it is turned on.

I admit that this can help avoid some CRL checking problems. But I am not very favorable towards it because (1) it's not a best practice from a security standpoint, (2) it's not very granular or flexible, (3) it seems like it should guarantee to solve all CRL checking related problems but there are times when it does not solve them.

One of the possible reasons it may not solve all CRL related problems is that sometimes the HKEY_CURRENT_USER entry may not be adequate. It *may* also need to be applied to locations as well, such as:

  • HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing
  • HKEY_USERS\.DEFAULT \Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing

In theory, a Process Monitor trace should show whether these keys are being touched or not. HKCU works for the "current user" but may not have anything to do with the service accounts that your application pools, for example, are running under.

 

 

Option 7 - Download and Import the fresh CRLs from crl.microsoft.com every month

 

If your servers are unable to reach out to http://crl.microsoft.com due to strict security policies but you also want to continue checking CRLs, you can.

You can download copies of the lists simply by browsing to these URLs:

 

There could be other CRLs that you might need. This is where CAPI logging comes in handy. The CAPI2 logs should show you which processes are reaching out to specific CLRs. Example:

 

But then you need to put them somewhere.

You can use certutil (already on your server) to import those CRLs to the local CRL store of each and every SharePoint Server.

The commands are simple:

Certutil –addstore CA CodeSignPCA.crl

Certutil –addstore CA CodeSignPCA2.crl

Certutil –addstore CA microsoftrootcert.crl

Certutil –addstore CA CSPCA.crl

Certutil –addstore CA MicCodSigPCA_08-31-2010.crl

 

Similarly, but as an alternative, you could place the downloaded .crl files on an IIS website, for example, that is accessible to the SharePoint servers, has directory browsing enabled, that is listening on port 80, and has a folder structure of pki/crl/products. And then you could create either an internal dns entry (or several hostfile entries) that resolve crl.microsoft.com to the IP address of the web server. The idea here of course is that whenever a server reaches out to http://crl.microsoft.com/pki/crl/*, they end up getting the CRLs from what amounts to an internal mirror.

So why don't more people do this? There is a catch here. Those CRLs are set to expire every two months (?) or so. They're always getting replaced by fresh CRLs. And if a certificate were revoked, the CRL might get replaced sooner than the two month expiration date. Even though it's easy to download the CRLs and import them, it's not something an Admin is going to want to do every two months. It is something that could be scripted, but that's a hassle too.

 

 

 

Option 8 - Uncheck "Check for publisher's certificate revocation" in Internet Explorer's Internet Options

 

Many have used the simple option of opening Internet Explorer on the servers, expanding the TOOLS menu, selecting Internet Options, selecting the Advanced tab, and unchecking the box beside "Check for publisher's certificate revocation."

(Some also might tempt the reader to also uncheck "Check for server certificate revocation.")

The main appeal to this is how simple it is. And it seems to work for solving many CRL checking problems. It disables CRL checking for pretty much everything on the server. It was especially popular in the days of ASP.net 1.1 and ASP.net 2.0 (before the ability to disable generatePublisherEvidence was added to 2.0).

I unchecked "Check for publisher's certificate revocation" on a test machine while running Procmon and saw that the majority of the changes made by unchecking this revolved around keys in the HKLM\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\ area, there was also a change at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing – STATE.

Here is a screenshot of the salient part of the procmon capture:

 

 

So ultimately this is the same as Option 6. But to minimize the number of registry changes, I'd recommend option 6 over this one.

 

 

Thanks for taking the time to read this. I invite you to leave comments that will help me improve this blog.

 

 

Sources

 

http://support.microsoft.com/kb/2625048 Site slowness because of SharePoint STS certificate CRL checking

http://msdn.microsoft.com/en-us/library/bb629393.aspx <generatePublisherEvidence> Element

http://blogs.msdn.com/b/spses/archive/2012/08/29/crl-verification-failure-sharepoint.aspx

http://blogs.msdn.com/b/paulking/archive/2011/04/29/bypassing-the-crl-check-on-clr-startup.aspx

http://blogs.msdn.com/b/pfedev/archive/2008/11/26/best-practice-generatepublisherevidence-in-aspnet-config.aspx Best Practice - <GeneratePublisherEvidence> in ASPNET.CONFIG

http://social.technet.microsoft.com/wiki/contents/articles/2303.understanding-access-to-microsoft-certificate-revocation-list.aspx Understanding Access to Microsoft Certificate Revocation List

http://blogs.msdn.com/b/tom/archive/2008/10/28/web-site-stops-responding-for-15-25-seconds.aspx Web Site Stops Responding for 15-25 seconds

http://blogs.msdn.com/b/tess/archive/2008/05/13/asp-net-hang-authenticode-signed-assemblies.aspx ASP.NET Hang: Authenticode signed assemblies

http://blogs.msdn.com/b/gregmcb/archive/2008/05/06/ssl-and-authenticode-causes-crl-lookups-if-your-machine-cannot-access-the-crl-for-verification.aspx SSL and Authenticode Causes CRL lookups if Your Machine Cannot Access the CRL for Verification

http://support.microsoft.com/kb/2672574 SharePoint 2010 – Performance issue on external BDC lists

http://blogs.msdn.com/b/sharepointdev/archive/2011/02/08/error-the-sandboxed-code-execution-request-was-refused-because-the-sandboxed-code-host-service-was-too-busy-to-handle-the-request.aspx

http://blogs.msdn.com/b/asiatech/archive/2011/04/26/asp-net-application-loads-slowly-the-first-time.aspx

http://blogs.msdn.com/b/mcsnoiwb/archive/2012/04/25/how-to-speed-up-sharepoint-management-shell-startup.aspx

http://blogs.msdn.com/b/gregmcb/archive/2008/05/06/ssl-and-authenticode-causes-crl-lookups-if-your-machine-cannot-access-the-crl-for-verification.aspx

http://support.microsoft.com/default.aspx?scid=kb;EN-US;915850

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/wintrustsetregpolicyflags.asp

http://blogs.msdn.com/b/andreal/archive/2008/07/19/wcf-service-startup-too-slow-have-you-thought-to-crl-check.aspx

http://support.microsoft.com/kb/936707/

http://msdn.microsoft.com/en-us/library/aa388197

http://msdn.microsoft.com/en-us/library/windows/desktop/aa387700(v=vs.85).aspx

http://www.pdfsharepoint.com/error-sandboxed-too-busy-handle-request/

http://www.microtom.net/microsoft-sharepoint-products/how-to-make-sharepoint-faster

http://bizbert.com/bizbert/2007/03/24/BizTalk+And+Certificate+Revocation+Lists+CRLs+Part+II.aspx

 

 

 

Additional keywords:

The revocation function was unable to check revocation because the revocation server was offline

Why is CLR Requesting to resolve an assembly via BDC over and over?

$
0
0

 

 

Symptoms

 

Under a heavy client load a performance problem develops in your SharePoint 2010 or SharePoint 2013 farm's WFEs. It's hard to figure out what is and what isn't affected by the perf problem. Workflows that once took 30 seconds to run might take six minute to run and then timeout. Deploying a solution to the sandbox might fail with a timeout. Sometimes just opening a form dialogue box might take a long time and timeout. It's hard to connect the dots. The problem goes away after an IISRESET or an application pool recycle but after load increases, eventually the problem returns. You can't seem to figure out what the first cause is. You can't seem to trigger it.

So of course you amp up the ULS logging to verbose and notice a pattern you haven't seen before. CLR is requesting to resolve one or more assemblies over and over. And over and over. There is no pattern to which assembly is attempting to be resolved. Just when you think you can predict that it's going to be something related to XML Serialization (System.Xml.XmlSerializers, mscorlib.XmlSerializers, Nintex.Workflow.XmlSerializers, SharePointUI.WebParts.XmlSerializers, Microsoft.Office.Search.XmlSerializers, Microsoft.SharePoint.AddGallery.Server.XmlSerializers) that needs resolution, your beautiful theory gets dashed to pieces. Next time you visit the uls logs after seeing the problem maybe the assembly in focus turns out to be Microsoft.ReportingServices, Microsoft.Office.Excel.Server.HostExtensionWac, Microsoft.Rtc.ServerConfiguration, Microsoft.Rtc.InternalMedia, Microsoft.SharePoint, BihConsumerInterop, VJSharpCodeProvider, or something else. After searching for these messing assemblies you realize that these assemblies aren't actually dlls that live on the file system of the WFE. They're not in the GAC, they're not in a Bin folder, and they're not in an asp.net temp folder.

And they're certainly not in your BDC catalog. What? BDC? Yeah, if it doesn't seem weird that CRL is trying to resolve these assemblies (isn't that what CLR always does?) you realize that it's making calls to the BDC catalog to resolve them. The ULS logs make that clear. It dawns on you that the "CLR requesting to resolve assembly" (uls tag 9uq0) means that CLR already tried to resolve the assembly from the normal local places, gave up on that, and began attempting to find them in the BDC catalog. That in and of itself isn't necessarily weird if you've run the powershell cmdlet Import–SPBusinessDataCatalogDotNetAssembly in the past. That opens the door to allowing .net to use BDC as something of a probing path. But of course those assemblies aren't going to exist in your BDC catalog. So that's is a significant part of the problem.

As you peer deeper into the ULS logs you notice a new pattern. You see GetServiceApplicationID#1. A little further down in the log you see GetServiceApplicationID#2. You trace it out 3, 4, 5, 6, 7… 56, 57, 58, 59… 94, 95, 96, 97, 98, 99. There is clear iteration one by one up the list. And every time it is attempting to talk across the wire to one of your BDC servers. It gets worse. It doesn't stop at 99. You think CLR might give up on the BDC catalog after trying 99 times but it doesn't. It does it several more times and repeats GetServiceApplicationID#99 over and over and over until there is a thread abort exception and SharePoint removes the BDC server from the sharepoint load balance. Yep, that's also a facet of this multi-faceted performance problem. Multiply this times a bunch of users and your WFEs are well on their way to being overwhelmed. Maybe your BDC servers are getting pushed to their limits too.

Under a light load, the problem doesn't seem to occur. It only happens during a heavy load on the WFEs. It may also only happen if there is a significant amount of communication going on between WFE and BDC servers. Also the problem might not happen until a dynamically generated assembly (like an xml serializer for example).

 

 

Screenshots

 

Here are some images of what the 9uq0's look like, as filtered in ULSviewer.exe. Note how you have several resolve requests for the same assembly on the same correlation ID. . .

 

 

 

 

 

ULS Excerpts of one Correlation ID

 

We reproduced the problem one time when it was at its worst and used a very simple Nintex workflow as our victim. (To be clear, Nintex was not the cause of the problem but was one of the many victims.) What should have taken a few seconds to run took six minutes of slow, painful, futile running before the looping ended with an exception. I don't think many people are going to see this problem, but if you do, recognizing the pattern in the ULS logs is probably going to be the thing that leads you to this blog. After filtering in ULSViewer to a single correlation ID (the ID we got when the page timed out) the log file occupied 1,300 pages of a word document. No exaggeration there. I'm just going to give a few excerpts of that log file as an example.

05/05/2014 17:47:31.13    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Logging Correlation Data    xmnv    Medium    Name=Request (GET:https://MyGreatWebApplication:443/7g/LogicalAccess/_layouts/NintexWorkflow/StartWorkflow.aspx?TemplateID=%7B6bc8d4a9-31e2-4e07-af45-2ddf36af1dfd%7D&Source=https%3A%2F%2FMyApplication%2Efrb%2Eorg%2F7g%2FLogicalAccess%2F%5Flayouts%2Fworkflow%2Easpx)    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    9uq0    Medium    CLR Requesting to resolve assembly : System.Xml.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4u    Verbose    Entering Bdc

loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4v    Verbose    Completed Bdc loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4w    Verbose    Entering Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4x    Verbose    Completed Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4y    Verbose    Entering Bdc 'GetServiceApplicationId' in BdcServiceApplicationProxy.    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:31.70    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Topology    e5mc    Medium    WcfSendRequest: RemoteAddress: 'http://ServerName003:32843/50d8547d1c894ca99b11a7ac533b6441/BdcService.svc/http' Channel: 'Microsoft.SharePoint.BusinessData.SharedService.IBdcServiceApplication' Action: 'http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId' MessageId: 'urn:uuid:89bdfe36-e820-4e9d-ac84-0febc78dcc3d'    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:31.94    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (ExecuteWcfOperation:http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId). Execution Time=219.651170749355    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:32.37    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4z    Verbose    Completed Bdc 'GetServiceApplicationId' in BdcServiceApplicationProxy.    df635b9b-104d-4fef-9e88-a351d604a4ce

 

 

05/05/2014 17:47:32.37    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#2). Execution Time=218.291221370314    df635b9b-104d-4fef-9e88-a351d604a4ce

 

Skipping a bit. . .

 

05/05/2014 17:47:33.26    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#6). Execution Time=218.146580082105    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:33.26    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    9uq0    Medium    CLR Requesting to resolve assembly : System.Xml.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089    df635b9b-104d-4fef-9e88-a351d604a4ce

 

Skipping a lot. . .

 

05/05/2014 17:47:54.09    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#98). Execution Time=217.661392718907    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.09    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    9uq0    Medium    CLR Requesting to resolve assembly : System.Xml.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#99). Execution Time=218.146370558269    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    9uq0    Medium    CLR Requesting to resolve assembly : System.Xml.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4u    Verbose    Entering Bdc loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4v    Verbose    Completed Bdc loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4w    Verbose    Entering Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4x    Verbose    Completed Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4y    Verbose    Entering Bdc 'GetServiceApplicationId' in BdcServiceApplicationProxy.    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.31    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Topology    e5mc    Medium    WcfSendRequest: RemoteAddress: 'http://ServerName003:32843/50d8547d1c894ca99b11a7ac533b6441/BdcService.svc/http' Channel: 'Microsoft.SharePoint.BusinessData.SharedService.IBdcServiceApplication' Action: 'http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId' MessageId: 'urn:uuid:3af45f1d-d121-4170-8bff-70406b926145'    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.53    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (ExecuteWcfOperation:http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId). Execution Time=217.203233930569    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.53    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4z    Verbose    Completed Bdc 'GetServiceApplicationId' in BdcServiceApplicationProxy.    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.53    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff51    Verbose    Entering loadBalancer.EndOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.53    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff52    Verbose    Completed loadBalancer.EndOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:47:54.53    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#99). Execution Time=218.343811853182    df635b9b-104d-4fef-9e88-a351d604a4ce

 

Skipping a bit. . .

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#99). Execution Time=217.00397676241    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    9uq0    Medium    CLR Requesting to resolve assembly : Nintex.Workflow.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4u    Verbose    Entering Bdc loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4v    Verbose    Completed Bdc loadBalancer.BeginOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4w    Verbose    Entering Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4x    Verbose    Completed Bdc proxy.GetChannel()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff4y    Verbose    Entering Bdc 'GetServiceApplicationId' in BdcServiceApplicationProxy.    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.22    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Topology    e5mc    Medium    WcfSendRequest: RemoteAddress: 'http://ServerName004:32843/50d8547d1c894ca99b11a7ac533b6441/BdcService.svc/http' Channel: 'Microsoft.SharePoint.BusinessData.SharedService.IBdcServiceApplication' Action: 'http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId' MessageId: 'urn:uuid:e0202381-e587-4863-b0c5-a8e6b37cdd1c'    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.43    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (ExecuteWcfOperation:http://www.microsoft.com/Office/2009/BusinessDataCatalog/BusinessDataCatalogSharedService/GetServiceApplicationId). Execution Time=219.366497697333    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.45    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff50    Unexpected    Logging unknown/unexpected client side exception: ThreadAbortException. This will cause this application server to be removed from the load balancer queue. Exception: System.Threading.ThreadAbortException: Thread was being aborted. at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.ServiceModel.Channels.DelegatingStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.PreReadStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.HttpInput.WebResponseHttpInput.WebResponseInputStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.DelegatingStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.DelegatingStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.ServiceModel.Channels.DetectEofStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count) at System.Xml.EncodingStreamWrapper.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Xml.XmlBufferReader.TryEnsureBytes(Int32 count) at System.Xml.XmlBufferReader.GetBuffer(Int32 count, Int32& offset, Int32& offsetMax) at System.Xml.XmlUTF8TextReader.ReadText() at System.Xml.XmlUTF8TextReader.Read() at System.Xml.XmlDictionaryWriter.WriteNode(XmlDictionaryReader reader, Boolean defattr) at System.ServiceModel.Channels.BufferedHeader..ctor(MessageVersion version, XmlBuffer buffer, XmlDictionaryReader reader, XmlAttributeHolder[] envelopeAttributes, XmlAttributeHolder[] headerAttributes) at System.ServiceModel.Channels.MessageHeaders..ctor(MessageVersion version, XmlDictionaryReader reader, XmlAttributeHolder[] envelopeAttributes, XmlAttributeHolder[] headerAttributes, Int32& maxSizeOfHeaders) at System.ServiceModel.Channels.StreamedMessage..ctor(XmlDictionaryReader reader, Int32 maxSizeOfHeaders, MessageVersion desiredVersion) at System.ServiceModel.Channels.Message.CreateMessage(XmlDictionaryReader envelopeReader, Int32 maxSizeOfHeaders, MessageVersion version) at System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.ReadMessage(Stream stream, Int32 maxSizeOfHeaders, String contentType) at System.ServiceModel.Channels.HttpInput.ReadStreamedMessage(Stream inputStream) at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.SharePoint.BusinessData.SharedService.IBdcServiceApplication.GetServiceApplicationId() at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplicationProxy.<GetServiceApplicationId>b__9(IBdcServiceApplication serviceApplication) at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplicationProxy.Execute[T](String operationName, UInt32 maxRunningTime, ExecuteDelegate`1 operation, Boolean performCanaryCheck, Boolean isChannelThatDelegatesIdentity)    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.45    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Business Data    8085    Critical    The BDC Service application Business Data Connectivity Service Application is not accessible. The full exception text is: Thread was being aborted.    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.45    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff51    Verbose    Entering loadBalancer.EndOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

05/05/2014 17:53:35.50    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Topology    umbj    Verbose    Deserializing the type named Microsoft.SharePoint.SPTopologyWebServiceProxy, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c and with id abe953a6-438c-4fef-ac20-a6336bd6e493.    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.54    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Topology    8313    Critical    SharePoint Web Services Round Robin Service Load Balancer Event: EndpointFailure Process Name: w3wp Process ID: 5392 AppDomain Name: /LM/W3SVC/2130799115/ROOT-1-130437916205655691 AppDomain ID: 2 Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:50d8547d1c894ca99b11a7ac533b6441#authority=urn:uuid:b0c0f92dc498475482033c35e3fa646b&authority=https://ServerName003:32844/Topology/topology.svc Active Endpoints: 1 Failed Endpoints:1 Affected Endpoint: http://ServerName004:32843/50d8547d1c894ca99b11a7ac533b6441/BdcService.svc/http    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.54    w3wp.exe (0x1510)    0x2238    Business Connectivity Services    Business Data    ff52    Verbose    Completed loadBalancer.EndOperation()    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.54    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    High    Leaving Monitored Scope (Bdc ExecuteOnChannel: GetServiceApplicationId#99). Execution Time=329.925870466777    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.54    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Runtime    tkau    Unexpected    System.Web.HttpException: Request timed out.    df635b9b-104d-4fef-9e88-a351d604a4ce

 

05/05/2014 17:53:35.54    w3wp.exe (0x1510)    0x2238    SharePoint Foundation    Monitoring    b4ly    Medium    Leaving Monitored Scope (Request (GET:https://MyGreatWebApplication:443/7g/LogicalAccess/_layouts/NintexWorkflow/StartWorkflow.aspx?TemplateID=%7B6bc8d4a9-31e2-4e07-af45-2ddf36af1dfd%7D&Source=https%3A%2F%2FMyApplication%2Efrb%2Eorg%2F7g%2FLogicalAccess%2F%5Flayouts%2Fworkflow%2Easpx)). Execution Time=364415.900973448    df635b9b-104d-4fef-9e88-a351d604a4ce

 

 

The Fix

 

There is a fix for this as of May 2014. You can either open a case with Microsoft Support to get it or wait for it to be included in either the June 2014 cumulative update.

 

 

 

 

 

 

      

Additional key words:

Publish a .NET Connectivity Assembly to the BDC Metadata Store LobSystem BDCM System.ResolveEventHandler AppDomain AssemblyResolve Initialize 9upy Release 9upz


Free Tools for the SharePoint Mechanic Toolbox

$
0
0

 

This list is an expansion of an earlier blog of mine. I plan to continue to improve and enlarge this.

 

 

PowerShell and STSAdm – of course.

 

ULS Viewer – Makes scouring through ULS logs a bit easier on weary eyes.  It's a must have. Some prefer the codeplex version here.

 

Debug Diagnostics 2.x - http://debugdiag.com -  DebugDiag 2.0 was released in October 2013.  I use it all the time for getting hang dumps, crash dumps, and exception dumps. I also appreciate its own scripts for debugging dumps. I've got several blogs on how to use DebugDiag. One of my favorite things to do with debugdiag is to use it to trip a userdump of a SharePoint process when a specific ULS tag is logged to the uls logs. (Read that here.)

 

Process Monitor – to know which files and registry keys are being accessed by various processes. Process Explorer, also from Sysinternals.com, is also good to have.

 

Performance Analysis of Logs (PAL) Tool – for creating Perfmon templates and for analyzing perfmon captures

 

SharePoint Feature Administration and Clean-up Tool – use with caution. Sometimes this is indispensable for cleaning up missing features before an upgrade.

 

Delegconfig v1 and Delegconfig v2 Beta.   I like having both versions when troubleshooting Kerberos related problems.  They're not always easy to get working but usually I can get one or the other to work.  And when they work, they're awesome.  See my list of steps here. Note that neither version works in a .net 4.0 application pool. But it's easy to create a new application pool, have it use the same account that the application pool you're focusing on has, and assign it to a lower .net framework level.

 

Netmon 3.4 + NMParsers + SharePoint Parsers      ||OR||    Message Analyzer which seems to have displaced Netmon.  I also use Wireshark frequently too. 

Sometimes when I'm working with a Windows 2008 R2 server or Windows 7 workstation and we can't wait for any tools like these to be installed, I use NETSH with steps like these:

Open an admin CMD prompt

Type "Netsh trace start capture=yes tracefile=c:\temp\test.etl maxsize=250 persistent=yes"

The above Command Line will Capture Network traffic, place the ETL file in the c:\Temp Directory, with a Max Size of 250, and even Continue Running during/after a reboot

After a Few Minutes Type "Netsh Trace Stop".

Go to the c:\Temp Directory. Open the ETL file with Network Monitor 3.4

   

 

Fiddler2 - for seeing under the hood of Internet Explorer. This tool is not quite in the same category as Netmon, Message Analyzer, or Wireshark. But it's in a similar category. Sometimes it is easier to use fiddler than those other tools. Also it does a better job of decrypting HTTPS traffic if you tell it to. Note that this tool inserts itself as a proxy and therefore if your browser uses a proxy, the use of fiddler will displace that while its running.

 

System.net Tracing – to find out what those web services are hearing and saying?  Works in SP2007 and SP2010.  Just make sure you get the right web.config file(s). This is especially useful for trying to figure out what is going on with WCF services using https.

 

System.webServer Tracing – event tracing for IIS. This is good to know about.

 

Failed Request Tracing - more IIS level tracing.

 

Perfmon.exe – notice that it also can capture event trace data

 

Logparser 2.2 – for examining large IIS files in particular. I like using it, for example, to find requests where time-taken is over 5 seconds and requests that get the 500 internal server error. I have heard that some like Log Parser Lizard but I haven't tried it yet.

 

SNAP tool  - This tool by Todd Carter is allows you to see which .net exceptions are being thrown.  It doesn't make any memory dumps but it shows exceptions in real-time.  It could have been called "the exception monitor" if that name weren't already taken.   Some of the new functionality in DebugDiag 2.x arguably makes this tool less important. But it's still good to have in the toolbox.

 

Developer Dashboard

 

SQL Profiler trace

 

HTTPERR log - I turn to this first whenever I see 503's being issued to the browser. Found at C:\Windows\System32\LogFiles\HTTPERR. An easy shortcut is to click START > RUN > Logfiles [Enter]

 

 

Windows Performance Toolkit - http://social.technet.microsoft.com/wiki/contents/articles/4847.install-the-windows-performance-toolkit-wpt.aspx

 

Debugging Tools for Windows (mainly for Windbg.exe)

PSSCOR2.dll for asp.net 2.0, 3.0, and 3.5 debugging in windbg.exe

PSSCOR4.dll for asp.net 4.0 debugging in windbg.exe. Note this doesn't work for .net 4.5.

SharePointExt.dll for SharePoint debugging in windbg.exe

 

iDNA/TTTrace.exe – for tracing any process - provided by Microsoft support

PSSDIAG – for SQL Server tracing - provided by Microsoft Support. It includes sql profiler traces but also goes beyond them.

SETH – SharePoint Engineer Troubleshooting Helper – provided by Microsoft Support.  Checks for more than two dozen of the most common problems and potential problems.

 

   

Notes on Debug mode versus Release Mode

$
0
0

 

Dlls compiled in debug mode should stay in the developmental environment while they're being debugged, improved, stepped-through, and tweaked.

When the dll is ready to be deployed (released) to a high-traffic server—such as a SharePoint TEST, QA, or Production Farm—the dll should be recompiled in release mode.

When in debug mode. . .

  1. Expect the memory footprint of the process to be enlarged since debug symbols are required to be loaded.
  2. Expect a substantial performance hit due to the debug and trace statements (System.Diagnostics.DebuggableAttribute) in the output IL code. In debug mode there are several extra instructions added to enable you to set a breakpoint on every source code line a debugger such as Visual Studio.
  3. Also the code will not be optimized by the compiler. JIT optimizations will be disabled. (IsJitOptimizerEnabled)

In release mode. . .

  1. all calls to Debug class methods in your code are disabled.
  2. Code is optimized during the build operation
  3. You cannot take advantage of any source-code level debugging tools. You cannot set breakpoints.
  4. Better performance
  5. Smaller memory footprint

 

 

 

 

 

Why am I not seeing what I expect in the Security Event log?

$
0
0

 

 

 

Often the Windows Security Event log disappoints people when they're trying to find clues to some kind of permissions or rights problem--to a 401 unauthorized response from IIS, for a common example.

They open the log up, they see dozens of events, but they don't usually see the type of information they expected to see. And so it's common for Admins to think, "Oh, that's a worthless log." And so most people don't pay attention to this log.

This event log can be very helpful however. And often the real problem may be that there is no auditing going on. Perhaps this is because the default settings don't pump much noise into the security event log.

 

If you're working with a domain controller, you'd want to open the Domain Controller policy. Otherwise you'll want to open the local security policy. There are many ways to get there. By force of habit I just tend to run "secpol.msc."

 

 

 

 

Drill down into Local Policies > Audit Policy

Note where there is no auditing, where only successes are being audited, and where only failures are being audited, as seen below.

 

 

If there is no auditing going on, or if you're only auditing successes, perhaps that's why you're not seeing much in the Security Event log.

If you attempt to add checkmarks to "success" or "failure" for one of these auditing options and find that the checkboxes are greyed out as seen below. . .

 

 

. . . then you may need to talk to the domain admin who controls group policies to see about getting it adjusted.

After changes are made, I tend to prefer to run gpupdate /force and run IISRESET (I usually work with web servers) or reboot.

 

 

More info:

 

http://technet.microsoft.com/en-us/library/cc772979(v=WS.10).aspx#w2k3tr_sepol_local_set_knkn

Local Policy Settings > Audit Policy

 

How to enable and apply security auditing in Windows 2000

http://support.microsoft.com/kb/300549/EN-US

 

Security auditing settings are not applied to Windows Vista-based and Window Server 2008-based computers when you deploy a domain-based policy

http://support.microsoft.com/kb/921468/EN-US

 

 

 

 

 

 

 

 

 

Basic Steps for Making a Process Monitor (ProcMon) Capture

$
0
0

 

 

ProcMon is an indispensable tool that zillions of people have used. Here are some easy steps for starting, stopping, and saving a Procmon capture.

 

  1.  

  2. Unzip ProcessMonitor.zip

     

     

  3. Copy ProcMon.exe to the server or workstation that you're performing troubleshooting on

     

  4. Launch Procmon by double-clicking Procmon.exe

     

     

  5. When you see the option to set filters, generally you don't need to. You can always filter the results after the capture is complete. Just click OK

 

 

  1. Stop the capture by clicking the icon of the magnifying glass, as seen below. (By default the capture begins immediately when Procmon.exe is launched.) Alternatively, you can use the keyboard and press CTRL+E.

     

When the capture is stopped, a red slash mark should appear across the icon of the magnifying glass.

 

 

  1. If you really want to set some filters such that less data is captured, now is arguably the best time in my opinion. When in doubt, don't add any filters. But if there are some processes that you are certain that you can exclude from the capture, it's easy to do. For example, if you wanted to exclude Skype.exe because you see it in the capture and know it's irrelevant, just right-click Skype.exe and select "Exclude Skype.exe"

 

 

  1. Clear the events from the capture by clicking the icon that resembles an eraser on paper. (Or by clicking Ctrl+X.)

b

 

  1. Begin to take the steps necessary to reproduce the problem. But when you have one step that remains—when you are one mouse-click away from reproducing the problem—hesitate long enough to. . .

 

  1. Start the process monitor capture by clicking the icon of the magnifying glass.

     

  2. Perform your one last mouse click to reproduce the problem, wait for the problem to be fully reproduced, and then quickly. . .

     

  3. Click the icon of the magnifying glass again to stop the Procmon capture.

     

  4. From the file menu, save the capture with a unique name and with the .pml format.

     

One of the most basic, common, and first things I usually do is to set a filter on the procmon results that searches the results column for "Access Denied."

Start by clicking the icon (or CTRL+L) that looks a bit like a coffee filter or snow cone as seen below. . .

 

 

Toggle the first two options to RESULT + CONTAINS. Type in the word DENIED into the blank field. Click ADD and click APPLY.

 

 

Recommendations for Page Files on SharePoint Servers

$
0
0

 

 

Summary

 

Here are my notes on paging file recommendations for SharePoint (2007, 2010, and 2013). This is something I always like to check when a new farm is built or I'm looking at a poorly performing farm for the first time. Often they're set too low.

 

Also I tend to recommend moving the page file off of the system partition and onto a spare drive for multiple reasons. SharePoint health rules often complain about lack of free space on the C: drive. Moving the page file is one way to get around that problem and may give increased performance simultaneously.

 

 

150% size of RAM

 

 

One TechNet article says SharePoint servers needs to one paging file and that the paging file should be. . .

 

"equal to or greater than the total amount of available physical memory. . . We recommend that you either allow the system to manage the page file size or to set it at 150% of the size of the physical RAM." 

 

A reliable KB article that talks about Windows servers in general (but not SharePoint servers in specific) also harmonizes with this saying. . .

 

"the traditional model of the page file should be at least the size of physical ram plus 1 MB, or 1.5 times the default physical RAM. . . 1.5 times the physical memory."

 

Another TechNet article predicated upon a SharePoint 2010 Health Analyzer rule says. . .

   

A Windows best practice is to set the paging file size to equal to or greater than the total amount of available physical memory. Garbage collection is typically more effective at automatic recovery of heap memory when managed heap size approximates paging file size. When paging file size is smaller than RAM size, new allocations of managed memory are granted, which leads to more garbage collection and higher CPU usage. . . We recommend that you either allow the system to manage the page file size or to set it at 150% of the size of the physical RAM.

   

   

 

Move the Page File off of the C: drive  

 

 

 If you have more than one local drive on the server, it may be a good idea—sometimes a VERY good idea—to move your page file off of the C drive and onto the other drive. So what are the cons and pros for doing so? The arguments summarized below are from an old-but-good kb article.

 

Pro #1:

 

To enhance performance, move the paging file to a different partition. When the paging file is on the boot partition, Windows must perform disk reading and writing requests on both the system folder and the paging file. When the paging file is moved to a different partition, there is less competition between reading and writing requests.

Pro #2:

 

When you place a paging file on its own partition, the paging file does not become fragmented, and this counts as another definite advantage. If a paging file resides on a partition that contains other data, it may experience fragmentation as it expands to satisfy the extra virtual memory that is required. An unfragmented paging file leads to faster virtual memory access and greater likelihood of a dump-file capture that is free of significant errors.


Con #1:

 

However, if you completely remove the paging file from the boot partition, Windows cannot create a dump file (Memory.dmp) in which to write debugging information in the event that a kernel mode STOP error message occurs. This can lead to extended downtime if a debug procedure is necessary to troubleshoot the STOP error message.

[But really now. When was the last time you had to make a kernel dump of a server? Seven years ago? If you really need to make a kernel dump, you can switch the pagefile back to the C: drive temporarily, make your kernel dump, and switch it back to the other drive after making the dump. You might have to clear up some space on C: to do it. To make the dump, the size of the page file needs to equal the size or physical RAM]

 

What about two page files?

 

"[One possible solution to consider] is to create one paging file that is, by default, stored on the boot partition, and then create one paging file on another, less frequently accessed partition. Additionally, it is optimal to create the second paging file so that it exists on its own partition, with no data or operating-system-specific files. By design, Windows uses the paging file on the less frequently accessed partition over the paging file on the more heavily accessed boot partition. An internal algorithm is used to determine which paging file to use for virtual memory management."
 

   

 

How Do You Change the Paging File Size and/or Location?

    

Make your way to System Properties (varies for different operating systems) and select the Settings button under Performance

Select the Advanced tab and click the Change button under Virtual Memory

 

If the recommended size is 150% of the physical RAM you might be able to get away with setting the bullet beside System Managed File. But it may be better to set it exactly to 150% of RAM by placing the bullet beside CUSTOM SIZE and setting both the initial and maximum sizes to 150%. Or you could try setting the initial size to 100% of the RAM on the server and set Maximum size to 150% of RAM.

 

 

Search Keywords:

   

 

Rule Name: The paging file size should exceed the amount of physical RAM in the system

Summary: The paging file size on some servers in the SharePoint farm is smaller than the total physical memory that is available on the servers.

Rule Name: Drives are running out of free space

Summary: Disk drives on one or more of the servers in the farm are running out of disk space.

Rule Name: Drives used for SQL databases are running out of free space.

Summary: The databases have one or more files that exceed the available free disk drive space. If this happens, operations will fail. A disk drive should have enough free space to allow the largest database file to automatically grow to twice its size.

   

   

   

ERROR 500.0 | Internal Server Error | AuthenticateRequest | StaticFile | 0x80070542

$
0
0

 

 

 

Symptoms:

 

  1. When browsing to the site without specifying the default page name in the browser, we received a 500 error:

     

    HTTP ERROR 500.0 - Internal Server Error

    The page cannot be displayed because an internal server error has occurred

    AuthenticateRequest

    StaticFile

    0x80070542

     

 

 

  1. Failed request tracing for the http 500 response further elaborated the problem with this:

     

    Either a required impersonation level was not provided, or the provided impersonation level is invalid.  (0x80070542)

     

     

    This problem did not happen when using anonymous authentication on the site—only with Windows Integrated authentication.

     

  2. When browsing to the site and specifying the default page name in the browser, the page was served without the 500 error but much of the necessary content was missing.

 

 

Solution Steps:  

 

  1. Per http://support.microsoft.com/kb/981949 we added the local IIS_IUSRS group to a GPO that allowed that group to have "impersonate a client after authentication" as a user assignment right and applied the policy to the web server.   (We couldn't apply it in the local security policy directly in this case.)

     

 

 

 

 

  1. Per http://support.microsoft.com/kb/981949 we added IIS_IUSRS group to the D:\inetpub\wwwroot folder's NTFS permissions. 

     

  2. Ran GPUDATE and IISRESET.

 

NullReferenceException when Attempting to Configure Managed Accounts

$
0
0

 

While attempting to visit Configure managed accounts (ManagedAccounts.aspx) in a SP2013 farm today, I got a correlation ID and the tip of the NRE iceberg: "Object reference not set to an instance of an object."

 

 

Here's what the salient part of the ULS logs looked like. . .

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation General                8nca       Medium                Application error when access /_admin/ManagedAccounts.aspx, Error=Object reference not set to an instance of an object.   at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation Runtime               tkau       Unexpected                System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

10/14/2014 15:47:12.42  w3wp.exe (0x0D68)        0x12E0  SharePoint Foundation General                ajlz0       High       Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   0026c29c-cff6-10ad-8bc3-c9b12404a3bd

 

 

Resolution

 

First you have to identify all the Managed Accounts that have automatic password reset enabled. If you're seeing this NRE you used to be able to check this through Central Admin, but now you can't. So run this cmdlet instead:

Get-SPManagedAccount | ? {$_.AutomaticChange -eq $true} | SELECT UserName

Here's what that looks like in a simple lab environment that is not experiencing the NRE:

 

 

This command displays the list of managed accounts in your farm that are set to have their passwords set to change automatically. Make a note of all the different accounts that are returned. You'll need one or more of them soon.

 

Second, look at all the Password Generation timer jobs associated with various accounts and servers. The Password Generation timer job is the job that "generates new password for an account, updates the account password, then launches jobs to deploy the new password to everything that uses it."

To do this, open Central Admin and select Monitoring, as seen below.

Then select Check job status. . .

Select Scheduled from the Timer.aspx page. . .

Look for "Password Generation" jobs for various accounts and various servers.

In my screenshot above I only find two jobs total. This is because I happen to only have one managed account that is set to have its password automatically changed by SharePoint and I happen to only have two SharePoint servers in this farm. You might have many more.

This could be a little tricky. What is not there that should be there? Compare the list of Password Generation jobs with the list of Managed Accounts that are set to have password changes. Look for one or more jobs that should be there but aren't there. A missing job is probably the null reference SharePoint is complaining about. If the job is there, leave it alone. Don't delete it. If the job should be there, and it isn't there, make note of the account that it's not there for. The root cause of this problem is that Central Admin is looking for a timer job that is not there.

Third, for any managed account that showed up in the list produced by "Get-SPManagedAccount | ? {$_.AutomaticChange -eq $true} | SELECT UserName" AND which does NOT have a Password Generation job, execute the script below to force the account to no longer have the AutomaticChange of passwords set to true.

 

$acct = Get-SPManagedAccount "<DOMAIN>\<UserName>" ß(Change that to the actual domain and username of the account in focus.)

$acct.AutomaticChange = $false

$acct.Update()

 

Or if you prefer, you can just do it for all the managed accounts.

Now you should be able to visit Configure managed accounts (ManagedAccounts.aspx) and set the account(s) to have an automatic password change schedule again.


Blank browser pages for Audit Log Reports in SP2007

$
0
0

 

 

Symptoms

 

Perhaps your audit log reporting functionality was working great last month but this month you're only seeing blank, empty pages in your browser. You can't run any reports successfully anymore in your MOSS 2007 farm. You can make it to SITE ACTIONS and then on to AUDIT LOG REPORTS.

 

You see all the links you're supposed to see at Reporting.aspx.

But you can't do anything with those links anymore.

Clicking any of these links should open a spreadsheet in Excel or, if Excel isn't installed on the client machine, it should render in the browser with some valid xml data that looks something like this:

 

But after installing the .net update 2905247/2894844/2894852/2894851/2894847/2894843 and rebooting things changed.

Now you just see blank pages whenever you click any of the links.

 

You can click the Run a Custom Report link and get a page but you won't be able to run any existing reports or create any new reports.

 

You'll just get a blank page.

 

Troubleshooting

 

Nothing interesting seems to show up in the SharePoint diagnostic/ULS logs.

But reproducing the problem while monitoring the application pool with a debugdiag crash rule (that is configured to log CLR exceptions) shows some great hints.

 

Type:     System.Web.HttpException
Message:  Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. http://go.microsoft.com/fwlink/?LinkID=314055
Type:     System.Web.UI.ViewStateException
Message:  NOT_FOUND
 Stack:   
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.ViewStateException.ThrowError(System.Exception, System.String, System.String, Boolean)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.UI.Util.DeserializeWithAssert(System.Web.UI.IStateFormatter, System.String)
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
  System.Web.UI.Page.LoadAllState()
  System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest()
  System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
  ASP._layouts_runreport_aspx.ProcessRequest(System.Web.HttpContext)
  System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
  System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
  System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
  System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
  System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
  System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)

 

 Type:     System.Web.HttpException
 Message:  Unable to validate data.
 Stack:   
         RetAddr          Call Site
  System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef)
  System.Web.UI.ObjectStateFormatter.Deserialize(System.String)
  System.Web.UI.Util.DeserializeWithAssert(System.Web.UI.IStateFormatter, System.String)
  System.Web.UI.HiddenFieldPageStatePersister.Load()
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
  System.Web.UI.Page.LoadAllState()
  System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
  System.Web.UI.Page.ProcessRequest()
  System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
  ASP._layouts_runreport_aspx.ProcessRequest(System.Web.HttpContext)
  System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
  System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
  System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
  System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
  System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
  System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
DetailID = 2
 Count:    1
 Type:     System.Web.HttpException
 Message:  Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. http://go.microsoft.com/fwlink/?LinkID=314055

   

Root Cause

 

By design, the installation of update 2905247/2894844/2894852/2894851/2894847/2894843 enables the use of ViewStateMac. Unfortunately this causes some problems for WSS-3.0/MOSS-2007 site collection audit log reports.

 

Solution/Workarounds

 

Some have uninstalled the update to get past this problem. I am not recommending that. This is an important security patch to have. Besides, some future .net patch will just put you back in the same place.

Others have disabled AspNetEnforceViewStateMac in the registry to get around this problem. I am not recommending that either. It's important for security reasons to have it enabled. (See http://blogs.msdn.com/b/webdev/archive/2014/09/09/farewell-enableviewstatemac.aspx.)

Disabling AspNetEnforceViewStateMac (followed by an IISRESET) does take the blank-page symptoms away. In a lab environment I opened up regedit, searched for AspNetEnforceViewStateMac, found it in two places, and changed the value of 1 (enabled) to 0 (disabled).

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AspNetEnforceViewStateMac (This is the only one you probably would want to test with.)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AspNetEnforceViewStateMac (This might be good to keep in mind if your application pool is running in 32-bit mode for some reason)

Restart IIS to iron in the changes.

 

Mainstream support for WSS 3.0/MOSS 2007 ended over two years ago. (See http://support2.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=SharePoint+Server+2007&Filter=FilterNO.) So it's not clear at this time if a design change can or will be made. If such a fix/change is produced, I'll try to make it known here.

Otherwise perhaps the time has come to stop trying to get audit reports and start speeding up the pace towards going to either SharePoint Online (O365) or SharePoint 2013!

 

 

More Information

 

http://blogs.msdn.com/b/webdev/archive/2014/09/09/farewell-enableviewstatemac.aspx - Farewell, EnableViewStateMac!

 

http://support2.microsoft.com/kb/2915218 - Resolving view state message authentication code (MAC) errors

    [Note that this article won't help if the problem began when the patch was installed.]

 

 

 

Additional Keywords:

 

Content modifications        Content_modifications.xml

Content type and list modifications     Content_type_and_list_modifications.xml

Content viewing         Content_viewing.xml

Deletion            Deletion.xml

Run a custom report         Run_a_custom_report.xml

Expiration and Disposition     Expiration_and_Disposition.xml

Policy modifications        Policy_modifications.xml

Auditing settings         Auditing_settings.xml

Security settings         Security_settings.xml

RunReport.aspx, SharePoint 2007,

http://support.microsoft.com/kb/2905247 - Microsoft security advisory: Insecure ASP.NET site configuration could allow elevation of privilege

Microsoft .NET Framework 3.5.1 2894844 Description of the security update for the .NET Framework 3.5.1 on Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1: December 10, 2013

Microsoft .NET Framework 3.5 2894852 Description of the security update for the .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2: December 10, 2013

2894851 Description of the security update for the .NET Framework 3.5 on Windows 8 and Windows Server 2012: December 10, 2013

Microsoft .NET Framework 2.0 2894847 Description of the security update for the .NET Framework 2.0 Service Pack 2 on Windows Vista Service Pack 2 and Windows Server 2008 Service Pack 2: December 10, 2013

2894843 Description of the security update for the .NET Framework 2.0 Service Pack 2 on Windows Server 2003: December 10, 2013

Dude, my audit reports don't work! Auditing reports blank. Blank auditing reports. Blank audit report. White browser. Empty browser window.

Viewing all 36 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>