<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEYCRHYycCp7ImA9WhRaFEw.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730</id><updated>2012-02-16T10:16:05.898-08:00</updated><category term="viruses" /><category term="openid" /><category term="scientific revolutions" /><category term="web" /><category term="books" /><category term="Amazon" /><category term="windows phone 7" /><category term="privacy" /><category term="gameinsects. social games" /><category term="gannett chicks" /><category term="Apple" /><category term="debate" /><category term="ants" /><category term="phone" /><category term="bee" /><category term="Sql" /><category term="pool" /><category term="submit" /><category term="wp7" /><category term="client side validation" /><category term="apps" /><category term="slow parenting" /><category term="sports" /><category term="pelicans" /><category term="pets" /><category term="mother nature" /><category term=".net" /><category term="united states" /><category term="evil" /><category term="registration" /><category term="humor" /><category term="facebook" /><category term="chocolate in peanut butter" /><category term="google voice" /><category term="soviet union" /><category term="facism" /><category term="global warming" /><category term="voice dialing" /><category term="disruption" /><category term="liberal media bias" /><category term="robots" /><category term="clayton christensen" /><category term="memory" /><category term="IIS" /><category term="gaming" /><category term="Entity Code First" /><category term="mvc" /><category term="visual studio" /><category term="obama" /><category term="android" /><category term="win 7" /><category term="book reader" /><category term="texas" /><category term="software" /><category term="error" /><category term="physiology" /><category term="fact checking" /><category term="google" /><category term="Kindle" /><category term="geoengineering" /><category term="LoTR" /><category term="environment" /><category term="immigrants" /><category term="hornet" /><category term="ssid" /><category term="evolution" /><category term="paparazzi" /><category term="downloads" /><category term="water" /><category term="biology" /><category term="steve jobs" /><category term="celebrities" /><category term="oauth" /><category term="social gaming" /><category term="code" /><category term="happiness" /><category term="async" /><category term="human nature" /><category term="science" /><category term="libertarians" /><category term="online education" /><category term="tech" /><category term="children" /><category term="ckeditor" /><category term="nomap" /><category term="parenting" /><category term="cruel" /><category term="toys" /><category term="C#" /><category term="transciption" /><category term="wireless" /><category term="mother nature kills" /><category term="photographers" /><category term="men" /><category term="iPad" /><category term="conservative bias" /><category term="markets" /><title>Auto Generated</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.autogenerated.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.autogenerated.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/autogenerated" /><feedburner:info uri="autogenerated" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0AHQHsycSp7ImA9WhRSFEo.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-5980154270597153989</id><published>2011-11-16T11:28:00.000-08:00</published><updated>2011-11-16T11:28:51.599-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-16T11:28:51.599-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ssid" /><category scheme="http://www.blogger.com/atom/ns#" term="nomap" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><category scheme="http://www.blogger.com/atom/ns#" term="privacy" /><title>Love the _nomap.</title><content type="html">There really isn't much I can add to the Google &lt;a href="http://googleblog.blogspot.com/2011/11/greater-choice-for-wireless-access.html"&gt;_nomap.&lt;/a&gt; hijinks.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://parislemon.com/post/12859599499/greater-choice"&gt;Parislemon&lt;/a&gt; has a nice summary. &lt;br /&gt;
&lt;br /&gt;
However, I did create a &lt;a href="http://www.cafepress.com/floatingfactory"&gt;commemorative t-shirt&lt;/a&gt; that you can own for a low low price.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://images7.cpcache.com/product/593702547v0_240x240_Front_Color-Royal.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-5980154270597153989?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/EfqFmPKecbg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/5980154270597153989/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/11/love-nomap.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/5980154270597153989?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/5980154270597153989?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/EfqFmPKecbg/love-nomap.html" title="Love the _nomap." /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/11/love-nomap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAHSHc-fCp7ImA9WhZTEUs.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-1316592402064531695</id><published>2011-03-14T20:45:00.000-07:00</published><updated>2011-03-14T20:45:39.954-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-14T20:45:39.954-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="registration" /><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Getting the Facebook connect registration widget signed_request in MVC</title><content type="html">I tried to use the FB connect registration tool to create a single registration form. FB connect login works (well, the async code is pretty sketchy), but the registration code requires decoding a signed_request hash and, well, the code I was using to get the login info from the JS SDK wasn't getting the signed_request registration info. Oooff. That's a lot to say.&lt;br /&gt;
&lt;br /&gt;
Anyhoo. Tried various examples, tried to use various FB SDKs with no love. User error no doubt. However, this example on Pastebin, &lt;a href="http://pastebin.com/MPCxD2mL"&gt;Facebook Registration C# handling&lt;/a&gt; worked first time with no changes. Yeah! Thanks anonymous guest poster.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-1316592402064531695?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/mTCwXsgdHKM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/1316592402064531695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/03/getting-facebook-connect-registration.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1316592402064531695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1316592402064531695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/mTCwXsgdHKM/getting-facebook-connect-registration.html" title="Getting the Facebook connect registration widget signed_request in MVC" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/03/getting-facebook-connect-registration.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMGQ30_fSp7ImA9Wx9bEEg.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-1231613438158591727</id><published>2011-02-18T10:40:00.000-08:00</published><updated>2011-02-18T10:40:22.345-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-18T10:40:22.345-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pool" /><category scheme="http://www.blogger.com/atom/ns#" term="sports" /><title>Crazy Pool Trick Shots</title><content type="html">Apropos of nothing except that I like pool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe title="YouTube video player" width="520" height="323" src="http://www.youtube.com/embed/b91yIF-PEtI" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-1231613438158591727?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/46AAXqb6jzw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/1231613438158591727/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/02/crazy-pool-trick-shots.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1231613438158591727?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1231613438158591727?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/46AAXqb6jzw/crazy-pool-trick-shots.html" title="Crazy Pool Trick Shots" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/b91yIF-PEtI/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/02/crazy-pool-trick-shots.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8NRH87fSp7ImA9Wx9UGE0.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-8276695816714650536</id><published>2011-02-15T13:04:00.000-08:00</published><updated>2011-02-15T13:04:55.105-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-15T13:04:55.105-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="steve jobs" /><category scheme="http://www.blogger.com/atom/ns#" term="Apple" /><category scheme="http://www.blogger.com/atom/ns#" term="LoTR" /><title>Steve Jobs and the One Ring</title><content type="html">Developers: If you ask it of us, we will give you the One Ring.  &lt;br /&gt;
&lt;br /&gt;
Steve Jobs: You offer it to me freely? I do not deny that my heart has greatly desired this.  &lt;br /&gt;
&lt;br /&gt;
[starts to grow dark]  &lt;br /&gt;
&lt;br /&gt;
Steve Jobs: In the place of a Dark Lord you would have a Queen! Not dark but beautiful and terrible as the Morn! Treacherous as the Seas! Stronger than the foundations of the Earth! All shall love me and despair!   &lt;br /&gt;
&lt;br /&gt;
[takes the ring]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-8276695816714650536?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/0FqNoU-qqRs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/8276695816714650536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/02/steve-jobs-and-one-ring.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/8276695816714650536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/8276695816714650536?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/0FqNoU-qqRs/steve-jobs-and-one-ring.html" title="Steve Jobs and the One Ring" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/02/steve-jobs-and-one-ring.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQBQ38-cCp7ImA9Wx9WEU8.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-1472105261863186356</id><published>2011-01-15T13:52:00.000-08:00</published><updated>2011-01-15T13:52:32.158-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-15T13:52:32.158-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="IIS" /><category scheme="http://www.blogger.com/atom/ns#" term="Entity Code First" /><category scheme="http://www.blogger.com/atom/ns#" term="Sql" /><title>Entity Code First Login Failed for IIS APPPOOL</title><content type="html">Took a few searches to find this one, but, while converting my database from the build in VS server to using IIS my connection string was failing on attempting to connect to the database, with an error message of:&lt;br /&gt;
&lt;br /&gt;
Cannot open database "[databasename]" requested by the login. The login failed.&lt;br /&gt;
Login failed for user 'IIS APPPOOL\[the site's apppool name]'.&lt;br /&gt;
&lt;br /&gt;
Long story short, in IIS 7.5 the AppPool is given serveral different identities: Local Service, Local System, Network Service and ApplicationPoolIdentity (the default). You can find this in &lt;br /&gt;
&lt;br /&gt;
IIS Manager : Application Pools : Right click on the app pool for your site : Advanced Settings : Process Model : Identity : Select from the ... button&lt;br /&gt;
&lt;br /&gt;
In my case, network service has permissions to hit the database but the new ApplicationPoolIdentity did not. Either change the App pool identity or give ApplicationPoolIdentity permissions.&lt;br /&gt;
&lt;br /&gt;
Problem solved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-1472105261863186356?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/cBUYXCZTF9w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/1472105261863186356/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/01/entity-code-first-login-failed-for-iis.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1472105261863186356?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1472105261863186356?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/cBUYXCZTF9w/entity-code-first-login-failed-for-iis.html" title="Entity Code First Login Failed for IIS APPPOOL" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/01/entity-code-first-login-failed-for-iis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YHQ3s_cCp7ImA9Wx9XE0g.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-3017377481150661429</id><published>2011-01-06T13:58:00.000-08:00</published><updated>2011-01-06T13:58:52.548-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-06T13:58:52.548-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="openid" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="oauth" /><title>Facebook OAuth and MVC</title><content type="html">&lt;p&gt;Website registration bugs me. Every time I touch it I feel like I'm reinventing something. Although there are some nice account management providers that come with default projects (I'm using MVC 3 for the examples below), there are no default providers for OpenId and now, more importantly, Facebook OAuth.&lt;/p&gt;&lt;p&gt;You can read all about the many &amp;lt;a href="&lt;a href="http://www.codinghorror.com/blog/2010/11/your-internet-drivers-license.html&amp;quot;"&gt;http://www.codinghorror.com/blog/2010/11/your-internet-drivers-license.html"&lt;/a&gt;&amp;gt;discussions&amp;lt;/a&amp;gt; on the topic, but I'm convinced. Sort of. Here is the problem I have. I just don't trust anyone. I don't trust them to be always available, I don't trust them to not monkey around with their authorization schemes, or to simply stop offering them, or to change what data you can associate with a user logged in under their authorization code.&lt;/p&gt;&lt;p&gt;So what I have done, usually, is to allow users to log on either by creating a local account which I maintain, or login through OpenId or Facebook but then creating an associated local account. Should Facebook go down, or become untenable forwhatever reason, for example, I still have a local user account that I could verify by various means and then open back up as a purely local account. &lt;/p&gt;&lt;p&gt;So, when a user logs in from FB, for example, I create a local username (and autogenerate a password), save all the personalization data I'm allowed, and associate all local content with my local user. I'm just authenticating via FB.&lt;/p&gt;&lt;p&gt;In my case, I dont' want to rewrite much at all, don't want to mess with the database structure you get from aspnet_regsql (though this db feels crusty and in need of updating).&lt;/p&gt;&lt;p&gt;So I have a couple of issues:&lt;br /&gt;
a) username: When registering locally the user can create their own username. With OpenId it can come back with a usernam that is all over the map (email address, etc.) and FB gives you a numerical Id. So, at a minium I need a 'display name' of some kind so I don't have to use the username to know them. This requires some additional fields but not too onerous. &lt;/p&gt;&lt;p&gt;Also, I need to avoid username duplication, and I want some sense of where the username is being generated. So in my case, currently I'm just appending fb_ to facebook accounts, oid_ to OpenId accounts, and excluding those as options for locally created usernames.&lt;/p&gt;&lt;p&gt;You could do some of this using some of the Facebook C# SDKs out there. But, at least on my examination the ones I looked at didn't do the specific login scenario I'm looking for. So, I rolled my own. I might still use them for the rest of mu interaction with Facebook.&lt;/p&gt;&lt;p&gt;So here, is my code. I'm sure I'll update this further:&lt;/p&gt;&lt;p&gt;First, in my Web.config file I add three app settings:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;="FacebookAppId"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="[YOUR FACEBOOK APP ID]"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;="ValidateOAuthAgainstLocalStore"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="[TRUE / FALSE"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;="FacebookNewAccountFormatString"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="fb__{0}"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;If you want to validate the user against your local database (as I do), then make ValidateOAuthAgainstLocalStore value="true", otherwise "false" will allow you to make them an authenticated user. The FacebookNewAccountFormatString appends fb_ to the new local user account created.&lt;/p&gt;&lt;p&gt;Here is the _LogOnFacebookPartial.cshtml code:&lt;br /&gt;
&lt;pre class="csharpcode"&gt;@using System.Configuration;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="fb-root"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

@* To Make FB Synchronous use this code...
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="http://connect.facebook.net/en_US/all.js"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &amp;lt;script&amp;gt; 
        FB.init({appId: @ConfigurationManager.AppSettings[&lt;span class="str"&gt;"FacebookAppId"&lt;/span&gt;], cookie: &lt;span class="kwrd"&gt;true&lt;/span&gt;,status: &lt;span class="kwrd"&gt;true&lt;/span&gt;, xfbml: &lt;span class="kwrd"&gt;true&lt;/span&gt;});
        FB.Event.subscribe(&lt;span class="str"&gt;'auth.sessionChange'&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (response) {&lt;span class="kwrd"&gt;if&lt;/span&gt; (response.session) {login();} &lt;span class="kwrd"&gt;else&lt;/span&gt; {logout();}});
        FB.api(&lt;span class="str"&gt;'/me'&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (user) {&lt;span class="kwrd"&gt;if&lt;/span&gt; (user != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; user.id != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {&lt;span class="kwrd"&gt;var&lt;/span&gt; image = document.getElementById(&lt;span class="str"&gt;'image'&lt;/span&gt;);&lt;span class="kwrd"&gt;if&lt;/span&gt; (image != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {image.src = &lt;span class="str"&gt;'http://graph.facebook.com/'&lt;/span&gt; + user.id + &lt;span class="str"&gt;'/picture'&lt;/span&gt;;&lt;span class="kwrd"&gt;var&lt;/span&gt; name = document.getElementById(&lt;span class="str"&gt;'name'&lt;/span&gt;);name.innerHTML = user.name}}});
...*@

@* Aysnc FB code &lt;span class="kwrd"&gt;is&lt;/span&gt; from here..._____________________________________________________________________________________ *@ 
&amp;lt;script&amp;gt;
    window.fbAsyncInit = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {
        FB.init({
            appId: @ConfigurationManager.AppSettings[&lt;span class="str"&gt;"FacebookAppId"&lt;/span&gt;], cookie: &lt;span class="kwrd"&gt;true&lt;/span&gt;,
            status: &lt;span class="kwrd"&gt;true&lt;/span&gt;, xfbml: &lt;span class="kwrd"&gt;true&lt;/span&gt;
        });
        FB.Event.subscribe(&lt;span class="str"&gt;'auth.sessionChange'&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (response) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (response.session) {
                login();
            } &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                logout();
            }

        });
        FB.api(&lt;span class="str"&gt;'/me'&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (user) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (user != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; user.id != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                &lt;span class="kwrd"&gt;var&lt;/span&gt; image = document.getElementById(&lt;span class="str"&gt;'image'&lt;/span&gt;);
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (image != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                    image.src = &lt;span class="str"&gt;'http://graph.facebook.com/'&lt;/span&gt; + user.id + &lt;span class="str"&gt;'/picture'&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;var&lt;/span&gt; name = document.getElementById(&lt;span class="str"&gt;'name'&lt;/span&gt;);
                    name.innerHTML = user.name
                }
            }
        });
    };
    (&lt;span class="kwrd"&gt;function&lt;/span&gt;() {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; e = document.createElement(&lt;span class="str"&gt;'script'&lt;/span&gt;); e.async = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
        e.src = document.location.protocol +
        &lt;span class="str"&gt;'//connect.facebook.net/en_US/all.js'&lt;/span&gt;;
        document.getElementById(&lt;span class="str"&gt;'fb-root'&lt;/span&gt;).appendChild(e);
    }());
   @* ...to here___________________________________________________________________________________________________ *@
    
    &lt;span class="kwrd"&gt;function&lt;/span&gt; login() {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; url = &lt;span class="str"&gt;"/account/facebooklogon"&lt;/span&gt;;
        $.post(url, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (data) {
            window.location = window.location.href.toString();
        });
    }

    &lt;span class="kwrd"&gt;function&lt;/span&gt; logout() {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; url = &lt;span class="str"&gt;"/account/logoff"&lt;/span&gt;;
        $.post(url, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;function&lt;/span&gt; (data) {
            window.location = window.location.href.toString();
        });
    }
        
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

@if (Request.IsAuthenticated) {
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;text&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;align&lt;/span&gt;&lt;span class="kwrd"&gt;="center"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="image"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="name"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;fb:login-button&lt;/span&gt; &lt;span class="attr"&gt;autologoutlink&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;="small"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Log Out&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;fb:login-button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;text&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
}
else {
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;text&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;fb:login-button&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;="small"&lt;/span&gt; &lt;span class="attr"&gt;autologoutlink&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Login&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;fb:login-button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;text&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
} 

&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
I add one method to the AccountController:&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// **************************************&lt;/span&gt;
        &lt;span class="rem"&gt;// URL: /account/facbooklogon&lt;/span&gt;
        &lt;span class="rem"&gt;// **************************************&lt;/span&gt;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult FacebookLogOn() {
            MembershipService = &lt;span class="kwrd"&gt;new&lt;/span&gt; FacebookMembershipService();
            var fbms = MembershipService &lt;span class="kwrd"&gt;as&lt;/span&gt; FacebookMembershipService;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (MembershipService.ValidateOpenAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt;.Parse(ConfigurationManager.AppSettings[&lt;span class="str"&gt;"ValidateOpenAuthAgainstLocalStore"&lt;/span&gt;]))) {
                FormsService.SignIn(fbms.UserName, &lt;span class="kwrd"&gt;true&lt;/span&gt;);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; EmptyResult();
            }
            MembershipService.CreateUser(fbms.UserName, fbms.NewPassword, fbms.Email);
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; EmptyResult();
        }

&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
I add some RandomPassword creation code (I'll attach something below, but you can create your own or use their username or whatever, as long as you block their ability to login locally — i.e. w/o first authenticating via Facebook — using their Facebook Id).&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;I add the following dataannotation to the AccountModel class (that comes with the default MVC 3 (and other) projects:&lt;/p&gt;&lt;pre class="csharpcode"&gt;[RegularExpression(&lt;span class="str"&gt;@"^(?!fb__).+"&lt;/span&gt;, ErrorMessage = &lt;span class="str"&gt;"Sorry! You cannot start the user name with 'fb__'."&lt;/span&gt;)]&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;The partial view has my Facebook login code (I use async code but you can use sync code which I've included). I reference the webconfig AppSetting with my Facebook AppId. After login or logout it gets the user data from the cookie Facebook sends down, authenticates it, and authenticates/creates a local account if ValidateOAuthAgainstLocalStore value="true". &lt;/p&gt;&lt;p&gt;I add one method to the AccountModel interface IMembershipService. You could get by without this change, but then you would have to do some additional monkey business in the Controller to get the method, which I wanted to avoid... and I'm not worried about breaking any legacy code.&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateOAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt; validateAgainstLocalStore);&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;I add a not implemented method to AccountMembershipService:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateOAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt; validateAgainstLocalStore) {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; NotImplementedException();
        }&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;and I create a local FacebookUser class (don't use this much, so could actually get by without it, but I'm including it below for completeness, and I create a new FacebookMembershipService that inherits from IMembershipService. This is responsible for extracting the data from the cookie and then getting user info from Facebook and doing the local account authentication and creation. The full AccountModel code is below:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel.DataAnnotations;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Configuration;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Globalization;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Script.Serialization;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Security;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; FloatingFactory.AccountManagement.Models {

    &lt;span class="preproc"&gt;#region&lt;/span&gt; Models

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ChangePasswordModel {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"Current password"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; OldPassword { get; set; }

        [Required]
        [ValidatePasswordLength]
        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"New password"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"Confirm new password"&lt;/span&gt;)]
        [Compare(&lt;span class="str"&gt;"NewPassword"&lt;/span&gt;, ErrorMessage = &lt;span class="str"&gt;"The new password and confirmation password do not match."&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ConfirmPassword { get; set; }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; LogOnModel {
        [Required]
        [Display(Name = &lt;span class="str"&gt;"User name"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"Password"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Password { get; set; }

        [Display(Name = &lt;span class="str"&gt;"Remember me?"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; RememberMe { get; set; }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; RegisterModel {
        [Required]
        [Display(Name = &lt;span class="str"&gt;"User name"&lt;/span&gt;)]
        [RegularExpression(&lt;span class="str"&gt;@"^(?!fb__).+"&lt;/span&gt;, ErrorMessage = &lt;span class="str"&gt;"Sorry! You cannot start the user name with 'fb__'."&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; UserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = &lt;span class="str"&gt;"Email address"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Email { get; set; }

        [Required]
        [ValidatePasswordLength]
        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"Password"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = &lt;span class="str"&gt;"Confirm password"&lt;/span&gt;)]
        [Compare(&lt;span class="str"&gt;"Password"&lt;/span&gt;, ErrorMessage = &lt;span class="str"&gt;"The password and confirmation password do not match."&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ConfirmPassword { get; set; }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; FacebookUser {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; id { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; name { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; first_name { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; last_name { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; birthday { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; email { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; gender { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; link { get; set; }
    }
    &lt;span class="preproc"&gt;#endregion&lt;/span&gt;

    &lt;span class="preproc"&gt;#region&lt;/span&gt; Services
    &lt;span class="rem"&gt;// The FormsAuthentication type is sealed and contains static members, so it is difficult to&lt;/span&gt;
    &lt;span class="rem"&gt;// unit test code that calls its members. The interface and helper class below demonstrate&lt;/span&gt;
    &lt;span class="rem"&gt;// how to create an abstract wrapper around such a type in order to make the AccountController&lt;/span&gt;
    &lt;span class="rem"&gt;// code unit testable.&lt;/span&gt;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;enum&lt;/span&gt; LogonTypeIs {
        Facebook,
        OpenId
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; IMembershipService {
        &lt;span class="kwrd"&gt;int&lt;/span&gt; MinPasswordLength { get; }

        &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateOAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt; validateAgainstLocalStore);
        &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password);
        MembershipCreateStatus CreateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password, &lt;span class="kwrd"&gt;string&lt;/span&gt; email);
        &lt;span class="kwrd"&gt;bool&lt;/span&gt; ChangePassword(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; oldPassword, &lt;span class="kwrd"&gt;string&lt;/span&gt; newPassword);
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AccountMembershipService : IMembershipService {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; MembershipProvider _provider;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; AccountMembershipService()
            : &lt;span class="kwrd"&gt;this&lt;/span&gt;(&lt;span class="kwrd"&gt;null&lt;/span&gt;) {
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; AccountMembershipService(MembershipProvider provider) {
            _provider = provider ?? Membership.Provider;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; MinPasswordLength {
            get {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; _provider.MinRequiredPasswordLength;
            }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateOAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt; validateAgainstLocalStore) {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; NotImplementedException();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(userName)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"userName"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(password)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"password"&lt;/span&gt;);

            &lt;span class="kwrd"&gt;return&lt;/span&gt; _provider.ValidateUser(userName, password);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; MembershipCreateStatus CreateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password, &lt;span class="kwrd"&gt;string&lt;/span&gt; email) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(userName)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"userName"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(password)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"password"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(email)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"email"&lt;/span&gt;);

            MembershipCreateStatus status;
            _provider.CreateUser(userName, password, email, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;out&lt;/span&gt; status);
            &lt;span class="kwrd"&gt;return&lt;/span&gt; status;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ChangePassword(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; oldPassword, &lt;span class="kwrd"&gt;string&lt;/span&gt; newPassword) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(userName)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"userName"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(oldPassword)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"oldPassword"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(newPassword)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"newPassword"&lt;/span&gt;);

            &lt;span class="rem"&gt;// The underlying ChangePassword() will throw an exception rather&lt;/span&gt;
            &lt;span class="rem"&gt;// than return false in certain failure scenarios.&lt;/span&gt;
            &lt;span class="kwrd"&gt;try&lt;/span&gt; {
                var currentUser = _provider.GetUser(userName, &lt;span class="kwrd"&gt;true&lt;/span&gt; &lt;span class="rem"&gt;/* userIsOnline */&lt;/span&gt;);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; currentUser.ChangePassword(oldPassword, newPassword);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (ArgumentException) {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (MembershipPasswordException) {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }
        }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; FacebookMembershipService : IMembershipService {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; MembershipProvider _provider;

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LogonRequestUrl = &lt;span class="str"&gt;"https://graph.facebook.com/me?access_token={0}"&lt;/span&gt;;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; FacebookUser FbUser { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; UserName { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; FbUser.id; } }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Email { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; FbUser.email; } }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; NewPassword { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; RandomPassword.Generate(MinPasswordLength, 9); } }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; NewAnswer { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; RandomPassword.Generate(MinPasswordLength, 9); } }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; FacebookMembershipService() {
            _provider = Membership.Provider;
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; FacebookUser GetFacebookUserFromCookie() {
            var context = HttpContext.Current;
            var cookieName = String.Format(&lt;span class="str"&gt;"fbs_{0}"&lt;/span&gt;, ConfigurationManager.AppSettings[&lt;span class="str"&gt;"FacebookAppId"&lt;/span&gt;]);
            var cook = context.Request.Cookies[cookieName];
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (cook == &lt;span class="kwrd"&gt;null&lt;/span&gt;) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Exception(&lt;span class="str"&gt;"No cookie!"&lt;/span&gt;);

            var accessToken = cook[&lt;span class="str"&gt;"\"access_token"&lt;/span&gt;];
            context.Session.Add(&lt;span class="str"&gt;"facebook_access_token"&lt;/span&gt;, accessToken);
            context.Session.Add(&lt;span class="str"&gt;"hasfacebooksession"&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;);

            var requestUrl = String.Format(LogonRequestUrl, accessToken);
            var webRequest = WebRequest.Create(requestUrl);

            FacebookUser user = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            &lt;span class="kwrd"&gt;using&lt;/span&gt; (var response = (HttpWebResponse)webRequest.GetResponse()) {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (response != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                    &lt;span class="kwrd"&gt;using&lt;/span&gt; (var dataStream = response.GetResponseStream()) {
                        &lt;span class="kwrd"&gt;if&lt;/span&gt; (dataStream != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                            &lt;span class="kwrd"&gt;using&lt;/span&gt; (var reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(dataStream)) {
                                var jsonFromFacebook = reader.ReadToEnd();
                                var ser = &lt;span class="kwrd"&gt;new&lt;/span&gt; JavaScriptSerializer();
                                user = ser.Deserialize&amp;lt;FacebookUser&amp;gt;(jsonFromFacebook);
                            }
                        }
                    }
                }
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; user;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateOpenAuthUser(&lt;span class="kwrd"&gt;bool&lt;/span&gt; validateAgainstLocalStore) {
            FbUser = GetFacebookUserFromCookie();
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (validateAgainstLocalStore) {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (FbUser == &lt;span class="kwrd"&gt;null&lt;/span&gt; || String.IsNullOrWhiteSpace(FbUser.id)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Exception(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;);
                var user = _provider.GetUser(FbUser.id, &lt;span class="kwrd"&gt;true&lt;/span&gt;);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; user != &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; FbUser != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; !String.IsNullOrWhiteSpace(FbUser.id);

        }


        &lt;span class="kwrd"&gt;public&lt;/span&gt; MembershipCreateStatus CreateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password, &lt;span class="kwrd"&gt;string&lt;/span&gt; email) {
            MembershipCreateStatus status;
            _provider.CreateUser(userName, password, email, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;out&lt;/span&gt; status);
            &lt;span class="kwrd"&gt;return&lt;/span&gt; status;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ValidateUser(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; password) {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; NotImplementedException();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; MinPasswordLength {
            get {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; _provider.MinRequiredPasswordLength;
            }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ChangePassword(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;string&lt;/span&gt; oldPassword, &lt;span class="kwrd"&gt;string&lt;/span&gt; newPassword) {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; NotImplementedException();
        }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; IFormsAuthenticationService {
        &lt;span class="kwrd"&gt;void&lt;/span&gt; SignIn(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;bool&lt;/span&gt; createPersistentCookie);
        &lt;span class="kwrd"&gt;void&lt;/span&gt; SignOut();
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; FormsAuthenticationService : IFormsAuthenticationService {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SignIn(&lt;span class="kwrd"&gt;string&lt;/span&gt; userName, &lt;span class="kwrd"&gt;bool&lt;/span&gt; createPersistentCookie) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(userName)) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"Value cannot be null or empty."&lt;/span&gt;, &lt;span class="str"&gt;"userName"&lt;/span&gt;);

            FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SignOut() {
            FormsAuthentication.SignOut();
        }
    }
    &lt;span class="preproc"&gt;#endregion&lt;/span&gt;

    &lt;span class="preproc"&gt;#region&lt;/span&gt; Validation
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AccountValidation {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ErrorCodeToString(MembershipCreateStatus createStatus) {
            &lt;span class="rem"&gt;// See http://go.microsoft.com/fwlink/?LinkID=177550 for&lt;/span&gt;
            &lt;span class="rem"&gt;// a full list of status codes.&lt;/span&gt;
            &lt;span class="kwrd"&gt;switch&lt;/span&gt; (createStatus) {
                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.DuplicateUserName:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"Username already exists. Please enter a different user name."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.DuplicateEmail:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"A username for that e-mail address already exists. Please enter a different e-mail address."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.InvalidPassword:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The password provided is invalid. Please enter a valid password value."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.InvalidEmail:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The e-mail address provided is invalid. Please check the value and try again."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.InvalidAnswer:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The password retrieval answer provided is invalid. Please check the value and try again."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.InvalidQuestion:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The password retrieval question provided is invalid. Please check the value and try again."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.InvalidUserName:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The user name provided is invalid. Please check the value and try again."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.ProviderError:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;case&lt;/span&gt; MembershipCreateStatus.UserRejected:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator."&lt;/span&gt;;

                &lt;span class="kwrd"&gt;default&lt;/span&gt;:
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator."&lt;/span&gt;;
            }
        }
    }

    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = &lt;span class="kwrd"&gt;false&lt;/span&gt;, Inherited = &lt;span class="kwrd"&gt;true&lt;/span&gt;)]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;sealed&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ValidatePasswordLengthAttribute : ValidationAttribute, IClientValidatable {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _defaultErrorMessage = &lt;span class="str"&gt;"'{0}' must be at least {1} characters long."&lt;/span&gt;;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; _minCharacters = Membership.Provider.MinRequiredPasswordLength;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; ValidatePasswordLengthAttribute()
            : &lt;span class="kwrd"&gt;base&lt;/span&gt;(_defaultErrorMessage) {
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; FormatErrorMessage(&lt;span class="kwrd"&gt;string&lt;/span&gt; name) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; String.Format(CultureInfo.CurrentCulture, ErrorMessageString,
                name, _minCharacters);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsValid(&lt;span class="kwrd"&gt;object&lt;/span&gt; &lt;span class="kwrd"&gt;value&lt;/span&gt;) {
            &lt;span class="kwrd"&gt;string&lt;/span&gt; valueAsString = &lt;span class="kwrd"&gt;value&lt;/span&gt; &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; (valueAsString != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; valueAsString.Length &amp;gt;= _minCharacters);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; IEnumerable&amp;lt;ModelClientValidationRule&amp;gt; GetClientValidationRules(ModelMetadata metadata, ControllerContext context) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt;[]{
                &lt;span class="kwrd"&gt;new&lt;/span&gt; ModelClientValidationStringLengthRule(FormatErrorMessage(metadata.GetDisplayName()), _minCharacters, &lt;span class="kwrd"&gt;int&lt;/span&gt;.MaxValue)
            };
        }
    }
    &lt;span class="preproc"&gt;#endregion&lt;/span&gt;

}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;And here is a random password generator from Obviex:&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;///////////////////////////////////////////////////////////////////////////////&lt;/span&gt;
    &lt;span class="rem"&gt;// SAMPLE: Generates random password, which complies with the strong password&lt;/span&gt;
    &lt;span class="rem"&gt;//         rules and does not contain ambiguous characters.&lt;/span&gt;
    &lt;span class="rem"&gt;//&lt;/span&gt;
    &lt;span class="rem"&gt;// To run this sample, create a new Visual C# project using the Console&lt;/span&gt;
    &lt;span class="rem"&gt;// Application template and replace the contents of the Class1.cs file with&lt;/span&gt;
    &lt;span class="rem"&gt;// the code below.&lt;/span&gt;
    &lt;span class="rem"&gt;//&lt;/span&gt;
    &lt;span class="rem"&gt;// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,&lt;/span&gt;
    &lt;span class="rem"&gt;// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED&lt;/span&gt;
    &lt;span class="rem"&gt;// WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.&lt;/span&gt;
    &lt;span class="rem"&gt;// &lt;/span&gt;
    &lt;span class="rem"&gt;// Copyright (C) 2004 Obviex(TM). All rights reserved.&lt;/span&gt;
    &lt;span class="rem"&gt;// &lt;/span&gt;


    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span class="rem"&gt;/// This class can generate random passwords, which do not include ambiguous &lt;/span&gt;
    &lt;span class="rem"&gt;/// characters, such as I, l, and 1. The generated password will be made of&lt;/span&gt;
    &lt;span class="rem"&gt;/// 7-bit ASCII symbols. Every four characters will include one lower case&lt;/span&gt;
    &lt;span class="rem"&gt;/// character, one upper case character, one number, and one special symbol&lt;/span&gt;
    &lt;span class="rem"&gt;/// (such as '%') in a random order. The password will always start with an&lt;/span&gt;
    &lt;span class="rem"&gt;/// alpha-numeric character; it will not start with a special symbol (we do&lt;/span&gt;
    &lt;span class="rem"&gt;/// this because some back-end systems do not like certain special&lt;/span&gt;
    &lt;span class="rem"&gt;/// characters in the first position).&lt;/span&gt;
    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; RandomPassword {
        &lt;span class="rem"&gt;// Define default min and max password lengths.&lt;/span&gt;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; DefaultMinPasswordLength = 8;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; DefaultMaxPasswordLength = 10;

        &lt;span class="rem"&gt;// Define supported password characters divided into groups.&lt;/span&gt;
        &lt;span class="rem"&gt;// You can add (or remove) characters to (from) these groups.&lt;/span&gt;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; PasswordCharsLcase = &lt;span class="str"&gt;"abcdefgijkmnopqrstwxyz"&lt;/span&gt;;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; PasswordCharsUcase = &lt;span class="str"&gt;"ABCDEFGHJKLMNPQRSTWXYZ"&lt;/span&gt;;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; PasswordCharsNumeric = &lt;span class="str"&gt;"23456789"&lt;/span&gt;;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; PasswordCharsSpecial = &lt;span class="str"&gt;"*$-+?_&amp;amp;=!%{}/"&lt;/span&gt;;

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Generates a random password.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Randomly generated password.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// The length of the generated password will be determined at&lt;/span&gt;
        &lt;span class="rem"&gt;/// random. It will be no shorter than the minimum default and&lt;/span&gt;
        &lt;span class="rem"&gt;/// no longer than maximum default.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/remarks&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Generate() {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; Generate(DefaultMinPasswordLength,
                            DefaultMaxPasswordLength);
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Generates a random password of the exact length.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name="length"&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Exact password length.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Randomly generated password.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Generate(&lt;span class="kwrd"&gt;int&lt;/span&gt; length) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; Generate(length, length);
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Generates a random password.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name="minLength"&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Minimum password length.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name="maxLength"&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Maximum password length.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Randomly generated password.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// The length of the generated password will be determined at&lt;/span&gt;
        &lt;span class="rem"&gt;/// random and it will fall with the range determined by the&lt;/span&gt;
        &lt;span class="rem"&gt;/// function parameters.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/remarks&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Generate(&lt;span class="kwrd"&gt;int&lt;/span&gt; minLength,
                                      &lt;span class="kwrd"&gt;int&lt;/span&gt; maxLength) {
            &lt;span class="rem"&gt;// Make sure that input parameters are valid.&lt;/span&gt;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (minLength &amp;lt;= 0 || maxLength &amp;lt;= 0 || minLength &amp;gt; maxLength)
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;

            &lt;span class="rem"&gt;// Create a local array containing supported password characters&lt;/span&gt;
            &lt;span class="rem"&gt;// grouped by types. You can remove character groups from this&lt;/span&gt;
            &lt;span class="rem"&gt;// array, but doing so will weaken the password strength.&lt;/span&gt;
            var charGroups = &lt;span class="kwrd"&gt;new&lt;/span&gt;[] 
        {
            PasswordCharsLcase.ToCharArray(),
            PasswordCharsUcase.ToCharArray(),
            PasswordCharsNumeric.ToCharArray(),
            PasswordCharsSpecial.ToCharArray()
        };

            &lt;span class="rem"&gt;// Use this array to track the number of unused characters in each&lt;/span&gt;
            &lt;span class="rem"&gt;// character group.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt;[] charsLeftInGroup = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[charGroups.Length];

            &lt;span class="rem"&gt;// Initially, all characters in each group are not used.&lt;/span&gt;
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; charsLeftInGroup.Length; i++)
                charsLeftInGroup[i] = charGroups[i].Length;

            &lt;span class="rem"&gt;// Use this array to track (iterate through) unused character groups.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt;[] leftGroupsOrder = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[charGroups.Length];

            &lt;span class="rem"&gt;// Initially, all character groups are not used.&lt;/span&gt;
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; leftGroupsOrder.Length; i++)
                leftGroupsOrder[i] = i;

            &lt;span class="rem"&gt;// Because we cannot use the default randomizer, which is based on the&lt;/span&gt;
            &lt;span class="rem"&gt;// current time (it will produce the same "random" number within a&lt;/span&gt;
            &lt;span class="rem"&gt;// second), we will use a random number generator to seed the&lt;/span&gt;
            &lt;span class="rem"&gt;// randomizer.&lt;/span&gt;

            &lt;span class="rem"&gt;// Use a 4-byte array to fill it with random bytes and convert it then&lt;/span&gt;
            &lt;span class="rem"&gt;// to an integer value.&lt;/span&gt;
            var randomBytes = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;byte&lt;/span&gt;[4];

            &lt;span class="rem"&gt;// Generate 4 random bytes.&lt;/span&gt;
            var rng = &lt;span class="kwrd"&gt;new&lt;/span&gt; RNGCryptoServiceProvider();
            rng.GetBytes(randomBytes);

            &lt;span class="rem"&gt;// Convert 4 bytes into a 32-bit integer value.&lt;/span&gt;
            var seed = (randomBytes[0] &amp;amp; 0x7f) &amp;lt;&amp;lt; 24 |
                        randomBytes[1] &amp;lt;&amp;lt; 16 |
                        randomBytes[2] &amp;lt;&amp;lt; 8 |
                        randomBytes[3];

            &lt;span class="rem"&gt;// Now, this is real randomization.&lt;/span&gt;
            var random = &lt;span class="kwrd"&gt;new&lt;/span&gt; Random(seed);

            &lt;span class="rem"&gt;// This array will hold password characters.&lt;/span&gt;
            &lt;span class="kwrd"&gt;char&lt;/span&gt;[] password;

            &lt;span class="rem"&gt;// Allocate appropriate memory for the password.&lt;/span&gt;
            password = minLength &amp;lt; maxLength
                ? &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;char&lt;/span&gt;[random.Next(minLength, maxLength + 1)]
                : &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;char&lt;/span&gt;[minLength];

            &lt;span class="rem"&gt;// Index of the next character to be added to password.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt; nextCharIdx;

            &lt;span class="rem"&gt;// Index of the next character group to be processed.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt; nextGroupIdx;

            &lt;span class="rem"&gt;// Index which will be used to track not processed character groups.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt; nextLeftGroupsOrderIdx;

            &lt;span class="rem"&gt;// Index of the last non-processed character in a group.&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt; lastCharIdx;

            &lt;span class="rem"&gt;// Index of the last non-processed group.&lt;/span&gt;
            var lastLeftGroupsOrderIdx = leftGroupsOrder.Length - 1;

            &lt;span class="rem"&gt;// Generate password characters one at a time.&lt;/span&gt;
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (var i = 0; i &amp;lt; password.Length; i++) {
                &lt;span class="rem"&gt;// If only one character group remained unprocessed, process it;&lt;/span&gt;
                &lt;span class="rem"&gt;// otherwise, pick a random character group from the unprocessed&lt;/span&gt;
                &lt;span class="rem"&gt;// group list. To allow a special character to appear in the&lt;/span&gt;
                &lt;span class="rem"&gt;// first position, increment the second parameter of the Next&lt;/span&gt;
                &lt;span class="rem"&gt;// function call by one, i.e. lastLeftGroupsOrderIdx + 1.&lt;/span&gt;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (lastLeftGroupsOrderIdx == 0)
                    nextLeftGroupsOrderIdx = 0;
                &lt;span class="kwrd"&gt;else&lt;/span&gt;
                    nextLeftGroupsOrderIdx = random.Next(0,
                                                         lastLeftGroupsOrderIdx);

                &lt;span class="rem"&gt;// Get the actual index of the character group, from which we will&lt;/span&gt;
                &lt;span class="rem"&gt;// pick the next character.&lt;/span&gt;
                nextGroupIdx = leftGroupsOrder[nextLeftGroupsOrderIdx];

                &lt;span class="rem"&gt;// Get the index of the last unprocessed characters in this group.&lt;/span&gt;
                lastCharIdx = charsLeftInGroup[nextGroupIdx] - 1;

                &lt;span class="rem"&gt;// If only one unprocessed character is left, pick it; otherwise,&lt;/span&gt;
                &lt;span class="rem"&gt;// get a random character from the unused character list.&lt;/span&gt;
                nextCharIdx = lastCharIdx == 0
                    ? 0
                    : random.Next(0, lastCharIdx + 1);

                &lt;span class="rem"&gt;// Add this character to the password.&lt;/span&gt;
                password[i] = charGroups[nextGroupIdx][nextCharIdx];

                &lt;span class="rem"&gt;// If we processed the last character in this group, start over.&lt;/span&gt;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (lastCharIdx == 0)
                    charsLeftInGroup[nextGroupIdx] =
                                              charGroups[nextGroupIdx].Length;
                &lt;span class="rem"&gt;// There are more unprocessed characters left.&lt;/span&gt;
                &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                    &lt;span class="rem"&gt;// Swap processed character with the last unprocessed character&lt;/span&gt;
                    &lt;span class="rem"&gt;// so that we don't pick it until we process all characters in&lt;/span&gt;
                    &lt;span class="rem"&gt;// this group.&lt;/span&gt;
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (lastCharIdx != nextCharIdx) {
                        var temp = charGroups[nextGroupIdx][lastCharIdx];
                        charGroups[nextGroupIdx][lastCharIdx] =
                                    charGroups[nextGroupIdx][nextCharIdx];
                        charGroups[nextGroupIdx][nextCharIdx] = temp;
                    }
                    &lt;span class="rem"&gt;// Decrement the number of unprocessed characters in&lt;/span&gt;
                    &lt;span class="rem"&gt;// this group.&lt;/span&gt;
                    charsLeftInGroup[nextGroupIdx]--;
                }

                &lt;span class="rem"&gt;// If we processed the last group, start all over.&lt;/span&gt;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (lastLeftGroupsOrderIdx == 0)
                    lastLeftGroupsOrderIdx = leftGroupsOrder.Length - 1;
                &lt;span class="rem"&gt;// There are more unprocessed groups left.&lt;/span&gt;
                &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                    &lt;span class="rem"&gt;// Swap processed group with the last unprocessed group&lt;/span&gt;
                    &lt;span class="rem"&gt;// so that we don't pick it until we process all groups.&lt;/span&gt;
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (lastLeftGroupsOrderIdx != nextLeftGroupsOrderIdx) {
                        var temp = leftGroupsOrder[lastLeftGroupsOrderIdx];
                        leftGroupsOrder[lastLeftGroupsOrderIdx] =
                                    leftGroupsOrder[nextLeftGroupsOrderIdx];
                        leftGroupsOrder[nextLeftGroupsOrderIdx] = temp;
                    }
                    &lt;span class="rem"&gt;// Decrement the number of unprocessed groups.&lt;/span&gt;
                    lastLeftGroupsOrderIdx--;
                }
            }

            &lt;span class="rem"&gt;// Convert password characters into a string and return the result.&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;(password);
        }
    }
}
&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, "Courier New", courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-3017377481150661429?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/sViiDh99ta8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/3017377481150661429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2011/01/facebook-oauth-and-mvc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3017377481150661429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3017377481150661429?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/sViiDh99ta8/facebook-oauth-and-mvc.html" title="Facebook OAuth and MVC" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2011/01/facebook-oauth-and-mvc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UBRXw6fip7ImA9Wx9RFk4.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-4589738707505879692</id><published>2010-12-17T16:11:00.000-08:00</published><updated>2010-12-17T16:14:14.216-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-17T16:14:14.216-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="apps" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><title>SlightWords, my windows phone 7 app on track to hit one million download...</title><content type="html">...sometime around the year 2260. &lt;br /&gt;
&lt;br /&gt;
Oh, I'm sorry. Was that a misleading headline? Sure it seems like a long time from now — if you are a Monarch Butterfly or a human. But I'm in this for the long haul. By the time the Sun becomes a red giant and swallows the earth I will have hit something like 40 billion downloads, at the current rate. And I'll take that to the bank, thank you very much.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_o-19VehaHWo/TQv8fS8DXPI/AAAAAAAADts/-oljcOlk0Cs/s1600/ScreenShot.png" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"&gt;&lt;img border="0" height="320" width="192" src="http://2.bp.blogspot.com/_o-19VehaHWo/TQv8fS8DXPI/AAAAAAAADts/-oljcOlk0Cs/s320/ScreenShot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-4589738707505879692?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/yLVPFmiKMSE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/4589738707505879692/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/12/slightwords-my-windows-phone-7-app-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4589738707505879692?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4589738707505879692?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/yLVPFmiKMSE/slightwords-my-windows-phone-7-app-on.html" title="SlightWords, my windows phone 7 app on track to hit one million download..." /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_o-19VehaHWo/TQv8fS8DXPI/AAAAAAAADts/-oljcOlk0Cs/s72-c/ScreenShot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/12/slightwords-my-windows-phone-7-app-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDQnc7cCp7ImA9Wx5WGUo.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-3318385121363578502</id><published>2010-10-01T15:02:00.000-07:00</published><updated>2010-10-01T15:02:53.908-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-01T15:02:53.908-07:00</app:edited><title>Windows Phone 7</title><content type="html">&lt;p&gt;Windows Phone 7 is launching soon. And I've built an app. But I don't have a phone. But if I stick this ad on my site, apparently they might, if I'm lucky, give me one. So here it is. &lt;/p&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.msdnevents.com/wp7devlaunch/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" px="true" src="http://4.bp.blogspot.com/_o-19VehaHWo/TKZaE-2h-XI/AAAAAAAADtM/sgqWffzwNYU/s1600/wp7_signature_banner_sm.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-3318385121363578502?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/S7PK9aAJ3a4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/3318385121363578502/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/10/windows-phone-7.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3318385121363578502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3318385121363578502?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/S7PK9aAJ3a4/windows-phone-7.html" title="Windows Phone 7" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_o-19VehaHWo/TKZaE-2h-XI/AAAAAAAADtM/sgqWffzwNYU/s72-c/wp7_signature_banner_sm.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/10/windows-phone-7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQERnY5eCp7ImA9Wx5QGUQ.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-2616936934172246814</id><published>2010-09-08T17:31:00.000-07:00</published><updated>2010-09-08T17:31:47.820-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-08T17:31:47.820-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="online education" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><title>Studying study habits</title><content type="html">The New York Times, reports on &lt;a href="http://www.nytimes.com/2010/09/07/health/views/07mind.html"&gt;new findings on study habits&lt;/a&gt;. This seems to repeat and support the research of&amp;nbsp;&lt;a href="http://www.wired.com/medtech/health/magazine/16-05/ff_wozniak"&gt;Piotr Wozniak's&lt;/a&gt; reported in Wired a couple years ago. Spaced repetition seems to be the key. Learn it. Learn it again a short time later. Then keep stretching out the periods between relearning the same thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-2616936934172246814?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/fDGNS6aeCcA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/2616936934172246814/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/09/studying-study-habits.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2616936934172246814?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2616936934172246814?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/fDGNS6aeCcA/studying-study-habits.html" title="Studying study habits" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/09/studying-study-habits.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcBQHc5fSp7ImA9WxFbFEk.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-6804048938219395797</id><published>2010-07-06T12:20:00.000-07:00</published><updated>2010-07-06T12:20:51.925-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-06T12:20:51.925-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="happiness" /><category scheme="http://www.blogger.com/atom/ns#" term="parenting" /><category scheme="http://www.blogger.com/atom/ns#" term="children" /><title>Why parents hate parenting and other failures to understand human nature</title><content type="html">&lt;p&gt;A recent article in New York magazine on parenting, &lt;a href="http://nymag.com/print/?/news/features/67024/"&gt;All Joy and No Fun&lt;/a&gt; spends a lot of time on the research about how parenting is not particularly fun. The transition of children of modern from an economic asset to an accessory "Economically worthless but emotionally priceless,” says one Princeton Sociologist. “They’re a huge source of joy, but they turn every other source of joy to shit,” says some psychologist.&lt;/p&gt;&lt;blockquote&gt;“There’s all this buildup—as soon as I get this done, I’m going to have a baby, and it’s going to be a great reward!” says Ada Calhoun, the author of Instinctive Parenting and founding editor-in-chief of Babble, the online parenting site. “And then you’re like, ‘Wait, this is my reward? This nineteen-year grind?&lt;/blockquote&gt;&lt;p&gt;Later they discuss how happiness (pleasure) and reward are not the same, and spend time separating the two. In these scenarios parenting and having kids comes out looking better. Women with kids are less depressed. People who don't have kids often regret it.&lt;/p&gt;&lt;blockquote&gt;In the quadrant of things people found both pleasurable and rewarding, people chose volunteering first, prayer second, and time with children third (though time with children barely made it into the “pleasurable” category).&lt;/blockquote&gt;&lt;p&gt;Self reporting is always suspicious to me, what people say versus what they do is often far more revealing about what people actually value. More importantly, this academic drive to reduce every emotion to "happiness" — really let's just call it "utility", as the reductio ad absurdum of all human drives by economists, those other social 'scientists', prefer — is silly. The 'self' has a complex set of overlapping drives and agendas. It changes over time and by situation. Attempting to reduce all those agencies into a single overarching value of happiness misrepresents what we are.&lt;/p&gt;&lt;p&gt;But, have no fear. If the desire to have children fades for some, only those for whom the desire remains strong will procreate and eventually all will be right with the world. And if it fades away for all, then our species will fade as well, and once again, all will be right with the world.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-6804048938219395797?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/-PujtBmIebo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/6804048938219395797/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/07/why-parents-hate-parenting-and-other.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/6804048938219395797?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/6804048938219395797?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/-PujtBmIebo/why-parents-hate-parenting-and-other.html" title="Why parents hate parenting and other failures to understand human nature" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/07/why-parents-hate-parenting-and-other.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQDQX84eip7ImA9WxFbEU4.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-571215287906176002</id><published>2010-07-02T21:46:00.000-07:00</published><updated>2010-07-02T21:46:10.132-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-02T21:46:10.132-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gameinsects. social games" /><category scheme="http://www.blogger.com/atom/ns#" term="social gaming" /><category scheme="http://www.blogger.com/atom/ns#" term="web" /><category scheme="http://www.blogger.com/atom/ns#" term="gaming" /><title>Our new social gaming site, gameinsects.com, because we're so social</title><content type="html">Yes. we are a veritable socialite, everybody's friend, life of the party kind of person. And so, we have built, along with an excellent designer and our esteemed nose to the grindstone, foot to the fire boss in all but name, a new site. Still in beta, still rough around the edges, not quite right on all browsers / versions, not quite ready for prime time, spit when you say its name, but we are pretty happy with the progress.&lt;br /&gt;
&lt;br /&gt;
You can find &lt;a href="http://www.gameinsects.com/"&gt;gameinsects&lt;/a&gt; here. It is — whatever it is, not really quite sure yet — going to be big. Or not. Probably not, But we think it looks good anyway. But not too good. Please no lightning. Or negative comments. It's just a baby.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-571215287906176002?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/JQMnyc7Ujbg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/571215287906176002/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/07/our-new-social-gaming-site.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/571215287906176002?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/571215287906176002?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/JQMnyc7Ujbg/our-new-social-gaming-site.html" title="Our new social gaming site, gameinsects.com, because we're so social" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/07/our-new-social-gaming-site.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ER3wycSp7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-6622005589907705423</id><published>2010-05-29T21:30:00.000-07:00</published><updated>2010-05-29T21:30:06.299-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-29T21:30:06.299-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="obama" /><category scheme="http://www.blogger.com/atom/ns#" term="humor" /><title>The Gulf Oil Spill...</title><content type="html">This Wouldn't Be Happening If Obama Were President&lt;a href="http://justoneminute.typepad.com/main/2010/05/this-wouldnt-be-happening-if-obama-were-president.html"&gt;!&lt;/a&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-6622005589907705423?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/jKSa2TRDY7I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/6622005589907705423/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/05/gulf-oil-spill.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/6622005589907705423?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/6622005589907705423?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/jKSa2TRDY7I/gulf-oil-spill.html" title="The Gulf Oil Spill..." /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/05/gulf-oil-spill.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUDQHs4cCp7ImA9WxFXFUU.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-3685483123153308324</id><published>2010-05-22T21:17:00.000-07:00</published><updated>2010-05-22T21:17:51.538-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-22T21:17:51.538-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="conservative bias" /><category scheme="http://www.blogger.com/atom/ns#" term="online education" /><category scheme="http://www.blogger.com/atom/ns#" term="fact checking" /><category scheme="http://www.blogger.com/atom/ns#" term="texas" /><category scheme="http://www.blogger.com/atom/ns#" term="liberal media bias" /><title>Pajama factchecker brigade 1, silly journalists 0</title><content type="html">This &lt;a href="http://www.washingtonpost.com/wp-dyn/content/article/2010/05/21/AR2010052104365.html?wprss=rss_nation"&gt;WaPo&lt;/a&gt;&amp;nbsp;article by Michael Birnbaum about the supposed conservative white wash of history being pushed on Texas schools was pretty devastatingly &lt;a href="http://althouse.blogspot.com/2010/05/if-youre-going-to-criticize-new-social.html"&gt;taken down&lt;/a&gt; by Ann Althouse and others. One more point for the pajama brigade. &lt;br /&gt;
&lt;br /&gt;
There may well be some disagreeable stuff in the education curriculum that was approved in Texas, but Birnbaum certainly didn't make the case. Instead he furthered a different view, something about&amp;nbsp;liberal media bias, blah, blah, blah. &lt;br /&gt;
&lt;br /&gt;
I wonder sometimes how many journalists have yet to discover this thing called the Internet. They should look it up on LexisNexis. They may find some citations on the subject&amp;nbsp;and perhaps read articles on microfiche.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-3685483123153308324?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/EoKdRljLV6A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/3685483123153308324/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/05/pajama-factchecker-brigade-1-silly.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3685483123153308324?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/3685483123153308324?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/EoKdRljLV6A/pajama-factchecker-brigade-1-silly.html" title="Pajama factchecker brigade 1, silly journalists 0" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/05/pajama-factchecker-brigade-1-silly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04MRno-fSp7ImA9WxFQF0U.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-4485597299830574557</id><published>2010-05-13T13:14:00.000-07:00</published><updated>2010-05-13T13:19:47.455-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-13T13:19:47.455-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="submit" /><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="error" /><category scheme="http://www.blogger.com/atom/ns#" term="ckeditor" /><category scheme="http://www.blogger.com/atom/ns#" term="client side validation" /><title>CKEditor and MVC</title><content type="html">OK. This is a little niche, but in the off-chance someone has the same problem (and the post shows up anywhere in the search results) I thought I would post this.&lt;br /&gt;
&lt;br /&gt;
Using MVC and CKEditor (I had the same problem with FckEditor) I was having trouble posting the results of an editor template using the CKEditor HTML textarea box when using client side jquery validation. &lt;a href="http://stackoverflow.com/questions/924145/using-jquery-to-grab-the-content-from-ckeditors-iframe"&gt;This post&lt;/a&gt;&amp;nbsp;suggested someone having the same problem, but using PHP and the solution I am using is from a poster Gaby.&lt;br /&gt;
&lt;br /&gt;
Specifically, I am using an editor template to replace a string property decorated with [DataType(DataType.MultilineText)] and [Required]. The CkEditor nicely replaces the text area with the html editor, as expected, but when I submit, the client side library would not recognize that any text had been entered in the html/textarea and would throw an error. &lt;br /&gt;
&lt;br /&gt;
Remove the &amp;lt;% Html.EnableClientValidation(); %&amp;gt; tag and it submits as expected. &lt;br /&gt;
&lt;br /&gt;
The solution was to add a little javascript tag to force the CkEditor instance to update on submit. I also needed to do this without naming the instance, as the Id is set by whatever is passed into the editor template. I also included a loop over CkEditor instance, even though I only have one here I might have an editor template that has multiple in the future, so I left it in.&lt;br /&gt;
&lt;br /&gt;
The full editor template code is below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&amp;lt;string&amp;gt;" %&amp;gt;&lt;br /&gt;
&amp;lt;script src="&amp;lt;%= Url.Content("~/content/ckeditor/ckeditor.js") %&amp;gt;" type="text/javascript" &amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class="editor-label"&amp;gt;&lt;br /&gt;
&amp;lt;%: Html.LabelFor(model =&amp;gt; model) %&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class="editor-field"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%: Html.TextAreaFor(model =&amp;gt; model, new { @class = "ckeditor" })%&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%: Html.ValidationMessageFor(model =&amp;gt; model)%&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(function () {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(this).parents('form:first').submit(function () {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (instance in CKEDITOR.instances) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CKEDITOR.instances[instance].updateElement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script %="" ckeditor.js?)="" ckeditor="" content="" src="&amp;lt;%= Url.Content(" ~=""&gt;
" type="text/javascript" &gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="editor-label"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="editor-field"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(function () {&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(this).parents('form:first').submit(function () {&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (instance in CKEDITOR.instances) {&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CKEDITOR.instances[instance].updateElement();&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;p&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;p&gt;


&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-4485597299830574557?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/SJtQKyOP6Pg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/4485597299830574557/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/05/ckeditor-and-mvc.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4485597299830574557?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4485597299830574557?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/SJtQKyOP6Pg/ckeditor-and-mvc.html" title="CKEditor and MVC" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/05/ckeditor-and-mvc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EFQHc9cCp7ImA9WxFTF0U.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-1948819890249888315</id><published>2010-04-08T22:06:00.000-07:00</published><updated>2010-04-08T22:06:51.968-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-08T22:06:51.968-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gannett chicks" /><category scheme="http://www.blogger.com/atom/ns#" term="pelicans" /><category scheme="http://www.blogger.com/atom/ns#" term="mother nature kills" /><title>Pelicans eat baby chicks - more for the ain't life grand file</title><content type="html">We were watching an episode on &lt;a href="http://dsc.discovery.com/tv/life/birds/"&gt;Birds&lt;/a&gt;&amp;nbsp;from the excellent BBC / Discovery channel nature series &lt;a href="http://dsc.discovery.com/tv/life/"&gt;Life&lt;/a&gt;. We were particularly impressed as we watched great white pelicans wade into a nursery of unprotected gannett chicks and swallow them live. One after another. &lt;br /&gt;
&lt;br /&gt;
We've always thought Pelicans sort of cuddly and fun. Not so much any more.&lt;br /&gt;
&lt;br /&gt;
We couldn't find a video of the bird massacre, but we found it about as disturbing as this clip of&amp;nbsp;&lt;a href="http://www.autogenerated.com/2009/09/ethnic-cleansing-natures-way.html"&gt;hornets slaughtering a bee colony&lt;/a&gt;, and then eating their babies. I guess the lesson here, no surprise really, is that babies are yummy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-1948819890249888315?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/gmeWYHzsMZE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/1948819890249888315/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/04/pelicans-eat-baby-chicks-more-for-aint.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1948819890249888315?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/1948819890249888315?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/gmeWYHzsMZE/pelicans-eat-baby-chicks-more-for-aint.html" title="Pelicans eat baby chicks - more for the ain't life grand file" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/04/pelicans-eat-baby-chicks-more-for-aint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQHSXk_fCp7ImA9WxFTFU8.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-562792691351184924</id><published>2010-04-05T20:58:00.000-07:00</published><updated>2010-04-05T20:58:58.744-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-05T20:58:58.744-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="book reader" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="Amazon" /><category scheme="http://www.blogger.com/atom/ns#" term="Kindle" /><category scheme="http://www.blogger.com/atom/ns#" term="Apple" /><title>The Kindle is better than the iPad as a book reader</title><content type="html">I briefly toyed with the idea of getting an iPad. I may yet get one, though not until the next generation comes, out, one with&lt;a href="http://news.cnet.com/8301-17938_105-10443031-1.html"&gt; working USB&lt;/a&gt; and a camera. But all I had to do was hold it in my hand to know it wouldn't replace the Kindle as a book reader. The iPad may be superior in every other way, but the weight alone is a deal killer. I returned the Kindle DX because it was too heavy to hold comfortably in one hand while reading. The Kindle is heavier and even more awkward than the DX.&lt;br /&gt;
&lt;br /&gt;
I also, prefer the non-back lit screen as I find it easier on the eyes. And, even with the iPad's extensive battery life, the Kindle still wins that fight as well. Magazines, web reading and all other reading is, unsurprisingly, better on the iPad. But, when it comes to reading books I find the Kindle to be the superior device. Book reading is a relatively specialized activity; one in which I neither want, nor appreciate, having endless other options available and intruding (probably one reason why I don't read so many books these days).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-562792691351184924?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/Iq2JyuNjabU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/562792691351184924/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/04/kindle-is-better-than-ipad-as-book.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/562792691351184924?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/562792691351184924?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/Iq2JyuNjabU/kindle-is-better-than-ipad-as-book.html" title="The Kindle is better than the iPad as a book reader" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/04/kindle-is-better-than-ipad-as-book.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AGQ34zfSp7ImA9WxBaFEg.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-204448372910762563</id><published>2010-03-24T10:27:00.000-07:00</published><updated>2010-03-24T10:28:42.085-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-24T10:28:42.085-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="viruses" /><category scheme="http://www.blogger.com/atom/ns#" term="mother nature kills" /><title>White, college-educated, upper-income, viral incubators</title><content type="html">&lt;p&gt;A &lt;a href="http://www.babycenter.com/204_measles-outbreak-triggered-by-unvaccinated-child_10329076.bc?scid=preschooler_20100323:3&amp;amp;pe=9Iydr0" target="_blank"&gt;recent measles outbreak&lt;/a&gt; in San Diego started with an intentionally unvaccinated child, who contracted the disease in Switzerland, brought it home to his school where 11% of the children were also unvaccinated.&lt;/p&gt;&lt;p&gt;After 839 people exposed, 11 additional children with measles, three babies hospitalized with 106 degree fevers and a few hundred thousand dollars in expenses all is contained.&lt;/p&gt;&lt;p&gt;According to a University of Michigan study, parents who "under-vaccinate" tend to be college-educated whites with middle to upper incomes. They tend to believe that autism is linked to vaccines, and that a healthy green lifestyle will protect them.&lt;/p&gt;&lt;blockquote&gt;"There are several reasons why parents are choosing not to vaccinate," said study co-author Albert Barskey, a CDC epidemiologist. "Some are afraid of adverse events, and a lot of these fears are unfounded. Others feel that if their child does get sick, the current health-care system can take care of any unfortunate events, and some just don't see measles as a risk. They don't think it's in this country any more and don't think of traveling to Europe as a place where they might contract measles."&lt;br /&gt;
&lt;/blockquote&gt;&lt;p&gt;Even if you live your life at one with the Earth, Mother Nature still doesn't love you.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-204448372910762563?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/71NEB45H1s8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/204448372910762563/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/03/white-college-educated-upper-income.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/204448372910762563?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/204448372910762563?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/71NEB45H1s8/white-college-educated-upper-income.html" title="White, college-educated, upper-income, viral incubators" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/03/white-college-educated-upper-income.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUCSHcycSp7ImA9WxBbEks.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-2339320123351372965</id><published>2010-03-01T11:13:00.000-08:00</published><updated>2010-03-10T15:21:09.999-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-10T15:21:09.999-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="transciption" /><category scheme="http://www.blogger.com/atom/ns#" term="google voice" /><title>Google voice needs elocution lessons</title><content type="html">I like Google Voice well enough. I like being able to get access to my voicemail from the web. But their voice recognition is ungood. Given my experience with voice dialing from android I would be surprised if it was otherwise. &lt;br /&gt;
&lt;br /&gt;
Sometime when I read their transcription of a voice message it is enough for me to get a sense of what is going on. Almost never is it good enough to allow me not to listen to the message. Most times it is comically unreadable. &lt;br /&gt;
&lt;br /&gt;
"Hey, yeah this is the comp and I just leave a message here. Yeah I have. V. C. A. V. Chris You have to go 5 that does our X the daddy and you're looking for the Front Page. You, yeah so i just want to see if they have 2 different tight one get. I have sent the one doesn't have a sense it and then one that have boy who. 8. Now is the one bed without sincere right now and if you want. Please give me a call. My number is [number came in fine... ag] I can check check it out. Let's see the one that you've got business sense or not. My number is [number came in fine... ag] My name is Millie, thank you bye. "&lt;br /&gt;
&lt;br /&gt;
I have no idea who this is, or what it is about.&lt;br /&gt;
&lt;br /&gt;
UPDATE: As it turns out this was a guy, whose name wasn't Millie,&amp;nbsp;calling about an apointment to replace a cracked windshield. Obvious, really. When you read closely. We apologize for our criticism. Thanks Goog!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-2339320123351372965?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/t6OVxoDwPT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/2339320123351372965/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/03/google-voice-needs-elocution-lessons.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2339320123351372965?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2339320123351372965?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/t6OVxoDwPT8/google-voice-needs-elocution-lessons.html" title="Google voice needs elocution lessons" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/03/google-voice-needs-elocution-lessons.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYBQXs4eip7ImA9WxBUFEo.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-4687280886094486197</id><published>2010-03-01T11:02:00.000-08:00</published><updated>2010-03-01T11:02:30.532-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-01T11:02:30.532-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="voice dialing" /><category scheme="http://www.blogger.com/atom/ns#" term="phone" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Droid says what?</title><content type="html">I generally like my android phone and OS but the voice recognition is ungood. I'm just trying to use it for voice activated dialing. Recognizes the name one time out of ten, and splits the other 9 between no name and some other random name or other application. Just terrible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-4687280886094486197?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/mTTvEA0KLLI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/4687280886094486197/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/03/droid-says-what.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4687280886094486197?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/4687280886094486197?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/mTTvEA0KLLI/droid-says-what.html" title="Droid says what?" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/03/droid-says-what.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUGSXk9fyp7ImA9WxBVEk0.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-477086676866481654</id><published>2010-02-14T18:17:00.000-08:00</published><updated>2010-02-14T18:17:08.767-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-14T18:17:08.767-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="error" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title>Facebook Developer Toolkit, MVC and an Incorrect Signature Error</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;A&lt;/span&gt;&lt;/span&gt;ttempting to do the simplest login to Facebook (groovy) and then grabbing some user data using the &lt;a href="http://facebooktoolkit.codeplex.com/"&gt;Facebook Developer Toolkit&lt;/a&gt;&amp;nbsp;in preparation for creating a new user, I spent way too much time trying to resolve&amp;nbsp;an 'Incorrect Signature' error from Facebook on every call. I finally figured out... well, maybe not why the code doesn't work for me, but at least a hack to get past the signature issue.&lt;br /&gt;
&lt;br /&gt;
In my default configuration (an MVC website, not a desktop application), the FDT uses the session key in the MD5 hash computing the signature.&lt;br /&gt;
&lt;br /&gt;
void SendRequestAsync(IDictionary&lt;string, string=""&gt; parameterList, bool useSession, AsyncResult ar) {&lt;/string,&gt;&lt;br /&gt;
OR&lt;br /&gt;
string SendRequestSynchronous(IDictionary&lt;string, string=""&gt; parameterDictionary, bool useSession) {&lt;/string,&gt;&lt;br /&gt;
&lt;br /&gt;
...in both case useSession = true;&lt;br /&gt;
&lt;br /&gt;
Force this to useSession = false and, voila, no incorrect signature error, and all is, momentarily, right with the world. &lt;br /&gt;
&lt;br /&gt;
So, knowing what to look for I grabbed a bit of code from&amp;nbsp;&lt;span class="Apple-style-span" style="color: #30332d; font-family: 'Segoe UI', 'Microsoft Sans Serif', Arial, Geneva, sans-serif; font-size: 14px; white-space: nowrap;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: medium; white-space: normal;"&gt;&lt;a href="http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=70312"&gt;brianromanko&amp;nbsp;here&lt;/a&gt;, and stuck that under both the sync and asyc methods above:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #30332d; font-family: 'Segoe UI', 'Microsoft Sans Serif', Arial, Geneva, sans-serif; font-size: 14px; white-space: nowrap;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: medium; white-space: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #30332d; font-family: 'Segoe UI', 'Microsoft Sans Serif', Arial, Geneva, sans-serif; font-size: 14px; white-space: nowrap;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: medium; white-space: normal;"&gt;void SendRequestAsync(IDictionary&lt;string, string=""&gt; parameterList, bool useSession, AsyncResult ar) {&lt;/string,&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 13px; white-space: pre;"&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; useSession = uid &amp;lt;= 0 || Session &lt;span style="color: blue;"&gt;is&lt;/span&gt; DesktopSession;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 13px; white-space: pre;"&gt;...etc.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 13px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Why this is creating a DesktopSession, and how to stop it, I have not yet determined.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-477086676866481654?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/sChnYn-OvZc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/477086676866481654/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/02/facebook-developer-toolkit-mvc-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/477086676866481654?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/477086676866481654?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/sChnYn-OvZc/facebook-developer-toolkit-mvc-and.html" title="Facebook Developer Toolkit, MVC and an Incorrect Signature Error" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/02/facebook-developer-toolkit-mvc-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYAQ385cSp7ImA9WxBVEU4.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-2688787263413889257</id><published>2010-02-13T22:27:00.000-08:00</published><updated>2010-02-14T00:29:02.129-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-14T00:29:02.129-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="async" /><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title>MVC 2.0 Simple Async Index Method Example</title><content type="html">I was playing around with the Async controller functionality in MVC 2.0. It took me awhile to understand it, and even longer to realize that most of my problems came from incorrectly naming methods (IndexAsycn and IndexComplete instead of IndexAsync and IndexCompleted.&lt;br /&gt;
&lt;br /&gt;
There are various examples out there already, though not as many as I would think, but&amp;nbsp;&lt;a href="http://www.ducdigital.com/2009/12/24/builtin-async-controller-in-asp-net-mvc-2/"&gt;DucDigital&lt;/a&gt;&amp;nbsp;put me on the right path.&amp;nbsp;This &lt;a href="http://blog.stevensanderson.com/2010/01/25/measuring-the-performance-of-asynchronous-controllers/"&gt;Steve Sanderson&lt;/a&gt;&amp;nbsp;post suggests that using the async pattern to deal with concurrent visits doesn't really make sense until you have a great deal of traffic, something most sites will never see. However, I don't think it addresses the much more common, and relevant to smaller sites, issue of multiple blocking synchronous calls in constructing a page (call Steve Sanderson's rss feed, reformat and replace his name with mine, call Scott Guthrie's rss feed,&amp;nbsp;reformat and replace his name with mine, etc., output page. In this scenario the async framework (presumably, I'm too lazy to test at the moment) has a lot to offer.&lt;br /&gt;
&lt;br /&gt;
In any case, here is a very quick implementation calling three rss feeds (not including the scraping and impersonating). This is done in MVC 2.0, using the Home controller only. Nothing changed in the global.cs or any place else. I make no claims as to the efficiency of this code. Only that it works on my machine (thanks &lt;a href="http://www.hanselman.com/"&gt;Hanselman&lt;/a&gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public class HomeController : AsyncController {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public void IndexAsync() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.OutstandingOperations.Increment(3);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Func&lt;string, xelement=""&gt; doFeedHander1 = GetFeedAsync;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var feed1 = "http://community.bartdesmet.net/blogs/bart/rss.aspx";&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Func&lt;string, xelement=""&gt; doFeedHander2 = GetFeedAsync;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var feed2 = "http://feeds.feedburner.com/ScottHanselman";&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Func&lt;string, xelement=""&gt; doFeedHander3 = GetFeedAsync;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var feed3 = "http://feeds.codethinked.com/codethinked";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doFeedHander1.BeginInvoke(feed1, ar =&amp;gt; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var handler = (Func&lt;string, xelement=""&gt;)ar.AsyncState;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.Parameters["feed1"] = handler.EndInvoke(ar);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.OutstandingOperations.Decrement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}, doFeedHander1);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doFeedHander2.BeginInvoke(feed2, ar =&amp;gt; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var handler = (Func&lt;string, xelement=""&gt;)ar.AsyncState;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.Parameters["feed2"] = handler.EndInvoke(ar);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.OutstandingOperations.Decrement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}, doFeedHander2);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doFeedHander3.BeginInvoke(feed3, ar =&amp;gt; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var handler = (Func&lt;string, xelement=""&gt;)ar.AsyncState;&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.Parameters["feed3"] = handler.EndInvoke(ar);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AsyncManager.OutstandingOperations.Decrement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}, doFeedHander3);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public XElement GetFeedAsync(string feedUrl) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return XElement.Load(feedUrl);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception ex) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public ActionResult IndexCompleted(XElement feed1, XElement feed2, XElement feed3) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ViewData["feed1"] = feed1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ViewData["feed2"] = feed2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ViewData["feed3"] = feed3;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return View("index");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-2688787263413889257?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/PSpnHWTQzy8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/2688787263413889257/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/02/mvc-20-simple-async-index-method.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2688787263413889257?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2688787263413889257?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/PSpnHWTQzy8/mvc-20-simple-async-index-method.html" title="MVC 2.0 Simple Async Index Method Example" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/02/mvc-20-simple-async-index-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EMRX8-cCp7ImA9WxBXFUk.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-2111265843830167541</id><published>2010-01-26T13:34:00.000-08:00</published><updated>2010-01-26T13:34:44.158-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-26T13:34:44.158-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="global warming" /><category scheme="http://www.blogger.com/atom/ns#" term="water" /><category scheme="http://www.blogger.com/atom/ns#" term="environment" /><title>Where does the water go?</title><content type="html">Some stream of conciousness thoughts about water. Part of the Green's Movement's vast set of concerns is water. The US uses "too much", an average of &lt;a href="http://www.greenlivingtips.com/articles/189/1/Fast-water-facts.html"&gt;100-150&lt;/a&gt; gallons a day. The developing world doesn't have enough. It takes 39,000 gallons of water to make a car. There are discussions about upcoming &lt;a href="http://waterwars.pulitzergateway.org/"&gt;water wars&lt;/a&gt;&amp;nbsp;where the presumed dominant commodity is water itself. The issues of water scarcity are&amp;nbsp;water sanitation, water access and resource management.&lt;br /&gt;
&lt;br /&gt;
One wonders whether the 'over-use' of water in the US impacts the rest of the world. Does that glass of water you don't drink at a restaraunt cause someone in Somalia to go without.? Or is it primarily a local problem?&lt;br /&gt;
&lt;br /&gt;
From our limited understanding of chemistry, for the most part water is rarely consumed: a hydrogen bomb probably knocks a kilo or two out of existence and presumably some long lasting compounds bind water and take it out of circulation more or less permanently, but for the most part it used and recycled naturally. You drink you urinate, it evaporates and you drink it again. &lt;br /&gt;
&lt;br /&gt;
So then, water being not destroyed, the issue becomes about contamination and allocation. Contamination by pollutants or simply by running out into the&amp;nbsp;ocean and becoming salty. In the later case, the sun will cause it to evaporate again and, unless weather patterns&amp;nbsp;keep rain&amp;nbsp;off the land masses it will return.&amp;nbsp;But there is still the speed with which the cycle occurs.&amp;nbsp;If it is running off faster than it evaporates, you have problems. Contamination can also be addressed by evaporation, but timing again is an issue. And if the contamination is in the ground water than you need some other technical solution to address the problem.&lt;br /&gt;
&lt;br /&gt;
But water can also end up bound in crops, livestock, and water logged Americans, when other humans need it just to survive. It begins to look like a money velocity problem. So in theory, you could try and keep the velocity of water high and keep it from getting horded in toilets, artificial vegas lakes, green lawns or whatever. A true liquidity crisis. If only the Fed could just run the presses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-2111265843830167541?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/aIiRKSymSuA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/2111265843830167541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/01/where-does-water-go.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2111265843830167541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/2111265843830167541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/aIiRKSymSuA/where-does-water-go.html" title="Where does the water go?" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/01/where-does-water-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YGRXk9eip7ImA9WxBVGU0.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-692024313877152435</id><published>2010-01-03T16:17:00.000-08:00</published><updated>2010-02-22T22:05:24.762-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-22T22:05:24.762-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="online education" /><category scheme="http://www.blogger.com/atom/ns#" term="slow parenting" /><category scheme="http://www.blogger.com/atom/ns#" term="immigrants" /><category scheme="http://www.blogger.com/atom/ns#" term="children" /><category scheme="http://www.blogger.com/atom/ns#" term="united states" /><title>Will slow parenting lead to slow children?</title><content type="html">Since the boomers became adults there has been a perceived trend towards their raising overscheduled, stressed out children. Classes, sports,&amp;nbsp;lessons every hour of the day, no downtime, no time to just be kids. Even a decade ago every article and cultural reference presented this as a bad thing. &lt;br /&gt;
&lt;br /&gt;
We are now seeing the rise of more &lt;a href="http://faircompanies.com/blogs/view/slow-free-range-idle-parents-can-increase-iq-and-happiness/"&gt;formal reactionary movements&lt;/a&gt;, slow parenting etc. in an attempt to bring some "sanity" back to to children's lives. It is a seductive notion. And not just for WASPs and other "privileged" classes, but also for those in the process of assimilating. One can find articles, like &lt;a href="http://www.stanford.edu/%7Epgbovine/understanding-asian-parents.htm"&gt;this one&lt;/a&gt;&amp;nbsp;counseling the american born/raised children of Asian immigrants on how to understand and deal with their overbearing parents. Parents, who, having been raised in poverty and worse, found that good grades were a chance to escape, sometimes literally from death. &lt;a href="http://www.stanford.edu/%7Epgbovine/index.html"&gt;Philip Guo&lt;/a&gt; writes:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;I'll never forget the story that a middle-aged Vietnamese man close to me told about his childhood. He said that he grew up being sort of a slacker and never taking school seriously. But when the Vietnam War started, the government drafted boys to be in the army. The only way to get out of the draft was to get high enough grades and test scores to be admitted into an elite high school (the government wanted to spare the smartest boys from war so that they could instead be groomed to be the scholars and leaders of the next generation). Since going to war was pretty much a death sentence, he and his youngest brother studied their asses off in school and for their standardized tests, and did well enough to be admitted to an elite high school. They had 4 other brothers who didn't do well enough --- all of them were sent to war and died. Many of his other friends who didn't do well enough on those exams also died in the war. &lt;/blockquote&gt;But I wonder if the golden age being extolled by the slow parenting movement parents and immigrants wanting a more "normal" american childhood for their kids, isn't an age that is dead and buried for us. &lt;br /&gt;
&lt;br /&gt;
Childhood, certainly the teen version thereof, seems mostly a recent invention. Today's children in the United States lead lives nothing like those in aboriginal, agricultural or even early industrial civiliations. And children who grew up post-WWII&amp;nbsp;— the boomers, most especially, but continuing through today, led lives of unprecedented privilege. No requirement to work. Usually one parent at home. School and education the only requirement. &lt;br /&gt;
&lt;br /&gt;
But most importantly, being white and middle class plus was sufficient for automatic access to the good life. An aristocrat's birthright spread to an entire population. Not that there wasn't a recognition of various outcomes based on talent, luck, ambition, etc. But it seemed that there was a floor for anyone (white, middle class&amp;nbsp;and American) who put out the minimum of effort. &lt;br /&gt;
&lt;br /&gt;
And this is what the slow parenting movement looks back to. A time when kids could just be kids because you didn't have to worry about your children's future. It was guaranteed. &lt;br /&gt;
&lt;br /&gt;
But perhaps it is the immigrant parents that have it right. If the American empire is finished, or fading, no one in this country's place is assured. Your kids are competing with the best from around the world. And those children's parents are not so concerned that they are overstressed or&amp;nbsp; overscheduled. Education and the access it brings they continue to view as a matter of life and death or at least a decent life and an impoverished one.&lt;br /&gt;
&lt;br /&gt;
I have a friend from a well-off WASP family. While his brothers' went to Harvard he choose a more artistic, 'self-actualized' life, with the indulgence of his parents. Now, with his own family to support he says he wishes his parents had kicked his ass into gear. &lt;br /&gt;
&lt;br /&gt;
Maybe the choice is really between a fun slow parenting childhood today followed with a 3rd world factory job as an adult; or a stressful overscheduled childhood today but a chance to stay in the new global middle class as an adult.&amp;nbsp;Not so seductive&amp;nbsp;a notion but worth considering.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-692024313877152435?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/xoOr98Ef-0Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/692024313877152435/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2010/01/will-slow-parenting-lead-to-slow.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/692024313877152435?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/692024313877152435?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/xoOr98Ef-0Y/will-slow-parenting-lead-to-slow.html" title="Will slow parenting lead to slow children?" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2010/01/will-slow-parenting-lead-to-slow.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEDSHk9fip7ImA9WxBSFkw.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-8876779222253693931</id><published>2009-12-23T16:31:00.000-08:00</published><updated>2009-12-23T16:31:19.766-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-23T16:31:19.766-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="global warming" /><category scheme="http://www.blogger.com/atom/ns#" term="pets" /><category scheme="http://www.blogger.com/atom/ns#" term="mother nature" /><title>Surprise, surprise, life pollutes</title><content type="html">If you take the green movement on their slippery slope you can reject material comforts, you can&amp;nbsp;get rid of your SUV, then your car, then downsize your house, stop flying, even stop purchasing anything not grown locally. You can essentially lead the constricted life of a midieval peasant.&lt;br /&gt;
&lt;br /&gt;
But why stop there, you can continue on restricting yourself to two, then one, then &lt;a href="http://www.dailymail.co.uk/femail/article-495495/Meet-women-wont-babies--theyre-eco-friendly.html"&gt;zero children&lt;/a&gt;. Perhaps even get to hoping, or acting on, a desire to cull the human race of a few billion polluters. This will mostly annoy people but we can handle all that.&lt;br /&gt;
&lt;br /&gt;
But, when you want to &lt;a href="http://news.yahoo.com/s/afp/20091220/sc_afp/lifestyleclimatewarminganimalsfood"&gt;take my dog&lt;/a&gt;,&amp;nbsp;you have crossed the line. So a dog pollutes more than an SUV. Man's best friend indeed. &lt;br /&gt;
&lt;br /&gt;
We wonder whether result of the relentless and radical expansion of eco sins will be to hasten the movement's collapse into self-parody, or make less extreme hair shirts seem more acceptable — Sure I'll recycle, but I'm not going to kill my cat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-8876779222253693931?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/sDAiUhYH_bY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/8876779222253693931/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2009/12/surprise-surprise-life-pollutes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/8876779222253693931?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/8876779222253693931?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/sDAiUhYH_bY/surprise-surprise-life-pollutes.html" title="Surprise, surprise, life pollutes" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2009/12/surprise-surprise-life-pollutes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QEQng7fyp7ImA9WxNaEko.&quot;"><id>tag:blogger.com,1999:blog-9195128091507487730.post-7561493215428595932</id><published>2009-11-26T13:35:00.000-08:00</published><updated>2009-11-26T13:35:03.607-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-26T13:35:03.607-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="global warming" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><title>Scientists confirm global warming caused by scientists</title><content type="html">While it is sad that the &lt;a href="http://blogs.telegraph.co.uk/news/jamesdelingpole/100017393/climategate-the-final-nail-in-the-coffin-of-anthropogenic-global-warming/"&gt;climate scandal&lt;/a&gt;, has set back efforts to determine&amp;nbsp;how much humans' may be contributing to global warming, it is nice that we have independent research from &lt;a href="http://wattsupwiththat.com/2009/11/25/uh-oh-raw-data-in-new-zealand-tells-a-different-story-than-the-official-one/"&gt;New Zealand&lt;/a&gt;&amp;nbsp;that confirms scientists' contribution. &lt;br /&gt;
&lt;br /&gt;
Let there be no more doubt or debate: climate scientists and researchers cause global warming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9195128091507487730-7561493215428595932?l=www.autogenerated.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/autogenerated/~4/4cdGMLz6fBg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.autogenerated.com/feeds/7561493215428595932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.autogenerated.com/2009/11/scientists-confirm-global-warming.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/7561493215428595932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9195128091507487730/posts/default/7561493215428595932?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/autogenerated/~3/4cdGMLz6fBg/scientists-confirm-global-warming.html" title="Scientists confirm global warming caused by scientists" /><author><name>Machine</name><uri>http://www.blogger.com/profile/08969093410412994583</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.autogenerated.com/2009/11/scientists-confirm-global-warming.html</feedburner:origLink></entry></feed>

