Click here to Skip to main content
16,020,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi guys
i have created a program that needs to connect to sql server 2008 database, and this program will run on 5 computers, that connected to one computer via a wireless modem[or router]
and the database is on that computer. so how should i set connection string in other computers.
one more thing the sql server that installed on that computer is on windows authentication.
and the connection string is like this:
XML
<add name="PgDBEntities" connectionstring="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=192.168.1.101,1433;Initial Catalog=PgDB;Integrated Security=True;MultipleActiveResultSets=True"">
      providerName="System.Data.EntityClient" />;

when i try to login i got this error = The underlying provider failed on Open
so what should i do now?
Posted
v3
Comments
Zoltán Zörgő 26-May-13 13:21pm    
What you described tells us nothing about the infrastructure. Is your db server connected to the same wifi router with a wired connection, to which the clients connect with wireless?
Integrated security works only in domain environment or on the same computer.
nariman008 26-May-13 14:41pm    
yes its connected to same router, but its wireless too. you mean that i have to create username and password for sql?

1 solution

Does not matter wifi or wired. To have window authentication / trusted connection / integrated security working between the client and the sql server, the server needs to be able to verify client user identity. This can be achieved only in a domain with kerberos or in local environment, but not in a workgroup or between independent machines. If these do not apply, you will probably need to use sql native authentication (username and password).
Check this out for some theory: http://msdn.microsoft.com/en-us/library/bb669066.aspx[^]
 
Share this answer
 
v2
Comments
nariman008 27-May-13 1:53am    
Thank you for reply but im new in this way and i donno what do you mean by sayin same domain, so i decided to create username and password. and i followed this link http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/create-a-sql-login-user-in-sql-server-2008/
but i couldnt connect to database with this tutorial. can you please tell me whats wrong ? its always show me the sql server error : 18456 , i got the help link but its totally useless.
nariman008 27-May-13 2:06am    
I got the problem, i refused to restart the server :D
Zoltán Zörgő 27-May-13 2:21am    
That might be one :) So it is solved than?
nariman008 27-May-13 2:31am    
:( nooo , sir i have created username and password, and changed the connection string, and give it my IP and port 192.168.1.101,1433 , its connecting from my computer that , sql server is on it, but from other computers, no, they cant connect :(
nariman008 27-May-13 2:36am    
once again its my fault :D the database admin had changed the port, itd now ok , Thank you sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900