This week, I encountered a strange problem with one of my ASP.Net websites. This website is hosted on multiple servers. Upon clicking a link on the home page, the web application takes me to a page. The scenario was working fine on all servers except one. On this particular server, when I tried to browse this page, I would get a blank page. The first thing I checked was the source of the page. The page had the following source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
SQL Server does not exist or access denied.
Therefore, the blank page problem was due to IIS unable to locate the generic error page, since it was not there in the subfolder. Hence, the server was transfering itself to a a blank page instead of redirecting me. Once, I copied the generic error page in the subfolder, it was able to locate the generic error page and hence, showed me the actual exception.
So, I resolved one problem but fell into another one. For some reason the server was not able to connect to the database. To resolve this issue, I tried the following steps:
1. Checked the connection string- it was good
2. Increased connection time-out- still not able to establish connection
3. Pinged database server from application server- ping was successful
4. Telnet database server from application server- telnet failed
5. Turned off the firewall on application server for testing- still not able to telnet to the database server
6. Telnet database server from another application server (having no problem)- telnet was successful
The above steps concluded that even though the firewall was turned off on the application server, I was not able to connect to the database server. The only thing then left to check was firewall settings on the database server. It turned out that the firewall on database server was allowing connections with a set of allowed incoming IPs. Upon adding this application server to the list of allowed servers, the application was able to connect and the page started to render fine.