Zulya:cn.Open();
I think (looking at the exception), the problem is with the connectivity to the DB server. Please try and ping the DB server from the web server(Or from where you are executing this application). This would give a fair idea on the problem.
I think connection string is correct. Else the error would be connection could not be opened.
Best Regards,
Abinash Patra
Please mark the post as answer, if you find this useful.