1 Attachment(s)
system.transaction problem (c#, sql 2005)
Hallo guys,
I try out to use system.transactions, in which I use the msdn code .
but I constantly get error 40: server does not allow remote connection.
but I enabled the remote connection. I dont know whats the problem happening
I hereby attach my project.
pls help me in this regard.
Re: system.transaction problem (c#, sql 2005)
Which line of code that raised the exception ?
did you try to connect using the SqlConnection without using a transcation ?
this problem sohuld not happen if you connect to localhost !!
anyway..try to use SQL Server Surface Area Configuration to allow remote connections.
Re: system.transaction problem
thanks hspc for your reply.
the problem comes in Connection1.open();
its not able to open the connection .
i enabled the remote host.
and I test the sql connection by test connection.
It works ..
it gives the error 40 :
I dont know what is the problem .. may in connection string
please help me in this regard.
mfg,
kingsly
Re: system.transaction problem
Enabling remte connections with TCP/IP should solve this problem as mentioned in:
http://www.datamasker.com/SSE2005_NetworkCfg.htm
http://blogs.msdn.com/sql_protocols/...14/492616.aspx
If I find another solution I'll post it..
Re: system.transaction problem
thankyou hspc for ur reply.
but I am stil struggling with my code ..
I tried all the steps for the error.
I dont know what i am doing wrong?
can u show some sample running code ..
Re: system.transaction problem
he cant, there is no code that will run - your sql server is refusing to allow remote connections. have you configured your sql server to allow remote connections?
Re: system.transaction problem
I configured my sql server .. according to the steps given in the link .
and also I test the sql connection through the Data connection test connection.
If I am doing something wrong, Please guide me ..
-I configured the TCP/IP setting for remote connections , firewall disabled.
why I asked the sample code is because It might be my "connection string" for the sqlconnection.
waiting for reply from you guys
Re: system.transaction problem
Hi
Connection! connection string does not have the username and password and also does not specify a trusted connection (windows authentication)
try to change it to:
Code:
using( SqlConnection connection1 = new SqlConnection("Data Source = localhost;Initial Catalog = pubs;Integrated Security=True;"))
I wish this solves the problem ,, but I'm still confused about it becasue if this was the problem the error message should be (login failed for user XXX......)
Anyway..try it and tell us...