.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL 2008 - Switching to Windows Authentication Mode

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :Sql Server

I'm thinking of switching to Windows Authentication on my SQL 2008 server.  Here's my first draft at a plan:

1.  Create Windows accounts matching the exiting SQL accounts.
2.  Grant the new Windows accounts the appropriate database permissions.
3.  Change applications to use the new account information.
4.  Remove the SQL accounts
5.  Switch SQL to Windows Authentication

Is is that simple?  Or am I missing something?

View Complete Post

More Related Resource Links

SQL Server 2008 Windows Authentication Mode fails for Database Engine, error 18456

I installed SQL Server 2008 Developer Edition (10.0.1600.22.080709-1414) on a Windows Vista 32-bit development machine with Windows Authentication Mode only (no SQL Server Authentication).   Since this is a development machine, I saw no need for Mixed Mode when I did the install.  The SQL Server Management Studio allows me to login to Analysis Services, Integration Services, Reporting Services, BUT NOT the Database Engine!Windows Authentication for the Database Engine gives the following error: EventID: 18456Login failed for user MYDOMAIN\MYLOGIN'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]The 'fix' I have found online is to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine.  Unfortunately, I can't since I didn't install SQL Server Authentication mode (only Windows Authentication Mode).  It appears my only recourse is to uninstall, then reinstall in Mixed mode, then to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine. Before I do so, does anyone know of a better approach?Scott D Duncan

Re-login to SQL Server 2008 in Windows authentication mode after resetting my Windows login password



I recently reset my Windows login password but from then onwards SQL Server 2008 is not allowing me to login in Windows authentication mode.

Can someone please help on where I can go and set my new Windows Login password in SQL Server 2008 and continue to login in Windows authentication mode?

Thank you,

Anish Ravindran

Windows 2008 R2 kerberos authentication

Hi i have install windows 200R2 with blackpearl but i have this issue with Kerberos Authentication the same account when using ie8 on the local machine allows me to login while the same credientials using ie7 & ie8 on remote machine will keep prompting for credentials; any advise on this?

VS 2008 Design Mode Hangs on Windows 2008 Server

 I have looked at all the posts I can find on this problem and tried everything I can think of, but still the problem persists. I am getting really sick of it. It was working fine for the last year until an update to MS Office 2007 caused a lot of problems (automatic update). After checking posts here, I removed it completely. No change. I then tried all the things I could find on other posts, also no change. Today, I removed VS and the Web Authoring Component and re-installed. Still no go. Does anyone have a fix for this problem. It seems that it has been around a long time, but is still giving problems. I even saw one suggestion to reformat the drive! You've got to be joking! Help please, I'm getting desparate.  

Problem in setting up Windows Authentication in Windows 2008 RC2

Hi,We have a working version of application (Intranet) with uses Windows Authentication deployed in Windows 2003. The application uses HttpContext.Current.User.Identity.Name to get the logged-in user. Here impersonate is turned off.Right now, we are move to Windows 2008 RC2 where this Windows Authentication problem arised. I have Digest Authentication and Windows Authentication enabled. And also I have enabled Anonymous Authentication enabled to avoid the Login dialog of IIS in the end-user IE. Now I am getting HttpContext.Current.User.Identity.Name as Empty. When I impersonate using username and password, I am used to login using that user but all the users uses the same user to login.Does any has solution for this?Deployment Server - Windows 2008 RC2 (IIS 7.5)Development - Windows 7 (IIS 7.5)I am new to IIS 7.5. Please give me a solution

problem with connecting to local SQL Server 2008 default instance using windows authentication




I have a user getting some problem with connecting to local SQL Server 2008 default instance using windows authentication with a user which has sysadmin role and is owner of each existing database:

2010-09-28 15:40:35.04 Logon       Error: 18456, Severity: 14, State: 11.


2010-09-28 15:40:35.04 Logon       Login failed for user 'IIS APPPOOL\RoomViewSEWebClient'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT:]



This us

Reporting Services 2008 and Windows Authentication


I have been searching through numerous blogs and MSDN/Technet posts for the answer to this but I can't seem to find anything concrete other than 'do something different.'


What I am attempting to do is setup reporting services to do a double hop when using Windows Authentication back to remote datasources.  Here are the scenarios I am faced with so far;  To the best of my knowledge I have setup the appropriate SPN's for kerberos, the server hosting the application is setup for Delegation, as is the Domain Service Account that RS is running under.  RS is running in native mode, not sharepoint integrated.


1) When the rsreportserver.config file is set to use NTLM a user can authenticate back to the report server and a report will return the USERID for as appropriate user.  When making a connection to a remote datasource it tries to authenticate as NT Authority\Anonymous logon.  obviously I am not going to setup the anon logon as a read only account on the server for security purposes.

The Web.config file for the report server is set to impersonate 'TRUE', when setting to false the reports returns a userid of the service account RS is using, and attempts to connect to the remote datasource as the service account.  There would be no way to filter roles for who is able to

Mixed Authentication Using IIS 7 On Windows Server 2008


Hi Mike,
I have read your workaround for mixed authentication mode, and it works fine here on my own solution when i tried it, but my scenario for mixed authentication mode is a little bit different, it was working fine on IIS 6.0 ,but when i tried it on IIS 7 it didn't work.
My Secuirty settings for the app as follows:
- am using forms authentication and my login page called "Login.aspx".
- am using your custom module called "Mvolo.FormsAuthenticati

Sql Server 2008 logs Authentication mode incorrectly avoids remote login


Im trying to connect SQL server 2008 Express R2 installed on XP sp3 pc through ODBC SQL Server driver with a Windows 7 PC. I managed to define static IP ports and setup firewall. Now the ODBC connection successfully gets created by accepting uid : sa and my password given.

Now Im getting "login failed for user ". " msg from my application. When I run the same application with same ODBC connection created in the SQL server PC it works fine. The two pcs operate in a workgroup.

Following  is the error log. Im surprised to note that the server logs its in Mixed mode initially and later makes a cry that its in Windows Authentication mode. !!!!

010-07-25 15:19:53.76 Server      Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)
    Apr  2 2010 15:53:02
    Copyright (c) Microsoft Corporation
    Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3, v.3311)

2010-07-25 15:19:53.76 Server      (c) Microsoft Corporation.
2010-07-25 15:19:53.76 Server      All rights reserved.
2010-07-25 15:19:53.76 Server      Server process ID is 3552.
2010-07-25 15:19:53.76 Server      Auth

Website Windows Authentication fails when enabling SQL Mixed Mode.


Hello all,

Just to describe the scenario. I have a website. This lives on a webserver. On that webserver is an SQL server. The website connects to this database using windows authentication. I have written a windows form application that connects to the SQL Server on the webserver. This application is being run from a location on out intranet. The Winform application use SQL authentication to connect to the database. The SQL Server didn't have mix mode authentication enabled. So I enabled it. The winform application could now connect to the SQL Server.

This is where it starts getting a little strange.

The Website that was already connecting find using integrated authentication starts failing with:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

When you are enabling mixed mode authentication, you are adding another authentication method, why would the original Windows authentication fail?

Thanks for any suggestions and sorry if this is completely the wrong place to be asking this question,


Windows authentication using SSRS 2008 R2 on separate machine from SQL db engine - Kerberos required


Is this still an issue in SSRS 2008 R2:  Can't use Windows authentication (integrated security) when the SQL database server is on a different machine than Reporting Services -- unless you (1) use Kerberos security, or (2) store credentials, or (3) use credentials supplied by the user when running report AND use as Windows credentials to impersonate?

I have SSRS 2008 R2 set up on a different machine than MSSQLServer 2008 R2.  When I create a report on the SSRS server that uses a data source specifying Windows integrated security, my symptom is that I get the following  error:

Cannot create a connection to data source 'myDataSource'. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Here is a blog describing the problem under SSRS 2005 (with IIS): http://blogs.msdn.com/b/jgalla/archive/2006/03/16/reporting-services-and-windows-authentication.aspx



Richard Thompson

Windows 2008 Server: Authentication failed because the remote party has closed the transport stream


Hi, I am trying to use TLS to connect to the Windows 2008 Server from windows XP, I set Authentication=False.

It throws the below authentication exception when connected to WIN 2008 Server with SP2, where as it used to work fine with WIN 2003:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Below is the sample code.


protected Stream stream;

IPEndPoint ipe = new IPEndPoint(addr, port);

Socket socket = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);


socket .SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, options.keepAlive);
socket .LingerState = new LingerOption(options.lingerTime >= 0, options.lingerTime >= 0 ? options.lingerTime : 0);
socket .NoDelay = options.noDelay;

stream = new SslStream(stream, false, new RemoteCertificateValidationCallback(true), null);


I am using .Net 3.0 Frame work & VS 2005

Any help over here is highly appreciated.



MS SQL Server 2008 sa account locked out and Windows Authentication login is greyed out



The sa account got locked out and even though mixed mode authentication is enabled. When I select "Windows Authentication" the Username and Password fields are greyed out. The username field contains my current windows logon and the password field is blank. I am logged in with a windows administrator account though I hadnt explicitly added this account to the SQL server sysadmin role.

I have also tried "Run as Administrator" with the SQL server management studio but the problem persists

Please note that SQL server was installed with another windows administrator account. Could this be the reason ? Will it work if I login with the account with which SQL server was installed ?

Web Matrix + Windows Authentication


I'm curious if its possible to get windows auth working with asp.net webpages/webmatrix.

I've got it published to IIS with windows auth turned on and anonymous/forms/basic turned off.

I'm guessing the WebSecurity Helper probably won't work here but can you access User.Identity.Name etc?

Sorry for the newbie questions, I've only just started working with asp.net ^^,

Windows Authentication for IIS in Windows 7 Home Premium Edition - for ASP Websites.


How to create a virtual directory and get benefit of the IIS. Is there a workaround to accomplish this without the Windows Authentication for Windows 7 Home Premium Edition?

Thanks in advance, 

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


Using windows authentication to access SQL when using ASP.NET 4.0 via COM+


I am using SQL Server 2008 under windows authentication, front end is ASP.NET which uses COM+ to access database.

COM+ components are configured to run as domain user.

When looking through the logs (SQL Profiler), I can see the login name as the configured identity instead of windows indentity.

I have got Website running under "Intergrated Windows Authentication" and database is running locally on webserver.

Web configure contains entry for <identity impersonate="true"/>.

My connection string is

connectionString="data source=db01\test01;initial catalog=test; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes"

Any ideas?




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend