Today while working on vista IIS 7 and I was trying to delete  one of module named as CustomErrorModule for Default Web Site and immediate I was notified with this nice error.  

image

And this seem to be happening only with Modules which are listed as Native . I was able to delete Managed module without any problem.Nothing was reported under system & application event viewer  logs.

Solution was to go at Root level Modules configurations and select the required native module and Unlock it.

image

In IIS 7 Native Modules seem to be locked by default and same would be valid incase of appcmd tool.

C:\Windows\System32\inetsrv>appcmd unlock config /section:httpErrors
Unlocked section "system.webServer/httpErrors" at configuration path "MACHINE/WEBROOT/APPHOST".

See Ya!!!