<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LA.NET [EN] : ASP.NET, C#</title><link>http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/C_2300_/default.aspx</link><description>Tags: ASP.NET, C#</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>RouteValueDictionary: abuse or elegance?</title><link>http://msmvps.com/blogs/luisabreu/archive/2008/10/04/routevaluedictionary-abuse-or-elegance.aspx</link><pubDate>Sat, 04 Oct 2008 22:02:17 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1649749</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=1649749</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2008/10/04/routevaluedictionary-abuse-or-elegance.aspx#comments</comments><description>&lt;p&gt;Today I was reading an old &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/09/23/10774.aspx"&gt;post&lt;/a&gt; by &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/"&gt;Mike Tauty&lt;/a&gt; about the RouteValueDictionary and I remembered some old discussions on the RouteValueDictionary class. As many others, Mike sees the RouteValueDictionary as an abuse of the new &lt;a href="http://msdn.microsoft.com/en-us/library/bb397696.aspx"&gt;anonymous type&lt;/a&gt; feature introduced by C# 3.0.&lt;/p&gt;  &lt;p&gt;Me: well, I’m not so quick in saying that it’s an abuse. I mean, would you prefer to drop the &lt;a href="http://msdn.microsoft.com/en-us/library/bb397696.aspx"&gt;anonymous type&lt;/a&gt; sugar syntax and use the &lt;a href="http://msdn.microsoft.com/en-us/library/bb384062.aspx"&gt;object initializer&lt;/a&gt; syntax for passing values to that dictionary? I wouldn’t, but I’m interesting in knowing what others think about this…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1649749" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/MVC/default.aspx">MVC</category></item><item><title>Repositories, web apps and optimistic concurrency</title><link>http://msmvps.com/blogs/luisabreu/archive/2008/09/05/repositories-web-apps-and-optimistic-concurrency.aspx</link><pubDate>Fri, 05 Sep 2008 13:28:02 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1646873</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=1646873</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2008/09/05/repositories-web-apps-and-optimistic-concurrency.aspx#comments</comments><description>&lt;p&gt;Yesterday, I was looking at some code and I found something like this on a method that handles the confirm click of a web page which triggers an update on a specific domain object:&lt;/p&gt;  &lt;p&gt;var aux = Request.Form[“Id”] == null ?    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new MyObject() :     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rep.GetById(Request.Form[“Id”]);    &lt;br /&gt;//update aux’s properties with the values from the other form fields&lt;/p&gt;  &lt;p&gt;Ok, can you see anything wrong? I can. What about now? Anything wrong with it? Here’s a scenario that shows how you can get into problems with this:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User A loads object with ID 1 for updating info;&lt;/li&gt;    &lt;li&gt;User B also loads the same object for changing some info;&lt;/li&gt;    &lt;li&gt;User A submits the form, saving the data to the db;&lt;/li&gt;    &lt;li&gt;User B submits the form and ends up overriding the changes made by user A.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;By now, I think I can hear some of you saying: “man, why don’t you use some sort of version property? That will save your day!” And I say: “yes, that is a good idea and MyObject class already has that property”. Now, if you’ re on the group that says “then it should work…”, I’ll have to tell you to look again at the code. Do you see the problem now?&lt;/p&gt;  &lt;p&gt;By now, you’ve surelly noticed that the problem lies in the fact that you’re loading the object by ID. If you look at the previous list, you can easily see that in step 4 aux will have an object with info submitted by User A instead of having the initial data that was loaded for both User A and User B. This happens because you’re recovering the object from the repository and you’re doing it only by ID. A possible solution for this bug would be adding a method to your repository so that it loads an object by ID and version:&lt;/p&gt;  &lt;p&gt;var aux = Request.Form[“Id”] == null ?    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new MyObject() :     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rep.GetByIdAndVersion(Request.Form[“Id”], Request.Form[“Version”]);&lt;/p&gt;  &lt;p&gt;Ok, this should work, but I don’t like it. In past ASP.NET projects, I’ve been building serializable objects and I persist them to the ViewState (or Control State, if ViewState is disabled as it should!) of the page and recover them during postbacks. With this second approach, you’ll end up sending more data to the client but you won’t need to perform a database call to get your object.&lt;/p&gt;  &lt;p&gt;And yes, this was a bug in a real web app…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1646873" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>S#arp Architecture: first impressions</title><link>http://msmvps.com/blogs/luisabreu/archive/2008/05/20/s-arp-architecture-first-impressions.aspx</link><pubDate>Tue, 20 May 2008 22:16:45 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1625253</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=1625253</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2008/05/20/s-arp-architecture-first-impressions.aspx#comments</comments><description>&lt;p&gt;Today I&amp;#39;ve finally got some time to take a look at &lt;a href="http://devlicio.us/blogs/billy_mccafferty/"&gt;Billy McCafferty&amp;#39;s&lt;/a&gt; &lt;a href="http://www.codeplex.com/SharpArchitecture"&gt;S#arp Architecture&lt;/a&gt;. Comparing with the old NHibernate best practices project, I think it&amp;#39;s fair to say that there are several important improvements. For instance, there&amp;#39;s no longer a Load method that takes an instance and a property list which was used to pass an instance that would be used in filtering the entities loaded from the database. On the other hand, I&amp;#39;d still prefer to use Get instead of Load because I think that getting null when you try to load a non-existing entity is ok.&lt;/p&gt; &lt;p&gt;The base persistence classes have been modified, improving the integration with NHibernate. I&amp;#39;m still not sure on the GetDomainObjectSignature method (used to let you provide the business key), but I do think that the Equals method implementation is better than it used to be (again, it&amp;#39;s really complicated to implement Equals when you&amp;#39;re thinking in NHibernate, but it&amp;#39;s fair to say that Billy&amp;#39;s implementation looks good).&lt;/p&gt; &lt;p&gt;So, my first impressions are really positive and I&amp;#39;m officially recommending it to anyone working with NHibernate and ASP.NET (MVC).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1625253" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>.NET 3.5 and VS SP beta1 goodies</title><link>http://msmvps.com/blogs/luisabreu/archive/2008/05/12/net-3-5-and-vs-sp-beta1-goodies.aspx</link><pubDate>Mon, 12 May 2008 19:58:24 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1621149</guid><dc:creator>luisabreu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=1621149</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2008/05/12/net-3-5-and-vs-sp-beta1-goodies.aspx#comments</comments><description>&lt;p&gt;You can get them from here (VS) and &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=23516C63-2DB2-4E7F-AABA-32B12D6E025C&amp;amp;displaylang=en"&gt;here&lt;/a&gt; (.NET). I&amp;#39;m reading what&amp;#39;s new on Brad Abrams &lt;a href="http://blogs.msdn.com/brada/archive/2008/05/05/visual-studio-2008-and-net-framework-3-5-sp1-beta.aspx"&gt;post&lt;/a&gt; and I&amp;#39;m really digging the new features:) For instance, having the format option working with JS code is simply cool! Another cool thing: the ScriptManager is able to combine scripts so there&amp;#39;s really no need for using the &lt;a href="http://msmvps.com/blogs/luisabreu/archive/2007/06/12/toolkitscriptmanager-there-s-a-new-scriptmanager-in-town.aspx"&gt;ToolkitScriptManager&lt;/a&gt; for that:)&lt;/p&gt; &lt;p&gt;Btw, i&amp;#39;m still going through the complete list but it really looks like we&amp;#39;re gonna gave lots of new stuff :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1621149" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/MS+AJAX/default.aspx">MS AJAX</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/Trivia/default.aspx">Trivia</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/WF/default.aspx">WF</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Application services IV: authenticating the user in an offline scenario</title><link>http://msmvps.com/blogs/luisabreu/archive/2008/02/07/application-services-iv-authenticating-the-user-in-an-offline-scenario.aspx</link><pubDate>Thu, 07 Feb 2008 14:43:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1501272</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=1501272</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2008/02/07/application-services-iv-authenticating-the-user-in-an-offline-scenario.aspx#comments</comments><description>&lt;p&gt;In my previous posts I&amp;#39;ve been talking about the basic features introduced by the new Applications Services which were added during the latest release of the .NET platform. Today we&amp;#39;ll see how easy it is to configure our windows form app so that it is able to authenticate a user in an offline scenario. &lt;p&gt;As you might expect, you&amp;#39;ll only be able to validate a user (on an offline scenario) if that user has already been validated previously in an online scenario. So, the 1st thing you need to do is to change your app.config file so that the hash of the password is stored in the machine. To achieve this, you need to set the savePasswordLocally attribute of the provider entry: &lt;p&gt;&amp;lt;add name=&amp;quot;ClientAuthenticationMembershipProvider&amp;quot; &lt;br /&gt;&lt;strong&gt;savePasswordHashLocally=&amp;quot;true&amp;quot; &lt;br /&gt;&lt;/strong&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; type=&amp;quot;System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot; &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; serviceUri=&lt;a href="http://localhost/login/Authentication_JSON_AppService.axd"&gt;http://localhost/login/Authentication_JSON_AppService.axd&lt;/a&gt;&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; credentialsProvider=&amp;quot;login.Login, login&amp;quot; /&amp;gt; &lt;p&gt;Even though this step is required in order to save a local copy of the hash of the password, it is not enough for making the platform authenticate the credentials against the local saved copy of a previously successful authentication. The offline authentication scheme will only be used when the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.clientservices.connectivitystatus.isoffline.aspx"&gt;ConnectivityStatus.IsOffline&lt;/a&gt; is set to true. So, you need to change your startup code to something like this for authenticating a user in an offline scenario: &lt;p&gt;&lt;strong&gt;ConnectivityStatus.IsOffline = true; &lt;br /&gt;&lt;/strong&gt;if(! Membership.ValidateUser(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;) ) &lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return; &lt;br /&gt;} &lt;br /&gt;Application.Run(new Form1()); &lt;p&gt;By now you must be wondering where the platform is saving the hash of the password. If you don&amp;#39;t do anything, the hash will be saved in a file named User_&lt;em&gt;username&lt;/em&gt;.clientdata in a folder named after your windows app (placed inside the user&amp;#39;s app data folder). Just replace &lt;em&gt;username&lt;/em&gt; with the username of the user that is trying to log on and you should find the file by performing a search on your disk. If you open that file, you should find something like this on it: &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;&amp;lt;ClientData&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;LastLoggedInUserName&amp;gt;&amp;lt;/LastLoggedInUserName&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;LastLoggedInDateUtc&amp;gt;1C73F36A9D78ED2&amp;lt;/LastLoggedInDateUtc&amp;gt; &lt;br /&gt;&lt;strong&gt;&amp;lt;PasswordHash&amp;gt;oSmbK+DdLg9KhsOKZHg5qKisALg=&amp;lt;/PasswordHash&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;PasswordSalt&amp;gt;EUQ3dz7qihlivjokvdkVBg==&amp;lt;/PasswordSalt&amp;gt; &lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp; &amp;lt;Roles&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;item&amp;gt;Role2&amp;lt;/item&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/Roles&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;RolesCachedDateUtc&amp;gt;1C85E0822CC597B&amp;lt;/RolesCachedDateUtc&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;SettingsNames&amp;gt;&amp;lt;/SettingsNames&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;SettingsStoredAs&amp;gt;&amp;lt;/SettingsStoredAs&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;SettingsValues&amp;gt;&amp;lt;/SettingsValues&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;SettingsNeedReset&amp;gt;0&amp;lt;/SettingsNeedReset&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;SettingsCacheIsMoreFresh&amp;gt;0&amp;lt;/SettingsCacheIsMoreFresh&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;CookieNames&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;item&amp;gt;9e7450b9c96a487eb57880ecfa4b96c9&amp;lt;/item&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/CookieNames&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;CookieValues&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;item&amp;gt;.ASPXAUTH=&amp;lt;/item&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/CookieValues&amp;gt; &lt;br /&gt;&amp;lt;/ClientData&amp;gt; &lt;p&gt;As you can see, there&amp;#39;s a lot more info besides the password hash+salt used for authenticating the user in an offline scenario. For instance, roles can also be cached... &lt;p&gt;Currently, you can also save the user info in an SQL Compact database. To do that, you&amp;#39;ll need to specify a SQL Compact connection string or you can simply use the special connection string &amp;quot;Data Source=|SQL/CE|&amp;quot;. Here&amp;#39;s what you need in order to achieve this: &lt;p&gt;&amp;lt;add name=&amp;quot;ClientAuthenticationMembershipProvider&amp;quot; &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; savePasswordHashLocally=&amp;quot;true&amp;quot; &lt;br /&gt;&lt;strong&gt;connectionStringName=&amp;quot;Data Source=|SQL/CE|&amp;quot; &lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&amp;quot;System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot; &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; serviceUri=&amp;quot;&lt;a href="http://saturn/login/Authentication_JSON_AppService.axd"&gt;http://saturn/login/Authentication_JSON_AppService.axd&amp;quot;&lt;/a&gt;&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; credentialsProvider=&amp;quot;login.Login, login&amp;quot;  &lt;p&gt;Do notice that this will only work in x86 builds (ie, SQL Compact will only run in WoW mode in x64 bits systems). So, if you also have a x64 version of an OS installed, don&amp;#39;t forget to explicitly set the build to x86 on the configuration of your project. One more thing you might notice after looking at the previous config entry is that I&amp;#39;m passing the special connection string to an attribute which is called connectionStringName. Well, if you want, you can pass it the name of an existing entry on the connectionString section instead (internally, the provider will try to get an existing entry named with the value you pass to the connectionStringName attribute. If it can&amp;#39;t find any, it will simply use the value you&amp;#39;ve passed to that atribute).  &lt;p&gt;If you use &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;reflector&lt;/a&gt; to check the code, you&amp;#39;ll see that the helper classes do have code that would let you use Isolated Storage for saving these data. However, there&amp;#39;s really no way to set it up (at least, I didn&amp;#39;t find any - maybe I&amp;#39;m missing something!) so you&amp;#39;ll have to choose between using the file system or a SQL compact database. &lt;p&gt;Before ending this post, there&amp;#39;s still one more thing you should keep in mind: you should always set the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.clientservices.connectivitystatus.isoffline.aspx"&gt;ConnectivityStatus.IsOffline&lt;/a&gt; property. If you explicitely set the property, then that value will be respected. If you don&amp;#39;t, then the value returned from the property will depend on the checking of a special file called AppIsOffline. This file is used as a marker and is created when you set the&amp;nbsp; the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.clientservices.connectivitystatus.isoffline.aspx"&gt;ConnectivityStatus.IsOffline&lt;/a&gt; property to true (notice that it will be deleted when you set the property to false). What this means is that if you&amp;#39;ve previously set that property to false and then don&amp;#39;t set it back to true, authentication will always be performed offline since that property will return true. &lt;p&gt;And that&amp;#39;s all for today...more to come tomorrow :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1501272" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Open Source projects in .NET</title><link>http://msmvps.com/blogs/luisabreu/archive/2007/03/30/open-source-projects-in-net.aspx</link><pubDate>Fri, 30 Mar 2007 12:36:41 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:729793</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/luisabreu/rsscomments.aspx?PostID=729793</wfw:commentRss><comments>http://msmvps.com/blogs/luisabreu/archive/2007/03/30/open-source-projects-in-net.aspx#comments</comments><description>&lt;p&gt;An &lt;a href="http://elegantcode.com/?p=539"&gt;open letter&lt;/a&gt; from &lt;a href="http://elegantcode.com/"&gt;D. Starr&lt;/a&gt; to &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott G.&lt;/a&gt; resulted in a cool discussion about open source projects in the .NET platform. If you have the time, then go read it!&lt;/p&gt; &lt;p&gt;[I know this is old, but I'm on vacations:) ]&lt;/p&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=729793" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/Trivia/default.aspx">Trivia</category></item></channel></rss>