first of all i am sorry for my English. i am not good at learning English.
I developed a winforms application in C#. i have a database which is created in SQL. (i use sql server 2005)
my programm has some intefaceses and and i can delete, update and insert some data to the database. the database is in my own pc.
Now i install the database to the server. Because 3 or 4 people will use the program.
the operation system in the server is win7 and i install the sql server 2005 express edition and sql server management studio. I restore my database to the this machine.
But i have some troubles while i am conneting the database. my code is below:
(Server name is DOSYASERVER
DosyaTakip is the database name)
connectionString="Data Source=192.168.0.222\DOSYASERVER;Initial Catalog=DosyaTakip; Integrated Security=true"/>
when i execure the program i get error message:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
and Server Authenticatiom mode is SQL server ve Windows Authentication Mode.
I am sorry for my English again.
Posted Dec 5, 2012, 8:17 AM
Placed the sql server in the network
you've assigned the windows authentication.
When your application is trying to connect to the sql server, it send the currently logged-in user (the windows user name of the user who is using your application). The current user is not trusted and it is getting failed.
My suggestions are,
Set up sql server authentication and try
Create a new domain user and use that account in your connection string / run the application in that context. (Run As... option)