Wednesday, August 1, 2012

How to solve “Error: Unrecognized element 'folderLevelBuildProviders'”


This morning, I created a ASP.NET using the default application and not touching any of the default code, I tested it successfully with the built-in web server Visual Studio 2010.  Next, I happily clicked on the “Publish Web Site” menu item and deployed it on the local IIS.
Since I did not even do anything to the default code, I thought there would be no problem when I try to call this web application from another computer.  To my dismay,  when I tried to view the site I see an "500 - Internal server error."
So I checked out the IIS manager and tried to click on the “.NET Compilation” icon.  And encountered this error  "Unrecognized element 'folderLevelBuildProviders' ".
Well, “fortunately”, it seems that this is a common problem when and tried to and solved this using the tip from stackoverflow.
So the solution is quite simple, you register the aspnet to recognise the Framework 4.0 like this:
2012-08-01_100301
What you need to make sure is that, depending on whether you are on a 32 bit or 64 bit machine, the command differs abit.
For 32 bit machine
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –i
For 64 bit machine
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis –i

How to solve “There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’” error

 

I got this error after I ran a “C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –i” command.

Apparently, it happens when you run an older version of ASP.NET application on an IIS server that has been upgraded to use the ASP.NET Framework 4.0.

I found the way to solve this problem via Brad Kingsley’s tip .

All you need to do is to edit your web.config and comment out the section “system.web.extensions” as follows.  It worked well for me, and I hope it does for you too! :)

2012-08-01_102555

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 : http://support.microsoft.com/kb/919240
Article from ss64: http://ss64.com/nt/icacls.html

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.


Article: http://support.microsoft.com/kb/318754
Download tool here: http://www.microsoft.com/downloads/details.aspx?FamilyID=0ad33a24-0616-473c-b103-c35bc2820bda&DisplayLang=en


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 :)

http://learn.iis.net/page.aspx/624/application-pool-identities/

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
    <assemblies>
    tag
    <add assembly="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

2012-05-16_163730


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
<assemblies>
 tag in your web.config file and add this line.  It should resolve the compilation errors straightaway.
<add assembly="WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>