Problem while debugging SQL server 2005

Posted by Rahuls under Sql Server on 4/20/2012 | Points: 10 | Views : 836 | Status : [Member] | Replies : 5
Hi this is Rahul Sarangle, I am currently pursuing Master from VIT. I need help for my project.

I am getting problem while debugging the SQL server 2005 as "public SqlConnection con = new SqlConnection();",when my firewall is on.When i switched of the firewall,the things are going nicely.Can anyone tell me how to configure the port and firewall for SQL server 2005?

Kindly help me out from this problem. I am using XP service pack 2 OS.

rahuls


Responses

Posted by: GSM_GSV on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Can you tell exactly what problem/error you are getting

---------------------------------------
Live the life you've dreamed

Regards
MADHU

Rahuls, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rahuls on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Actully i am doing the project on GSM based power meter reading on which i need to make the server. So while writing code i am geeting the error of "public SqlConnection con = new SqlConnection();" with the pop up of The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.Is it the problem because of firewall.??

Thanking you/

rahuls

Rahuls, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rahuls on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
I am not able to send u the code??

rahuls

Rahuls, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: GSM_GSV on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Refer the below site. I think it will give you the exact solution

http://stackoverflow.com/questions/6922879/exception-type-initializer-for-system-data-sqlclient-sqlconnection

---------------------------------------
Live the life you've dreamed

Regards
MADHU

Rahuls, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandians on: 4/20/2012 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi

-Add TCP port 135 to the exceptions list

-Add the program "sqlservr.exe" to the exceptions list. (i.e: C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\Binn)

Note : InstanceName is MSSQLSERVER for the default instance, and the instance name for any named instance.


Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Rahuls, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response