title: iOS AFNetworking - ASP.NET Web API .ASPXAUTH storage and deletion
body: <p>I'm using the AFNetworking Framework for iOS.  I've subclassed AFHttpClient and are using it as a singleton, i.e. <code>[TestAFClient sharedClient]</code></p>
  
  <p>I'm consuming an ASP.NET Web Service API that requires the use of the .ASPXAUTH cookie.  First I have to authenticate, receive the .ASPXAUTH cookie in response, and then must pass this cookie with each subsequent request.</p>
  
  <p>After a few tests, it appears that, because I'm using a singleton AFHTTPClient, the .ASPXAuth cookie persists and, thus, no explicit storage of the cookie is required.</p>
  
  <p>However, as part of my App, I need to "logout" at some point.</p>
  
  <p>What is the most efficient way to clear this cookie, in order to logout?  Set the singleton to <code>nil</code> and re-initialize it? Do something like <code>setValue:forKey:</code>?</p>
  
  <p>Additionally, is it better that I explicitly store the .ASPXAUTH cookie? And does this expire or automatically renew if necessary?</p>
  
  <p>Thanks,</p>
  
  <p>Robby</p>