How can I set 404 and other error pages using web.config? I have tried adding following block in web.config.
I solved it myself. We need to add another section in web.config like below to make it work in IIS 7 / 7.5. For IIS 6 the one works which I mentioned in my question
... ...
Thanks to everyone who answered.