This normally happens because you turn on the Friendly Error on your IE. By default, IE always hide the script error on, and therefore you won't be able to see any script or ASP error in your site.
To fixed this, just click on Tools-->InternetOptions-->Advanced
and uncheck Show friendly HTTP Error.
After you uncheck this, you would be able to see the real error message rather than 500 Error Message