locked
ASP.NET 2.0 Membership with Windows Authentication on IIS 7.5 RRS feed

  • Question

  • User-1597244955 posted

    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. 

    Tuesday, August 12, 2014 5:25 AM

All replies