In brief..
Make sure the server has working Sql Server service (cmd /k sqlcmd -L)
Make an intact lan network between 2 pcs
Turn off windows firewall on both pcs (firewall.cpl)
Check both pcs can ping each other by name or ip without any problem
Open Microsoft Sql Server Management studio
open Security-->Right click on Logins-->New Login
Add new Login For your server database
In General -->Login name
Password
In server roles--> Public
In User mapping-->Choose your database
Check db_Owner
Check Public
Click OK
In Client side use one of the following Connection Strings:
connectionString="Data Source=eeelaptop\SQLEXPRESS;
Initial Catalog="NORTHWIND";
Integrated Security=False;
User Id=ali;
Password=ali123"
or
connectionString="Data Source=192.168.0.1\SQLEXPRESS;
Initial Catalog="NORTHWIND";
Integrated Security=False;
User Id=ali;
Password=ali123"
This is the general template:
connectionString="Data Source=<Server name or ip>\<Sql server service>;
Initial Catalog="<Database name>";
Integrated Security=False;
User Id=<User name for database>;
Password=<Password for database>"
That's all you need to make it working connection .
Make sure the server has working Sql Server service (cmd /k sqlcmd -L)
Make an intact lan network between 2 pcs
Turn off windows firewall on both pcs (firewall.cpl)
Check both pcs can ping each other by name or ip without any problem
Open Microsoft Sql Server Management studio
open Security-->Right click on Logins-->New Login
Add new Login For your server database
In General -->Login name
Password
In server roles--> Public
In User mapping-->Choose your database
Check db_Owner
Check Public
Click OK
In Client side use one of the following Connection Strings:
connectionString="Data Source=eeelaptop\SQLEXPRESS;
Initial Catalog="NORTHWIND";
Integrated Security=False;
User Id=ali;
Password=ali123"
or
connectionString="Data Source=192.168.0.1\SQLEXPRESS;
Initial Catalog="NORTHWIND";
Integrated Security=False;
User Id=ali;
Password=ali123"
This is the general template:
connectionString="Data Source=<Server name or ip>\<Sql server service>;
Initial Catalog="<Database name>";
Integrated Security=False;
User Id=<User name for database>;
Password=<Password for database>"
That's all you need to make it working connection .





