ASP.Net will display a 500 if you don't have the customErrors
property set to anything or it is set to On
.
Add this to the web.config to see what the actual error is:
<customErrors mode="Off" />
Once you know what the actual error is, you can proceed to fix it.