.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

Problem in setting up Windows Authentication in Windows 2008 RC2

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
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

View Complete Post

More Related Resource Links

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

Sharepoint 2003 + Windows Terminal Server 2008 + Office 2007 problem?

Hi, We have a customer where some users runs Windows Terminal Server 2008 with Office 2007. They open documents from a Sharepoint 2003 site. When they open an excel sheet they get a button in the document which says "Server workbook: Click edit workbook to edit this workbook" and there is a button: "edit workbook" The users clicks "edit workbook" but get an error message saying there is no connection to the server.  They are able to edit the document, but not save it back to the sharepoint site. Most other users work on their local computer with Office 2003. Here, everything works fine and there are no button/message stating its a server workbook.   Is this caused due to some compatability issues between Sharepoint 2003 and Office 2007?   Best regards, Thomas Hansen ErgoGroup AS

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?

Problem consuming 32bit WCF service which references a native Dll in a 64 bit OS(Windows Server 2008

I have some 32bit Dlls which i want to use it in 64bit OS as i do not have a source code of this to recompile it for 64 bit OS. I have created a x86(32 Bit) WCF service which calls these Dlls and hosted it as a Windows Service on a x64(64 Bit) machine using Windows Server 2008. I have created one more x64 client which calls a function in the WCF which in turn calls a function from the 32 bit native Dll. Whenever i try calling this WCF from the client I get an error as given below.Can anybody please guide as to where I am going wrong and what is needed to solve this issue. Thanks in advance for any help.******The Error Message********************System.BadImageFormatException: Could not load file or assembly 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.File name: 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null'   at TestWrapperWCFClient.Form2.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms

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

Problem installing Cumulative Update 6 for SQL 2008 SP1 on Windows XP

I am attempting to apply SQL Server 20008 SP1 Cumulative Update 6 on my Windows XP desktop. The update executable is unpacked and I get a brief flash of a Command Screen and then nothing. I have searched for any update files but have not found any. My Desktop Configuration: Windows XP SP3, Windows Installer 4. SQL Server 2008 SP1 Developer Edition. I am also attempting to install the Client Tools for SQL 2008R2 on this same desktop and am getting the same results. I click on SETUP and get a brief flash of the Command Screen and the installation does not continue. Internet searches speak of a problem with a registry entry in the Boostrap Key for a valid Setup directory, but this key exists in my desktop registry. Thanks,

Problem configuring SSRS 2008 with sharepoint 2007 on Windows server 2008

Hi All - I am unable to integrate SSRS 2008 with sharepoint 2007. I am new to this part please correct em if am wrong. I have 2 servers one for SQL and one for MOSS MOSS server. Windows server 2008 MOSS 2007 .Net 2008 with basic sql 2005 which comes default WSP builder Everything is working fine SQL server: Windows Server 2008 SQl server 2008 and configured SSRS BIDS. When I am trying to install SSRS plugin for MOSS it is not accepting on both the machines. Please help me if am missing something here. I configured sucessfully on one server but havent done on multi server environment. please help me.   Thanks Saritha    saritha k

OPENROWSET Problem with FoxPro and SQL Server 2008 on Windows 2008 R2

I currently have stored procedures running in SQL2K on a Win2K3R2 that gather data from our over 1500 free-table Foxpro databases. The stored procedures use MSDASQL and the VFP ODBC driver. This has been working well since at least 2005. I am now in a situation where I need to port the SQL databases over to SQL2K8 on Win2K8R2. I have a 32-bit SQL instance running so that I can still use the Foxpro drivers. I have installed the VFPODBC and the VFP OLE DB drivers and configured the Providers in the SQL instance to "Allow Inprocess" and not "Disallow adhoc access", and all those wonderful things, I have it to the point where when logged on locally to the SQL2K8 I can run either one of these statements below successfully:  SELECT number FROM OPENROWSET('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver;SourceDB=\\RMFS\FOXPRO\CLIENT1\CLIENTDB;SourceType=DBF', 'SELECT number FROM ARCUSTMR') or  SELECT number FROM OPENROWSET('VFPOLEDB', '\\RMFS\FOXPRO\CLIENT1\CLIENTDB'; ' '; ' ', 'SELECT number FROM ARCUSTMR') However, if I try to run the same query from my PC (and a Domain Admin) I get the following errors respectively: OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Visual FoxPro Driver]File 'arcustmr.dbf' does not exist.". Msg 7350, Level 16, State 2, Line 1 Cannot

Problem with Impersonation on Windows 2008 Server x64

Existing .net application that runs w/out issue on 2003 x32 and x64 Terminal Services is failing on 2008 x64 with 'Cannot Create ActiveX Component' error.

Application is compiled as x86.

The functionality is to access an email within a PST file. Utilizes Redemption 4.5 COM object for PST access.

Pseudo code:

Impersonate Domain Admin
'create the COM object (.net interop is installed
RDOSession = CType(CreateObject("Redemption.RDOSession"), Redemption.RDOSession) 
'logon to the mailbox of impersonated user
RDOSession.LogonExchangeMailbox("UserID@domain.com", "mail.mydomain.com")
'add the requested PST
RDOPST = RDOSession.Stores.AddPSTStore(PSTFullName)
Canx impersonation

If I do not invoke the impersonation method, but 'Run As Administrator' or a user with sufficient rights to the PST, the code works on 2008.
If the impersonation method is invoked, the CreateObject fails with 'Cannote Create ActiveX Component' (no inner message).  Even if I 'Run As Administrator' with the impersonation invoked, it still fails with the same error.

If I pass the username/password for the current user (which also has domain admin rights) to the Impersonation method- it works. Any other domain admin account other than the current user,

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

SQL 2008 - Switching to Windows Authentication Mode


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?

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

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

SQL 2008 SP1 slipstream problem on Windows Server 2008 x64


I have created a slipstreamed setup of SQL 2008 SP1 using instruction from this post http://blogs.msdn.com/petersad/archive/2009/02/25/sql-server-2008-creating-a-merged-slisptream-drop.aspx. It works fine on Vista box, but on Windows Server 2008 x64 box I get following error:

SQL Server Setup has encountered the following error:
The setting 'PCUSOURCE' specified is not recognized.
Error code 0x84B40003.

Problem with Windows 2008 Server 64 Bit



Please excuse me if this question have asked before.

I have a Server running a Windows Server 2008 64 Bit Operating system.In that i am running a windows service which is built using the Visual Studio 2008 under Frame work 3.5 Compiled using "Any CPU" as target platform.The windows service references a third party dll called MediaInfo.dll  (http://mediainfo.sourceforge.net/en/Download/Windows) .The 64 bit version of the mediainfo.dll is installed in that machine (It didn't allow me to install the 32 bit version, is the Windows Server 2008 not a X86-64 bit OS?).

I have a problem while the windows service tries to load the MeidaInfo.dll , it throws the exception

"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) StackTrace= 
 at eMAMCarbonIngestService.IngestService.clsMediaInfo.MediaInfo_New()"

As seen from the log when i checked the mediaInfo class inside the windows service soluion i found that the exception is generated from the following line

        public static extern IntPtr MediaInfo_New(); //Here is the exception as per my log report.

I dont have any clue why this is happening since the Windows Service is Compiled using "Any CPU" it s

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.



Installation problem with SQL 2005 on Windows 2008 R2 x64 Failover Cluster


I have built a Windows 2008 R2 x64 Failover Cluster and I need to install SQL 2005 Enterprise x64.

The SQL installation passes all checks and then fails as soon as it attempts to do the installation.

The error message in the Core(Local) log file is:

CSetupBootstrapWizard returned 1
<EndFunc Name='DisplaySCCWizard' Return='0' GetLastError='0'>
Loaded DLL:C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\sqlsval.dll Version:2005.90.1399.0
<EndFunc Name='DwLaunchMsiExec' Return='0' GetLastError='0'>
Complete: InvokeSqlSetupDllAction at: 2010/0/8 1:6:26, returned true
Running: SetPackageInstallStateAction at: 2010/0/8 1:6:26
Complete: SetPackageInstallStateAction at: 2010/0/8 1:6:26, returned true
Running: DeterminePackageTransformsAction at: 2010/0/8 1:6:26
Complete: DeterminePackageTransformsAction at: 2010/0/8 1:6:26, returned true
Running: ValidateSetupPropertiesAction at: 2010/0/8 1:6:26
Complete: ValidateSetupPropertiesAction at: 2010/0/8 1:6:26, returned true
Running: OpenPipeAction at: 2010/0/8 1:6:26
Complete: OpenPipeAction at: 2010/0/8 1:6:26, returned false
Error: Action "OpenPipeAction" failed during execution.
Running: CreatePipeAction at: 2010/0/8 1:6:26
Complete: CreatePipeAction at: 2010/0/8 1:6:26, returned true
Running: R
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