1

I have been asked to connect .NET web services to a remote SQL Server, the SQL Server is using Windows Authentication.

I understand how to create the connection string for SQL Authentication but I do not know how I can achieve this using Windows Authentication.

There needs to be some sort of authentication to allow the remote process to run, but from what I have read, when using WA you don't specify a Username/Password. So how does the calling process get validated to allow access to the remote SQL Server.

Am I correct in saying that WA is used for access on the same Domain/Server, but for remote access SQL Authentication should be used?

1 Answer 1

1

You are correct that Windows Authentication works well when both server and client are on a single domain or in a trust relationship, but it is possible to pass authentication through a connection string, with the user name in terms of 'DOMAIN/User' for access.

Whether or not to use SQL Authentication vs windows is largely a question of where the relevant servers are located and how you wish to distribute administrative burden.

Sign up to request clarification or add additional context in comments.

3 Comments

When using 'Domain/User' access for WA, would a connection string take the following form...? connectionString="Data Source=ip_address\username;Database=databaseName;Integrated Security=True;"
www.connectionstrings.com is a fantastic resource, but typically I think it will be in the form of 'Server=SQL_server;Database=MyDB;user=DOMAIN/User;password=pass;Integrated Security=false'
The whole idea is NOT to provide the username in the connection string. The webserver must pass the credentials of the user it's serving on to SQL Server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.