Thanks @Arsalan Adam Khatri. Now I'm getting following error "This operation is not allowed on an object that inherits permissions." Even I have added web.BreakRoleInheritance(true);
–
RishiOct 31 '12 at 15:41

I've updated the code as you mentioned but still the same error Exception Details: System.InvalidOperationException: This operation is not allowed on an object that inherits permissions.
–
RishiOct 31 '12 at 15:55