Issue with ASP .NET Profile Provider in WPF program
Posted: Tue 02 Aug 2011 13:18
I've been working the past couple of days to get the Devart ASP .NET profile provider working in my WPF program. For various reasons, this program cannot use a Windows service to access an authentication system. My program needs to use the Profile Provider to retrieve and update all user profile information directly.
I managed to get my code to the point where it generated a custom profile object descended from ProfileBase (had to find out how to use the inherits attribute in the app.config) but now I'm getting another error.
The Devart database is using a varchar to hold the user ID in the aspnet_Users table. The User ID value is actually a UUID ( aka a GUID ), however. When I call the profile object's Save method to write the profile back to the database, the devart code is using a case-sensitive match on the UserId column. The hex digits in the UserID are stored in the UserId column in upper case; however, it tries to join on the UserId column using the same hex value, but all letters in the ID are in lower case. The inner exception of the exception I get reads: "{"insert or update on table \"aspnet_profiles\" violates foreign key constraint \"aspnet_profiles_userid_ref\""}".
How do I fix this? Can I just change the data type of all UserId columns to UUID? I suspect the fix isn't that easy. Do I need to convert all alpha hex characters in the UUIDs to lower case?
All help is appreciated.
I managed to get my code to the point where it generated a custom profile object descended from ProfileBase (had to find out how to use the inherits attribute in the app.config) but now I'm getting another error.
The Devart database is using a varchar to hold the user ID in the aspnet_Users table. The User ID value is actually a UUID ( aka a GUID ), however. When I call the profile object's Save method to write the profile back to the database, the devart code is using a case-sensitive match on the UserId column. The hex digits in the UserID are stored in the UserId column in upper case; however, it tries to join on the UserId column using the same hex value, but all letters in the ID are in lower case. The inner exception of the exception I get reads: "{"insert or update on table \"aspnet_profiles\" violates foreign key constraint \"aspnet_profiles_userid_ref\""}".
How do I fix this? Can I just change the data type of all UserId columns to UUID? I suspect the fix isn't that easy. Do I need to convert all alpha hex characters in the UUIDs to lower case?
All help is appreciated.