If you can't remotely debug your application on your IIS's server, maybe because of firewall restrictions, the second best would be to liberally sprinkle your code with logging statements. Since you seem to have problems with the DB stuff start inserting the first logging statements there. Remember that good exception handling is essential.
Maybe your DBMS isn't reachable from the server your IIS is running on. If you have remote access to the server with the IIS on it run this command from there:
telnet DBMS.Server.name 1433
(if your SQL Server is listening on that port). If telnet is able to connect then a firewall is not an issue and you'll have to dig into your logfiles. If you are not yet using a logging framweork consider
Log4Net[
^].
Hope this gives you some ideas.