Posted on: 8/12/2014 9:25:54 AM | Views : 505

Hi All, 
I have an Application running on ASP.NET 2.0 using Membership and Roles.  It was working on Windows 2003.  However when I implement it on Windows 2008 R2, the system gives me Object Reference not set when the following called is made.  
Guid userID = (Guid)Membership.GetUser().ProviderUserKey;

Performing a database trace (ASPNETDB is hosted in SQL Server 2008), I noticed that the username passed to the database is 'Domain\UserName' where in Windows 2003 only the UserName is passed.  
How do I go about resolve this without having to change the codes. 

Go to the complete details ...