I need to use different database connection string and SMTP server address in my ASP.NET application depending on it is run in development or production environment.
<
This is one of the huge benefits of using the machine.config. At my last job, we had development, test and production environments. We could use the machine.config for things like connection strings (to the appropriate, dev/test/prod SQL machine).
This may not be a solution for you if you don't have access to the actual production machine (like, if you were using a hosting company on a shared host).