SQL Authetication in windows service

A

ajit

how to configure .NET windows service to use windows authentication for SQL
server
 
K

Khan Imran

try this

myConnection = new
SqlConnection("server=localhost;trusted_connection=true;database=xxxxx");
myconnection= new SqlConnection("data source=server address;initial
catalog=xxxx; Trusted_Connection=yes")

Khan Imran
 
D

Dave Smith

This does not work for me. I receive an Sql exception with the
following message: "Login failed for user '\'." Any thoughts on this?
There is no web.config. This is a windows service.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top