This happens because of the web.config custom Error page is set to RemoteOnly or On.
If you like to see the real error message so it can help you on your development, you should turn custom Eror off on your web confi.
Your Web Config should be set like this during development.
<customErrors mode="Off" />
For final release or in production mode
You should turn the customs Error to be On or RemoteOnly so Users can't see the real error message. You can set the default Redirect to point to some pages and you can write nice error message on your error.html page. Below is the customs Error tag that you should use on your
<customErrors mode="On" defaultRedirect="error.htm"/>