when 500 internal server error occurs code example
Example: HTTP Error 500.19 - Internal Server Error
This error can be due to one of below reasons
1. Web.config file contains invalid element
2. If you are using URL rewrite module in your application then URL rewrite module is not installed on your machine