Thursday, May 17, 2012

How to change NTFS permissions for files or folders using Microsoft’s Extended Change Access Control List tool (xcacls.exe) tool


If you need a command-line tool that you can include in your batch files to change the NTFS permissions of files or folders, you can use the following tool from Microsoft.

Download iCACLS :
Article from ss64:

For example, the command below gives

icacls c:\inetpub\wwwroot\files\ /grant mary:(M,WDAC)

NOTE: xcacls is DEPRECATED.  Please use iCACLS instead which comes bundled with Microsoft Windows 2003.

Download tool here:

Other links:

  1. How to use Xcacls.vbs to modify NTFS permissions (dated 30 Oct 2006)

  2. Forum thread on Stackoverflow

Wednesday, May 16, 2012

Login failed for user 'IIS APPPOOL\DefaultAppPool'.


Following the instructions below solved my problem :)

The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' error


I encountered the following error "The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' "

Found a working solution in one of the posts in this thread.

Here’s what I did:

  1. Download the Microsoft Office 2010: Primary Interop Assemblies Redistributable at this link.
  2. Installed the software; it would extract as a setup file named “o2010pia.msi”
  3. Navigated to the “.NET” tab and added the reference “Microsoft.Office.Interop.Word”.  You can also manually add the reference under the
    <add assembly="Microsoft.Office.Interop.Word, Version=, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>


If all goes well, it should get rid of the error message just as it did for me :)

How to solve the "The type or namespace 'Packaging' does not exist in the namespace 'System.IO'" error

If you encounter this error "The type or namespace 'Packaging' does not exist in the namespace 'System.IO', here's an easy way to solve it.

Just locate the
 tag in your web.config file and add this line.  It should resolve the compilation errors straightaway.
<add assembly="WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>