1

Closed

Membership.UpdateUser fails when user.Comment == null

description

(Please forgive me if I’m missing something obvious — I'm quite new to C# and ASP.NET!)
 
When I run Membership.UpdateUser(user) when user.Comment == null, I get a System.Configuration.Provider.ProviderException “Error while performing database query.” The InnerException is System.Data.SqlClient.SqlException “The parameterized query '(@UserName nvarchar(5),@Email nvarchar(18),@Comment nvarchar(400' expects the parameter '@Comment', which was not supplied.”
 
Membership.CreateUser sets the comment field to null, so it seems to me that the provider’s query shouldn’t be assuming it has a value.
 
I’m not 100% sure, but I believe UpdateUser wasn’t doing this in 2.4.0, and has started in 2.4.1. It’s trivial to ensure that the comment field isn’t null, but it shouldn’t be necessary.
 
Thanks!
Closed Dec 1, 2011 at 11:32 AM by altair

comments

altair wrote Dec 1, 2011 at 11:32 AM

Will be fixed in 2.4.2

GrantHeaslip wrote Dec 1, 2011 at 3:45 PM

Perfect, and thanks for the great library!