title: Update Membership property. Method not supported
body: <p>I've tried to research the exception I'm getting for a couple of hours now with no progress.</p>
  
  <p>I'm simply trying update a Membership profile using the following code:</p>
  
  <pre><code>MembershipUser user = Membership.GetUser(username);
  user.IsApproved = false;
  Membership.UpdateUser(user);
  </code></pre>
  
  <p>So the problem is with the last line in the above code sample. The server is throwing an exception stating that the specified method is not supported. I have no build errors and I believe I'm using the correct libraries.</p>
  
  <p>Any idea why something like this would occur?</p>
  
  <pre><code>Server Error in '/' Application.
  
  Specified method is not supported.
  
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
  Exception Details: System.NotSupportedException: Specified method is not supported.
  
  Source Error: 
  
  
  Line 58:                     MembershipUser user = Membership.GetUser("asdf", false);
  Line 59:                     user.IsApproved = false;
  Line 60:                     Membership.UpdateUser(user);
  Line 61: 
  Line 62:                     // -----------------
  
      Source File: d:\Coding\ASP.NET\Source\Controllers\AccountController.cs    Line: 60 
  
      Stack Trace: 
  
  
      [NotSupportedException: Specified method is not supported.]
         WebMatrix.WebData.SimpleMembershipProvider.UpdateUser(MembershipUser user) +38206
         System.Web.Security.MembershipUser.Update() +91
         System.Web.Security.Membership.UpdateUser(MembershipUser user) +19
         Source.Controllers.AccountController.Register(RegisterModel model) in d:\Coding\ASP.NET\Source\Controllers\AccountController.cs:60
         lambda_method(Closure , ControllerBase , Object[] ) +180
         System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
         System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +211
         System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass42.&lt;BeginInvokeSynchronousActionMethod&gt;b__41() +28
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass8`1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _) +10
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
         System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +48
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass39.&lt;BeginInvokeActionMethodWithFilters&gt;b__33() +57
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4f.&lt;InvokeActionMethodFilterAsynchronously&gt;b__49() +223
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4f.&lt;InvokeActionMethodFilterAsynchronously&gt;b__49() +223
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass37.&lt;BeginInvokeActionMethodWithFilters&gt;b__36(IAsyncResult asyncResult) +10
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
         System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +48
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass2a.&lt;BeginInvokeAction&gt;b__20() +24
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass25.&lt;BeginInvokeAction&gt;b__22(IAsyncResult asyncResult) +102
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
         System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
         System.Web.Mvc.&lt;&gt;c__DisplayClass1d.&lt;BeginExecuteCore&gt;b__18(IAsyncResult asyncResult) +14
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
         System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
         System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
         System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
         System.Web.Mvc.&lt;&gt;c__DisplayClass8.&lt;BeginProcessRequest&gt;b__3(IAsyncResult asyncResult) +25
         System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
         System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
         System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
         System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
         System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9629708
         System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +155
  
      Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
  </code></pre>
  
  <p>7929</p>