...how to "forbid" users to view configuration files? ... Is it possible?
No, not using IIS configuration. For user to be able to use an application (which is based on a config), then that config will have to be accessible by that application. Technically, you could probably make it work by "hiding" the config file behind a proxy file or web application that would check the referrer of the application.But even then, they could run the application in the browser and look at the web traffic using any of the built-in debugger tools of modern browser and still see the content of the config file.