Method-1
[1] Access your control panel at https://www.yourdomain.com:8443 [ Example :https://www.servername:8443 ]
[2] Click on subscriptions.
[3] Click on subscription name
[4] Click on websites and domains tab
[5] Select ASP.net settings(if it is corrupted, click on set to deafult)
[6] Click on manage of the particular domain name
[7] Remove all local connections in the connection string
[8] Set the custom error mode to off
[9] Then click ok
Method- 2
[1] Access your control panel at https://www.yourdomain.com:8443 [ Example :https://www.servername:8443 ]
[2] Click on subscriptions.
[3] Click on subscription name
[4] Click on websites and domains tab
[5] Click on Hosting settings
[6] Disable Custom error documents
[7] Click ok
Note : Still the exact error is not enabled means, rename your web.config file and then once again follow the above procedure.
Now you have enabled the exact error, and after that you can recheck the coding part with your error message.