<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Santos Ray Victorero, II !</title>
    <link>http://www.blogs.victorero.com/</link>
    <description>There is no business like cyber-business</description>
    <language>en-us</language>
    <copyright>Copyright (c) 2005 - 2010 by Santos Ray Victorero, II</copyright>
    <lastBuildDate>Sat, 10 Jul 2010 18:32:56 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>santos@victorero.com</managingEditor>
    <webMaster>santos@victorero.com</webMaster>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=35a1a52b-9d9c-4f6b-9624-69f8d19b720c</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,35a1a52b-9d9c-4f6b-9624-69f8d19b720c.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,35a1a52b-9d9c-4f6b-9624-69f8d19b720c.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=35a1a52b-9d9c-4f6b-9624-69f8d19b720c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I don't know when and how it happened, maybe when I installed VS 2010 side-by-side
with VS 2008, but my VS 2010 default language was set to Visual Basic and I don't
use "that thing" anymore. I ignored it for a while since I have been just converting
from VS 2008 but it got annoying because every time I created a new project it was
created with Visual Basic so I had to delete it and recreate it.
</p>
        <p>
Finally I decided to change the setting but I was looking on the wrong place Tools
-&gt; Options. After a while I found this <a href="http://www.eggheadcafe.com/community/aspnet/7/10079498/how-to-change-the-default-language-from-visual-basic-to-c.aspx" target="_blank">eggheadcafe
posting</a> and as it said it is Tools -&gt; Import and Export Settings.:
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb.png" width="244" height="219" />
          </a>
        </p>
        <p>
Save your current settings in case you change your mind later: (not me :-))
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb_1.png" width="244" height="219" />
          </a>
        </p>
        <p>
Then select Visual C# Development Settings and click Finish:
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb_2.png" width="244" height="219" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=35a1a52b-9d9c-4f6b-9624-69f8d19b720c" />
      </body>
      <title>Changing default language in VS 2010 from Visual Basic to C#</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,35a1a52b-9d9c-4f6b-9624-69f8d19b720c.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/07/10/ChangingDefaultLanguageInVS2010FromVisualBasicToC.aspx</link>
      <pubDate>Sat, 10 Jul 2010 18:32:56 GMT</pubDate>
      <description>&lt;p&gt;
I don't know when and how it happened, maybe when I installed VS 2010 side-by-side
with VS 2008, but my VS 2010 default language was set to Visual Basic and I don't
use "that thing" anymore. I ignored it for a while since I have been just converting
from VS 2008 but it got annoying because every time I created a new project it was
created with Visual Basic so I had to delete it and recreate it.
&lt;/p&gt;
&lt;p&gt;
Finally I decided to change the setting but I was looking on the wrong place Tools
-&amp;gt; Options. After a while I found this &lt;a href="http://www.eggheadcafe.com/community/aspnet/7/10079498/how-to-change-the-default-language-from-visual-basic-to-c.aspx" target="_blank"&gt;eggheadcafe
posting&lt;/a&gt; and as it said it is Tools -&amp;gt; Import and Export Settings.:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb.png" width="244" height="219" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Save your current settings in case you change your mind later: (not me :-))
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb_1.png" width="244" height="219" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Then select Visual C# Development Settings and click Finish:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/ChangingdefaultlanguageinVS2010fromVisua_CAAA/image_thumb_2.png" width="244" height="219" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=35a1a52b-9d9c-4f6b-9624-69f8d19b720c" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,35a1a52b-9d9c-4f6b-9624-69f8d19b720c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=9403e414-435b-486d-abc5-649bfd3689b3</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,9403e414-435b-486d-abc5-649bfd3689b3.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,9403e414-435b-486d-abc5-649bfd3689b3.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9403e414-435b-486d-abc5-649bfd3689b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
While installing Silverlight 4 Tools v1.0 for Visual Studio I ran into the following
screen sometimes after the installation hanged for a while:
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb.png" width="244" height="229" />
          </a>
        </p>
        <p>
I had found that problem before while trying to install SQL Server 2008 so I located
the following registry key:
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_8.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_3.png" width="244" height="168" />
          </a> 
</p>
        <p>
and removed this from the PendingFileRenameOperations
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_1.png" width="244" height="220" />
          </a>
        </p>
        <p>
After doing that I ran the installation again and it completed successfully.
</p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_10.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_4.png" width="244" height="229" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=9403e414-435b-486d-abc5-649bfd3689b3" />
      </body>
      <title>Installing Silverlight 4 Tools v1.0 for Visual Studio 2010</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,9403e414-435b-486d-abc5-649bfd3689b3.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/05/18/InstallingSilverlight4ToolsV10ForVisualStudio2010.aspx</link>
      <pubDate>Tue, 18 May 2010 15:32:43 GMT</pubDate>
      <description>&lt;p&gt;
While installing Silverlight 4 Tools v1.0 for Visual Studio I ran into the following
screen sometimes after the installation hanged for a while:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb.png" width="244" height="229" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I had found that problem before while trying to install SQL Server 2008 so I located
the following registry key:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_3.png" width="244" height="168" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
and removed this from the PendingFileRenameOperations
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_1.png" width="244" height="220" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
After doing that I ran the installation again and it completed successfully.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/InstallingSilverlig.0forVisualStudio2010_A208/image_thumb_4.png" width="244" height="229" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=9403e414-435b-486d-abc5-649bfd3689b3" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,9403e414-435b-486d-abc5-649bfd3689b3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=ec144400-9d75-474d-80ca-a6f88c8a14d6</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,ec144400-9d75-474d-80ca-a6f88c8a14d6.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,ec144400-9d75-474d-80ca-a6f88c8a14d6.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ec144400-9d75-474d-80ca-a6f88c8a14d6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="1">
            <span style="color: blue">
            </span>
          </font>
        </p>
        <p>
          <font size="1">
            <span style="color: blue">
            </span>
          </font>
          <font size="1">
            <span style="color: blue">
            </span>
          </font>
        </p>
        <p>
          <strong>Let the source code speak: (This is from a real application not "Demoware") </strong>
        </p>
        <p>
 
</p>
        <pre class="code">
          <font size="1">
            <span style="color: blue">using </span>System; <span style="color: blue">using </span>System.Collections.Generic; <span style="color: blue">using </span>System.ComponentModel; <span style="color: blue">using </span>System.ComponentModel.DataAnnotations; <span style="color: blue">using </span>System.Linq; <span style="color: blue">using </span>System.ServiceModel.DomainServices.Hosting; <span style="color: blue">using </span>System.ServiceModel.DomainServices.Server; <span style="color: blue">using </span>CBSI.GL.Application; <span style="color: blue">using </span>CBSI.NHibernate.DomainServices; <span style="color: blue">using </span>CBSI.GL.Domain; <span style="color: blue">using </span>CBSI.GL.DA; <span style="color: blue">using </span>CBSI.TAE.Dashboard.RIAServices.Web.Properties; <span style="color: blue">namespace </span>CBSI.TAE.Dashboard.RIAServices.Web.Services
{ [<span style="color: #2b91af">EnableClientAccess</span>()] <span style="color: blue">public
class </span><span style="color: #2b91af">AccountCategoryDomainService </span>: <span style="color: #2b91af">GLDomainService</span>&lt;<span style="color: #2b91af">AccountCategoryRepository</span>, </font>
          <font size="1">
            <span style="color: #2b91af">AccountCategory</span>, <span style="color: blue">long</span>&gt;
{ <span style="color: #2b91af">IAccountCategoryService </span>_AccountCategoryService; <span style="color: blue">public </span>AccountCategoryDomainService(<span style="color: #2b91af">IAccountCategoryService </span>accountCategoryService)
: <span style="color: blue">base</span>(accountCategoryService.Repository) { _AccountCategoryService
= accountCategoryService; } <span style="color: blue">public </span><span style="color: #2b91af">IEnumerable</span>&lt;<span style="color: #2b91af">AccountCategoryModel</span>&gt;
Categories() { <span style="color: blue">return from </span>c <span style="color: blue">in
this</span>.Repository.All <span style="color: blue">where </span>(c.GLSetup.ID==<span style="color: blue">this</span>.GLSetup.ID) <span style="color: blue">orderby </span>c.Name <span style="color: blue">select
new </span><span style="color: #2b91af">AccountCategoryModel</span>(c); } <span style="color: blue">public
void </span>Insert(<span style="color: #2b91af">AccountCategoryModel </span>model)
{ <span style="color: blue">if </span>(<span style="color: blue">this</span>.Exists(model.Name)) <span style="color: blue">throw
new </span><span style="color: #2b91af">ApplicationException</span>(<span style="color: blue">string</span>.Format(<span style="color: #2b91af">Resources</span>.AlreadyExistEntityWithName, <span style="color: #2b91af">Resources</span>.Entity_Name_Category,
model.Name)); <span style="color: #2b91af">AccountCategory </span>accountCategory
= <span style="color: blue">new </span><span style="color: #2b91af">AccountCategory</span>(<span style="color: blue">this</span>.GLSetup);
accountCategory = model.ToDomain(accountCategory); SaveTransaction(accountCategory); <span style="color: blue">this</span>.ChangeSet.Associate(model,
accountCategory, MapToModel); } <span style="color: blue">public void </span>Update(<span style="color: #2b91af">AccountCategoryModel </span>model)
{ <span style="color: #2b91af">AccountCategory </span>accountCategory = <span style="color: blue">this</span>.Repository.Get(c
=&gt; c.ID == model.ID); <span style="color: blue">if </span>(accountCategory==<span style="color: blue">null</span>) <span style="color: blue">throw
new </span><span style="color: #2b91af">ApplicationException</span>(<span style="color: blue">string</span>.Format(<span style="color: #2b91af">Resources</span>.UpdatingNonExistingEntity, <span style="color: #2b91af">Resources</span>.Entity_Name_Category));
accountCategory = model.ToDomain(accountCategory); SaveTransaction(accountCategory); <span style="color: blue">this</span>.ChangeSet.Associate(model,
accountCategory, MapToModel); } <span style="color: blue">public void </span>Delete(<span style="color: #2b91af">AccountCategoryModel </span>model)
{ <span style="color: #2b91af">AccountCategory </span>accountCategory = <span style="color: blue">this</span>.Repository.Get(c
=&gt; c.ID == model.ID); <span style="color: blue">if </span>(accountCategory == <span style="color: blue">null</span>) <span style="color: blue">throw
new </span><span style="color: #2b91af">ApplicationException</span>(<span style="color: blue">string</span>.Format(<span style="color: #2b91af">Resources</span>.DeletingNonExistingEntity, <span style="color: #2b91af">Resources</span>.Entity_Name_Category));
DeleteTransaction(accountCategory); } <span style="color: blue">bool </span>Exists(<span style="color: blue">string </span>name)
{ <span style="color: blue">var </span>ac = <span style="color: blue">this</span>.Repository.Get(
c =&gt; c.Name == name); <span style="color: blue">return </span>(ac != <span style="color: blue">null</span>);
} <span style="color: blue">void </span>MapToModel(<span style="color: #2b91af">AccountCategoryModel </span>acm, <span style="color: #2b91af">AccountCategory </span>ac
) { acm = <span style="color: blue">new </span><span style="color: #2b91af">AccountCategoryModel</span>(ac);
} } } </font>
        </pre>
        <p>
        </p>
        <a href="http://11011.net/software/vspaste">
        </a>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=ec144400-9d75-474d-80ca-a6f88c8a14d6" />
      </body>
      <title>Lean WCF RIA Services’ Domain Service – DAL Independent</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,ec144400-9d75-474d-80ca-a6f88c8a14d6.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/05/14/LeanWCFRIAServicesDomainServiceDALIndependent.aspx</link>
      <pubDate>Fri, 14 May 2010 14:58:49 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Let the source code speak: (This is from a real application not "Demoware") &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.Collections.Generic; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.ComponentModel; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.ComponentModel.DataAnnotations; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.Linq; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.ServiceModel.DomainServices.Hosting; &lt;span style="color: blue"&gt;using &lt;/span&gt;System.ServiceModel.DomainServices.Server; &lt;span style="color: blue"&gt;using &lt;/span&gt;CBSI.GL.Application; &lt;span style="color: blue"&gt;using &lt;/span&gt;CBSI.NHibernate.DomainServices; &lt;span style="color: blue"&gt;using &lt;/span&gt;CBSI.GL.Domain; &lt;span style="color: blue"&gt;using &lt;/span&gt;CBSI.GL.DA; &lt;span style="color: blue"&gt;using &lt;/span&gt;CBSI.TAE.Dashboard.RIAServices.Web.Properties; &lt;span style="color: blue"&gt;namespace &lt;/span&gt;CBSI.TAE.Dashboard.RIAServices.Web.Services
{ [&lt;span style="color: #2b91af"&gt;EnableClientAccess&lt;/span&gt;()] &lt;span style="color: blue"&gt;public
class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AccountCategoryDomainService &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;GLDomainService&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;AccountCategoryRepository&lt;/span&gt;, &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: #2b91af"&gt;AccountCategory&lt;/span&gt;, &lt;span style="color: blue"&gt;long&lt;/span&gt;&amp;gt;
{ &lt;span style="color: #2b91af"&gt;IAccountCategoryService &lt;/span&gt;_AccountCategoryService; &lt;span style="color: blue"&gt;public &lt;/span&gt;AccountCategoryDomainService(&lt;span style="color: #2b91af"&gt;IAccountCategoryService &lt;/span&gt;accountCategoryService)
: &lt;span style="color: blue"&gt;base&lt;/span&gt;(accountCategoryService.Repository) { _AccountCategoryService
= accountCategoryService; } &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;AccountCategoryModel&lt;/span&gt;&amp;gt;
Categories() { &lt;span style="color: blue"&gt;return from &lt;/span&gt;c &lt;span style="color: blue"&gt;in
this&lt;/span&gt;.Repository.All &lt;span style="color: blue"&gt;where &lt;/span&gt;(c.GLSetup.ID==&lt;span style="color: blue"&gt;this&lt;/span&gt;.GLSetup.ID) &lt;span style="color: blue"&gt;orderby &lt;/span&gt;c.Name &lt;span style="color: blue"&gt;select
new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AccountCategoryModel&lt;/span&gt;(c); } &lt;span style="color: blue"&gt;public
void &lt;/span&gt;Insert(&lt;span style="color: #2b91af"&gt;AccountCategoryModel &lt;/span&gt;model)
{ &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.Exists(model.Name)) &lt;span style="color: blue"&gt;throw
new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.AlreadyExistEntityWithName, &lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.Entity_Name_Category,
model.Name)); &lt;span style="color: #2b91af"&gt;AccountCategory &lt;/span&gt;accountCategory
= &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AccountCategory&lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.GLSetup);
accountCategory = model.ToDomain(accountCategory); SaveTransaction(accountCategory); &lt;span style="color: blue"&gt;this&lt;/span&gt;.ChangeSet.Associate(model,
accountCategory, MapToModel); } &lt;span style="color: blue"&gt;public void &lt;/span&gt;Update(&lt;span style="color: #2b91af"&gt;AccountCategoryModel &lt;/span&gt;model)
{ &lt;span style="color: #2b91af"&gt;AccountCategory &lt;/span&gt;accountCategory = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Repository.Get(c
=&amp;gt; c.ID == model.ID); &lt;span style="color: blue"&gt;if &lt;/span&gt;(accountCategory==&lt;span style="color: blue"&gt;null&lt;/span&gt;) &lt;span style="color: blue"&gt;throw
new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.UpdatingNonExistingEntity, &lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.Entity_Name_Category));
accountCategory = model.ToDomain(accountCategory); SaveTransaction(accountCategory); &lt;span style="color: blue"&gt;this&lt;/span&gt;.ChangeSet.Associate(model,
accountCategory, MapToModel); } &lt;span style="color: blue"&gt;public void &lt;/span&gt;Delete(&lt;span style="color: #2b91af"&gt;AccountCategoryModel &lt;/span&gt;model)
{ &lt;span style="color: #2b91af"&gt;AccountCategory &lt;/span&gt;accountCategory = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Repository.Get(c
=&amp;gt; c.ID == model.ID); &lt;span style="color: blue"&gt;if &lt;/span&gt;(accountCategory == &lt;span style="color: blue"&gt;null&lt;/span&gt;) &lt;span style="color: blue"&gt;throw
new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.DeletingNonExistingEntity, &lt;span style="color: #2b91af"&gt;Resources&lt;/span&gt;.Entity_Name_Category));
DeleteTransaction(accountCategory); } &lt;span style="color: blue"&gt;bool &lt;/span&gt;Exists(&lt;span style="color: blue"&gt;string &lt;/span&gt;name)
{ &lt;span style="color: blue"&gt;var &lt;/span&gt;ac = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Repository.Get(
c =&amp;gt; c.Name == name); &lt;span style="color: blue"&gt;return &lt;/span&gt;(ac != &lt;span style="color: blue"&gt;null&lt;/span&gt;);
} &lt;span style="color: blue"&gt;void &lt;/span&gt;MapToModel(&lt;span style="color: #2b91af"&gt;AccountCategoryModel &lt;/span&gt;acm, &lt;span style="color: #2b91af"&gt;AccountCategory &lt;/span&gt;ac
) { acm = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AccountCategoryModel&lt;/span&gt;(ac);
} } } &lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=ec144400-9d75-474d-80ca-a6f88c8a14d6" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,ec144400-9d75-474d-80ca-a6f88c8a14d6.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=4c1926a5-dac7-4901-b70a-3f0d56b747b3</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,4c1926a5-dac7-4901-b70a-3f0d56b747b3.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,4c1926a5-dac7-4901-b70a-3f0d56b747b3.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4c1926a5-dac7-4901-b70a-3f0d56b747b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When talking about the <a title="Wikipedia Definition" href="http://en.wikipedia.org/wiki/Model_View_ViewModel" target="_blank">Model
View ViewModel</a> (MVVM) , <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">Model
View Controller</a> (MVC) or any other presentation patterns Model some people refer
to it as the Database Model, others as the Domain Model. Well, it is actually referred
as a <strong>Presentation Data Model</strong>.
</p>
        <p>
Your database or domain types could have many properties that the View does not care
about and it will be a waste of resources as well as a security risk to have all that
data traveling back and fourth the network even if it is an intranet.
</p>
        <p>
Another problem with using Database or Domain data in your MVVM is that any change
to the database or domain will require to update all the clients and that could be
very costly.
</p>
        <p>
Let's assume for example that we have the following very simple Domain Model:
</p>
        <p>
          <strong>
            <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/SSLDomain_4.png">
              <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SSLDomain" border="0" alt="SSLDomain" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/SSLDomain_thumb_1.png" width="244" height="142" />
            </a>
          </strong>
        </p>
        <p>
and the following Database Model:
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/image_thumb.png" width="166" height="244" />
          </a>
        </p>
        <p>
Note: I created the Database Model using the following <a title="NHibernate Forge" href="http://nhforge.org/" target="_blank">NHibernate</a> mapping:
</p>
        <table border="0" cellspacing="0" cellpadding="2" width="772">
          <tbody>
            <tr>
              <td valign="top" width="6">
 </td>
              <td valign="top" width="758">
 </td>
              <td valign="top" width="6">
 </td>
            </tr>
            <tr>
              <td valign="top" width="6">
 </td>
              <td valign="top" width="758">
                <pre class="code">
                  <span style="color: blue">&lt;?</span>
                  <span style="color: #a31515">xml </span>
                  <span style="color: red">version</span>
                  <span style="color: blue">=</span>"<span style="color: blue">1.0</span>" <span style="color: red">encoding</span><span style="color: blue">=</span>"<span style="color: blue">utf-8</span>"<span style="color: blue">?&gt;
&lt;!--</span><span style="color: green">Generated with CyberBizSoft's NHibernate
Helper on 12/16/2009 11:30:06 PM </span><span style="color: blue">--&gt; &lt;</span><span style="color: #a31515">hibernate-mapping </span><span style="color: red">xmlns</span><span style="color: blue">=</span>"<span style="color: blue">urn:nhibernate-mapping-2.2</span>" <span style="color: red">assembly</span><span style="color: blue">=</span>"<span style="color: blue">CyberBizSoft.SSL.Domain</span>" </pre>
                <pre class="code">
                  <span style="color: red">namespace</span>
                  <span style="color: blue">=</span>"<span style="color: blue">CBSI.SSL.Domain</span>"<span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">class </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Store</span>" <span style="color: red">table</span><span style="color: blue">=</span>"<span style="color: blue">SSLStores</span>" <span style="color: red">lazy</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">id </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">ID</span>" <span style="color: red">unsaved-value</span><span style="color: blue">=</span>"<span style="color: blue">0</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">ID</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">System.Int64</span>"<span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">generator </span><span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">identity</span>" <span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">id</span><span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Name</span>"<span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Description</span>"<span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Contact</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.SingleContact, </span></pre>
                <pre class="code">
                  <span style="color: blue">CyberBizSoft.Domain</span>" <span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Address</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.Address,
CyberBizSoft.Domain</span>"<span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Street</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">Street</span>" <span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">City</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">City</span>" <span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">State</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">State</span>" <span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">ZipCodeNumber</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">ZipCodeNumber</span>" <span style="color: blue">/&gt;
&lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Country</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">Country</span>" <span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Phone</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.Phone,
CyberBizSoft.Domain</span>"<span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">FullNumber</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">PhoneNumber</span>"<span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Fax</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.Phone,
CyberBizSoft.Domain</span>"<span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">FullNumber</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">FaxNumber</span>"<span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">EMail</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.Url,
CyberBizSoft.Domain</span>"<span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">URL</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">EMailAddress</span>"<span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">component </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Web</span>" <span style="color: red">class</span><span style="color: blue">=</span>"<span style="color: blue">CBSI.Common.Domain.Url,
CyberBizSoft.Domain</span>"<span style="color: blue">&gt; &lt;</span><span style="color: #a31515">property </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">URL</span>" <span style="color: red">column</span><span style="color: blue">=</span>"<span style="color: blue">WebAddress</span>"<span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">component</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">class</span><span style="color: blue">&gt;
&lt;!--</span><span style="color: green">Copyright (c) 2001 - 2009 by CyberBizSoft,
Inc. All rights reserved.</span><span style="color: blue">--&gt; &lt;/</span><span style="color: #a31515">hibernate-mapping </span></pre>
                <a href="http://11011.net/software/vspaste">
                </a>
              </td>
              <td valign="top" width="6">
 </td>
            </tr>
            <tr>
              <td valign="top" width="6">
 </td>
              <td valign="top" width="758">
 </td>
              <td valign="top" width="6">
 </td>
            </tr>
          </tbody>
        </table>
        <p>
 
</p>
        <p>
Let's say that we have to create an interface only to change the Name and Description
of this Store. Why would we have to bring all the other information into the client
if we only need the Store's ID, Name &amp; maybe Description?
</p>
        <p>
Preferably we could create a very simple presentation data model (StoreNameModel)
which we could adorn with presentation specific attributes, 
</p>
        <pre class="code">
          <span style="color: blue">class </span>
          <span style="color: #2b91af">StoreNameModel </span>{
[<span style="color: #2b91af">Key</span>] <span style="color: blue">public long </span>ID
{ <span style="color: blue">get</span>; <span style="color: blue">set</span>; } [<span style="color: #2b91af">Required</span>] <span style="color: blue">public
string </span>Name { <span style="color: blue">get</span>; <span style="color: blue">set</span>;
} <span style="color: blue">public string </span>Description { <span style="color: blue">get</span>; <span style="color: blue">set</span>;
} }</pre>
        <p>
map the data from the Domain Store in the service to the StoreNameModel 
</p>
        <div align="left">
          <pre class="code">
            <span style="color: blue">public </span>
            <span style="color: #2b91af">IQueryable</span>&lt;<span style="color: #2b91af">StoreNameModel</span>&gt;
Stores() { <span style="color: blue">return from </span>c <span style="color: blue">in </span>Repository.All <span style="color: blue">orderby </span>(c.Name) <span style="color: blue">select
new </span><span style="color: #2b91af">StoreNameModel</span>() { ID = c.ID, Name
= c.Name, Description = c.Description }; }</pre>
          <p>
and then project it into the ViewModel in the client.
</p>
          <p>
            <font color="#ff0000">
              <strong>Update (4/23/10)</strong>
            </font>
          </p>
          <p>
I found this <a href="http://blogs.msdn.com/deepm/archive/2009/11/20/wcf-ria-services-presentation-model-explained.aspx" target="_blank">post</a> by <a href="http://blogs.msdn.com/deepm/" target="_blank">Deepesh
Mohnani</a> about the WCF RIA Presentation Model     
</p>
          <h4> 
</h4>
        </div>
        <div align="left">
          <pre class="code"> </pre>
        </div>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=4c1926a5-dac7-4901-b70a-3f0d56b747b3" />
      </body>
      <title>The Model in Presentation Patterns</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,4c1926a5-dac7-4901-b70a-3f0d56b747b3.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/04/21/TheModelInPresentationPatterns.aspx</link>
      <pubDate>Wed, 21 Apr 2010 18:43:46 GMT</pubDate>
      <description>&lt;p&gt;
When talking about the &lt;a title="Wikipedia Definition" href="http://en.wikipedia.org/wiki/Model_View_ViewModel" target="_blank"&gt;Model
View ViewModel&lt;/a&gt; (MVVM) , &lt;a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank"&gt;Model
View Controller&lt;/a&gt; (MVC) or any other presentation patterns Model some people refer
to it as the Database Model, others as the Domain Model. Well, it is actually referred
as a &lt;strong&gt;Presentation Data Model&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Your database or domain types could have many properties that the View does not care
about and it will be a waste of resources as well as a security risk to have all that
data traveling back and fourth the network even if it is an intranet.
&lt;/p&gt;
&lt;p&gt;
Another problem with using Database or Domain data in your MVVM is that any change
to the database or domain will require to update all the clients and that could be
very costly.
&lt;/p&gt;
&lt;p&gt;
Let's assume for example that we have the following very simple Domain Model:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/SSLDomain_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SSLDomain" border="0" alt="SSLDomain" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/SSLDomain_thumb_1.png" width="244" height="142" /&gt;&lt;/a&gt; &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
and the following Database Model:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/TheModelintheMVVMpatternisthePresentatio_9FDB/image_thumb.png" width="166" height="244" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Note: I created the Database Model using the following &lt;a title="NHibernate Forge" href="http://nhforge.org/" target="_blank"&gt;NHibernate&lt;/a&gt; mapping:
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2" width="772"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top" width="758"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top" width="758"&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;!--&lt;/span&gt;&lt;span style="color: green"&gt;Generated with CyberBizSoft's NHibernate
Helper on 12/16/2009 11:30:06 PM &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;hibernate-mapping &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;urn:nhibernate-mapping-2.2&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CyberBizSoft.SSL.Domain&lt;/span&gt;&amp;quot; &lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="color: red"&gt;namespace&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.SSL.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;class &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Store&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;table&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;SSLStores&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;lazy&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;false&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;id &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;ID&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;unsaved-value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;ID&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Int64&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;generator &lt;/span&gt;&lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;identity&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Name&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Description&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Contact&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.SingleContact, &lt;/span&gt;&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;CyberBizSoft.Domain&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Address&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.Address,
CyberBizSoft.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Street&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Street&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;City&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;City&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;State&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;State&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;ZipCodeNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;ZipCodeNumber&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Country&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Country&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Phone&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.Phone,
CyberBizSoft.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FullNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;PhoneNumber&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Fax&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.Phone,
CyberBizSoft.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FullNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FaxNumber&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;EMail&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.Url,
CyberBizSoft.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;URL&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;EMailAddress&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;component &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Web&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CBSI.Common.Domain.Url,
CyberBizSoft.Domain&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;property &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;URL&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;column&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;WebAddress&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;component&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;!--&lt;/span&gt;&lt;span style="color: green"&gt;Copyright (c) 2001 - 2009 by CyberBizSoft,
Inc. All rights reserved.&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;hibernate-mapping &lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top" width="758"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top" width="6"&gt;
&amp;#160;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Let's say that we have to create an interface only to change the Name and Description
of this Store. Why would we have to bring all the other information into the client
if we only need the Store's ID, Name &amp;amp; maybe Description?
&lt;/p&gt;
&lt;p&gt;
Preferably we could create a very simple presentation data model (StoreNameModel)
which we could adorn with presentation specific attributes, 
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StoreNameModel &lt;/span&gt;{
[&lt;span style="color: #2b91af"&gt;Key&lt;/span&gt;] &lt;span style="color: blue"&gt;public long &lt;/span&gt;ID
{ &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; } [&lt;span style="color: #2b91af"&gt;Required&lt;/span&gt;] &lt;span style="color: blue"&gt;public
string &lt;/span&gt;Name { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;;
} &lt;span style="color: blue"&gt;public string &lt;/span&gt;Description { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;;
} }&lt;/pre&gt;
&lt;p&gt;
map the data from the Domain Store in the service to the StoreNameModel 
&lt;/p&gt;
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IQueryable&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;StoreNameModel&lt;/span&gt;&amp;gt;
Stores() { &lt;span style="color: blue"&gt;return from &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;Repository.All &lt;span style="color: blue"&gt;orderby &lt;/span&gt;(c.Name) &lt;span style="color: blue"&gt;select
new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StoreNameModel&lt;/span&gt;() { ID = c.ID, Name
= c.Name, Description = c.Description }; }&lt;/pre&gt;
&lt;p&gt;
and then project it into the ViewModel in the client.
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;strong&gt;Update (4/23/10)&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
I found this &lt;a href="http://blogs.msdn.com/deepm/archive/2009/11/20/wcf-ria-services-presentation-model-explained.aspx" target="_blank"&gt;post&lt;/a&gt; by &lt;a href="http://blogs.msdn.com/deepm/" target="_blank"&gt;Deepesh
Mohnani&lt;/a&gt; about the WCF RIA Presentation Model&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;/p&gt;
&lt;h4&gt;&amp;#160;
&lt;/h4&gt;
&lt;/div&gt;
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&amp;#160;&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=4c1926a5-dac7-4901-b70a-3f0d56b747b3" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,4c1926a5-dac7-4901-b70a-3f0d56b747b3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=a8f92617-bf98-4b95-af1d-91b96c4bfc14</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,a8f92617-bf98-4b95-af1d-91b96c4bfc14.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,a8f92617-bf98-4b95-af1d-91b96c4bfc14.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a8f92617-bf98-4b95-af1d-91b96c4bfc14</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you create a Silverlight application using the WCF RIA Services Class library and
with the following <a href="http://msdn.microsoft.com/en-us/library/ee707351%28v=VS.91%29.aspx" target="_blank">walkthrough</a> when
you try to access the Context for the RIA application (WebContext) it is not there.
</p>
        <p>
Since we did not enabled the WCF RIA Services for the Silverlight application the
WebContext class is not generated in the client. 
</p>
        <p>
  <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_thumb.png" width="234" height="244" /></a></p>
        <p>
You can verify this by selecting the Silverlight application in the Solution Explorer,
click the Show All Files button in the Solution Explorer toolbar and then inspecting
the hidden "Generated_Code" folder.
</p>
        <p>
The workaround is to right click on the Silverlight application in the Solution Explorer,
select Properties and  temporarily enable the WCF RIA Services by selecting the
web project in the WCF RIA Service link.
</p>
        <p>
 <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_thumb_1.png" width="244" height="188" /></a></p>
        <p>
Then rebuild the solution find and copy the WebContext class in the file [YourServerAssemblyName].g.cs
in the afore mentioned folder to a new file WebContext.cs somewhere in the Silverlight
application project. 
</p>
        <p>
Now right click on the Silverlight application in the Solution Explorer again and
select &lt;No Project Set&gt; in the WCF RIA Service link and rebuild again. "Generated_Code"
folder content will be removed.
</p>
        <p>
This is kind of a hack and I believe it could be solved if the WCF RIA Services Class
Library template will check if the WebContext exists in the Silverlight application
and if not exist it will generate it.
</p>
        <p>
          <font color="#ff0000">Update (4/26/2010)</font>
        </p>
        <p>
If you move the WebContext.cs file to the WCF RIA Services library client make sure
to update your app.xaml with the following:
</p>
        <blockquote>
          <div align="left">
            <pre class="code">
              <span style="color: blue">&lt;</span>
              <span style="color: #a31515">app</span>
              <span style="color: blue">:</span>
              <span style="color: #a31515">WebContext</span>
              <span style="color: blue">&gt;
&lt;</span>
              <span style="color: #a31515">app</span>
              <span style="color: blue">:</span>
              <span style="color: #a31515">WebContext.Authentication</span>
              <span style="color: blue">&gt;
&lt;</span>
              <span style="color: #a31515">appsvc</span>
              <span style="color: blue">:</span>
              <span style="color: #a31515">FormsAuthentication</span>
            </pre>
          </div>
          <div align="left">
            <pre class="code">
              <span style="color: #a31515">
              </span>
              <span style="color: red">DomainContextType</span>
              <span style="color: blue">="[TheNamespaceOfYourRIALibrary].AuthenticationContext,</span>
            </pre>
          </div>
        </blockquote>
        <blockquote>
          <div align="left">
            <pre class="code">
              <span style="color: blue">[TheNameOfYourRIAClassAssembly ], Version=
[X].0.0.0"/&gt; </span>
              <span style="color: green">&lt;!--&lt;appsvc:WindowsAuthentication/&gt;--&gt; </span>
              <span style="color: blue">&lt;/</span>
              <span style="color: #a31515">app</span>
              <span style="color: blue">:</span>
              <span style="color: #a31515">WebContext.Authentication</span>
            </pre>
          </div>
          <div align="left">
            <pre class="code">
              <span style="color: #a31515">
              </span>
              <span style="color: blue"> &lt;/</span>
              <span style="color: #a31515">app</span>
              <span style="color: blue">:</span>
              <span style="color: #a31515">WebContext </span>
            </pre>
          </div>
        </blockquote>
        <a href="http://11011.net/software/vspaste">
        </a>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=a8f92617-bf98-4b95-af1d-91b96c4bfc14" />
      </body>
      <title>Creating a Silverlight Application with a WCF RIA Services Class Library</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,a8f92617-bf98-4b95-af1d-91b96c4bfc14.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/04/20/CreatingASilverlightApplicationWithAWCFRIAServicesClassLibrary.aspx</link>
      <pubDate>Tue, 20 Apr 2010 18:56:54 GMT</pubDate>
      <description>&lt;p&gt;
If you create a Silverlight application using the WCF RIA Services Class library and
with the following &lt;a href="http://msdn.microsoft.com/en-us/library/ee707351%28v=VS.91%29.aspx" target="_blank"&gt;walkthrough&lt;/a&gt; when
you try to access the Context for the RIA application (WebContext) it is not there.
&lt;/p&gt;
&lt;p&gt;
Since we did not enabled the WCF RIA Services for the Silverlight application the
WebContext class is not generated in the client. 
&lt;/p&gt;
&lt;p&gt;
&amp;#160; &lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_thumb.png" width="234" height="244" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You can verify this by selecting the Silverlight application in the Solution Explorer,
click the Show All Files button in the Solution Explorer toolbar and then inspecting
the hidden "Generated_Code" folder.
&lt;/p&gt;
&lt;p&gt;
The workaround is to right click on the Silverlight application in the Solution Explorer,
select Properties and&amp;#160; temporarily enable the WCF RIA Services by selecting the
web project in the WCF RIA Service link.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/CreatingaSilverlightApplicationwithaWCFR_CE68/image_thumb_1.png" width="244" height="188" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Then rebuild the solution find and copy the WebContext class in the file [YourServerAssemblyName].g.cs
in the afore mentioned folder to a new file WebContext.cs somewhere in the Silverlight
application project. 
&lt;/p&gt;
&lt;p&gt;
Now right click on the Silverlight application in the Solution Explorer again and
select &amp;lt;No Project Set&amp;gt; in the WCF RIA Service link and rebuild again. "Generated_Code"
folder content will be removed.
&lt;/p&gt;
&lt;p&gt;
This is kind of a hack and I believe it could be solved if the WCF RIA Services Class
Library template will check if the WebContext exists in the Silverlight application
and if not exist it will generate it.
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;Update (4/26/2010)&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If you move the WebContext.cs file to the WCF RIA Services library client make sure
to update your app.xaml with the following:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;app&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;WebContext&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;app&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;WebContext.Authentication&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;appsvc&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;FormsAuthentication&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&lt;span style="color: #a31515"&gt;&lt;/span&gt;&lt;span style="color: red"&gt;DomainContextType&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;[TheNamespaceOfYourRIALibrary].AuthenticationContext,&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;[TheNameOfYourRIAClassAssembly ], Version=
[X].0.0.0&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;!--&amp;lt;appsvc:WindowsAuthentication/&amp;gt;--&amp;gt; &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;app&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;WebContext.Authentication&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div align="left"&gt;
&lt;pre class="code"&gt;&lt;span style="color: #a31515"&gt;&lt;/span&gt;&lt;span style="color: blue"&gt; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;app&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;WebContext &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=a8f92617-bf98-4b95-af1d-91b96c4bfc14" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,a8f92617-bf98-4b95-af1d-91b96c4bfc14.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=fc4c09ff-1816-4806-bdfa-adf57065735f</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,fc4c09ff-1816-4806-bdfa-adf57065735f.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,fc4c09ff-1816-4806-bdfa-adf57065735f.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fc4c09ff-1816-4806-bdfa-adf57065735f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Digging through my old backups I found the following application that was one of the
first I built using Visual Studio for a private investigation firm way back in 1997: 
</p>
        <table cellspacing="0" cellpadding="0">
          <tbody>
            <tr>
              <td width="110">
              </td>
            </tr>
            <tr>
              <td>
              </td>
              <td>
                <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/IhavehadVisualStudioonmybeltforlongtime_C1E7/clip_image001%5B8%5D.gif">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001[8]" border="0" alt="clip_image001[8]" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/IhavehadVisualStudioonmybeltforlongtime_C1E7/clip_image001%5B8%5D_thumb.gif" width="244" height="178" />
                </a>
              </td>
            </tr>
          </tbody>
        </table>
        <p>
 
</p>
        <p>
It has been a long love-hate relationship with Visual Studio. Happy Birthday Visual
Studio! 
</p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=fc4c09ff-1816-4806-bdfa-adf57065735f" />
      </body>
      <title>I have had Visual Studio on my belt for long time</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,fc4c09ff-1816-4806-bdfa-adf57065735f.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/04/18/IHaveHadVisualStudioOnMyBeltForLongTime.aspx</link>
      <pubDate>Sun, 18 Apr 2010 17:41:08 GMT</pubDate>
      <description>&lt;p&gt;
Digging through my old backups I found the following application that was one of the
first I built using Visual Studio for a private investigation firm way back in 1997: 
&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="110"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/IhavehadVisualStudioonmybeltforlongtime_C1E7/clip_image001%5B8%5D.gif"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001[8]" border="0" alt="clip_image001[8]" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/IhavehadVisualStudioonmybeltforlongtime_C1E7/clip_image001%5B8%5D_thumb.gif" width="244" height="178" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
It has been a long love-hate relationship with Visual Studio. Happy Birthday Visual
Studio! 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=fc4c09ff-1816-4806-bdfa-adf57065735f" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,fc4c09ff-1816-4806-bdfa-adf57065735f.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=7ae3d215-f45d-431b-aa4a-af3d3d38d848</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,7ae3d215-f45d-431b-aa4a-af3d3d38d848.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,7ae3d215-f45d-431b-aa4a-af3d3d38d848.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7ae3d215-f45d-431b-aa4a-af3d3d38d848</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I completed the upgrade to VS 2010 but with some warnings. Apparently nothing important.
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_thumb_1.png" width="244" height="189" />
          </a>
        </p>
        <p>
[04/16/10,16:44:37] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'WinDiff.lnk'
could not be set.
</p>
        <p>
[04/16/10,16:44:37] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'OLE-COM
Object Viewer.lnk' could not be set.
</p>
        <p>
[04/16/10,16:44:38] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Manifest
Generation and Editing Tool.lnk' could not be set.
</p>
        <p>
[04/16/10,16:44:38] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Install
Microsoft FXCop.lnk' could not be set.
</p>
        <p>
***EndOfSession***
</p>
        <p>
 
</p>
        <p>
Here is my list: (I removed Visual Studio 2005 but not 2008)
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_thumb.png" width="189" height="244" />
          </a>
        </p>
        <p>
          <font color="#ff0000">UPDATE</font>
        </p>
        <p>
          <font color="#ff0000">
            <font color="#000000">Later today (4/17/2010) I noticed the
following entries in the Application Event Log:</font>
          </font>
        </p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetEntityDataModelVB_ASPNET.zip),
file (ModelObjectItemVB_ASPNET.vstemplate). Invalid template element (TemplateID)
value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemVB_ASPNET). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetEntityDataModelCSharp_ASPNET.zip),
file (ModelObjectItemCS_ASPNET.vstemplate). Invalid template element (TemplateID)
value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemCS_ASPNET). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetDataServiceCSharpWebsite.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetDataServiceCSharpWebsite.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\VisualBasic\Web\1033\AdoNetDataServiceVBWap.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\VisualBasic\Web\1033\AdoNetDataServiceVBWap.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\AdoNetDataServiceCSharpWap.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID). 
</p>
        <p>
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\AdoNetDataServiceCSharpWap.zip),
file (WebDataService.vstemplate).  Unknown attribute (_locID).
</p>
        <p>
 
</p>
        <p>
Although all these Item Templates where present, I ran "DevEnv.exe /installvstemplates"
from an Administrator Visual Studio Command Prompt (2010) just in case. 
</p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=7ae3d215-f45d-431b-aa4a-af3d3d38d848" />
      </body>
      <title>Spring Cleaning</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,7ae3d215-f45d-431b-aa4a-af3d3d38d848.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/04/17/SpringCleaning.aspx</link>
      <pubDate>Sat, 17 Apr 2010 04:23:50 GMT</pubDate>
      <description>&lt;p&gt;
I completed the upgrade to VS 2010 but with some warnings. Apparently nothing important.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_thumb_1.png" width="244" height="189" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
[04/16/10,16:44:37] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'WinDiff.lnk'
could not be set.
&lt;/p&gt;
&lt;p&gt;
[04/16/10,16:44:37] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'OLE-COM
Object Viewer.lnk' could not be set.
&lt;/p&gt;
&lt;p&gt;
[04/16/10,16:44:38] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Manifest
Generation and Editing Tool.lnk' could not be set.
&lt;/p&gt;
&lt;p&gt;
[04/16/10,16:44:38] Microsoft Visual Studio 2010 Professional - ENU: [2] WARNING:Warning
1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Install
Microsoft FXCop.lnk' could not be set.
&lt;/p&gt;
&lt;p&gt;
***EndOfSession***
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Here is my list: (I removed Visual Studio 2005 but not 2008)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/SpringCleaning_6FD/image_thumb.png" width="189" height="244" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;UPDATE&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;font color="#000000"&gt;Later today (4/17/2010) I noticed the
following entries in the Application Event Log:&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetEntityDataModelVB_ASPNET.zip),
file (ModelObjectItemVB_ASPNET.vstemplate). Invalid template element (TemplateID)
value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemVB_ASPNET). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetEntityDataModelCSharp_ASPNET.zip),
file (ModelObjectItemCS_ASPNET.vstemplate). Invalid template element (TemplateID)
value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemCS_ASPNET). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetDataServiceCSharpWebsite.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetDataServiceCSharpWebsite.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\VisualBasic\Web\1033\AdoNetDataServiceVBWap.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\VisualBasic\Web\1033\AdoNetDataServiceVBWap.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\AdoNetDataServiceCSharpWap.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID). 
&lt;/p&gt;
&lt;p&gt;
Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\AdoNetDataServiceCSharpWap.zip),
file (WebDataService.vstemplate).&amp;#160; Unknown attribute (_locID).
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Although all these Item Templates where present, I ran "DevEnv.exe /installvstemplates"
from an Administrator Visual Studio Command Prompt (2010) just in case. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=7ae3d215-f45d-431b-aa4a-af3d3d38d848" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,7ae3d215-f45d-431b-aa4a-af3d3d38d848.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=497f5736-38c0-44f4-81ea-8cb37e2d373e</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,497f5736-38c0-44f4-81ea-8cb37e2d373e.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,497f5736-38c0-44f4-81ea-8cb37e2d373e.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=497f5736-38c0-44f4-81ea-8cb37e2d373e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
For professional health providers who need to concentrate on providing the best solution
to patient's health problems, the <a title="The Accounting Engine's Medical Facility Manager" href="http://medicalfacilitymanager.com" target="_blank">Medical
Facility Manager</a> is a health information management system that provides a single
point of access to the practice information to providers, patients and vendors. The
system will store all internal and external transactions within the facility by keeping
record of every interaction between patients and providers including accounting. The
system will save facilities 40 percent of clerical costs in the first year of use
by allowing patients to self-register, schedule appointments and retrieving tests
results online. Furthermore it will allow facilities to save on accounting costs since
it implements claims, billing, payroll and general accounting tasks by using The Accounting
Engine. Unlike the current antiquated systems with poor security record and insecure
slow manual systems, Medical Facility Manager implements state of the art security
and backup sub-systems and will comply with federal and state government security
and reporting requirements.
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/MedicalFacilityManager_A7E2/clip_image002_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/MedicalFacilityManager_A7E2/clip_image002_thumb.jpg" width="244" height="196" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=497f5736-38c0-44f4-81ea-8cb37e2d373e" />
      </body>
      <title>Medical Facility Manager</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,497f5736-38c0-44f4-81ea-8cb37e2d373e.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/02/16/MedicalFacilityManager.aspx</link>
      <pubDate>Tue, 16 Feb 2010 16:54:55 GMT</pubDate>
      <description>&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
For professional health providers who need to concentrate on providing the best solution
to patient's health problems, the &lt;a title="The Accounting Engine&amp;#39;s Medical Facility Manager" href="http://medicalfacilitymanager.com" target="_blank"&gt;Medical
Facility Manager&lt;/a&gt; is a health information management system that provides a single
point of access to the practice information to providers, patients and vendors. The
system will store all internal and external transactions within the facility by keeping
record of every interaction between patients and providers including accounting. The
system will save facilities 40 percent of clerical costs in the first year of use
by allowing patients to self-register, schedule appointments and retrieving tests
results online. Furthermore it will allow facilities to save on accounting costs since
it implements claims, billing, payroll and general accounting tasks by using The Accounting
Engine. Unlike the current antiquated systems with poor security record and insecure
slow manual systems, Medical Facility Manager implements state of the art security
and backup sub-systems and will comply with federal and state government security
and reporting requirements.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/MedicalFacilityManager_A7E2/clip_image002_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/MedicalFacilityManager_A7E2/clip_image002_thumb.jpg" width="244" height="196" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=497f5736-38c0-44f4-81ea-8cb37e2d373e" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,497f5736-38c0-44f4-81ea-8cb37e2d373e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=bfae3278-d63c-40ed-9b51-3f1681309b2e</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,bfae3278-d63c-40ed-9b51-3f1681309b2e.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,bfae3278-d63c-40ed-9b51-3f1681309b2e.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bfae3278-d63c-40ed-9b51-3f1681309b2e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the advantages of open source software is that it assist in troubleshooting
and solving errors in your application.
</p>
        <p>
Recently I ran into the following problem with ASP.NET MVC 2.0 RC.
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb.png" width="644" height="397" />
          </a>  
</p>
        <p>
After some searching I found the following post:
</p>
        <p>
          <a href="http://stackoverflow.com/questions/1936970/asp-net-mvc-2-problem-with-updatemodel" target="_blank">ASP.NET
MVC 2 problem with UpdateModel</a>
        </p>
        <p>
I downloaded the <a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423" target="_blank">ASP.NET
MVC 2 RC</a> source code, extracted the zip file, located the offending method and
commented out the problem:
</p>
        <div align="left">
          <pre class="code">
            <span style="color: blue">public sealed class </span>
            <span style="color: #2b91af">FormCollection </span>: <span style="color: #2b91af">NameValueCollection</span>, <span style="color: #2b91af">IValueProvider </span>{ <span style="color: blue">public </span>FormCollection()
{ } <span style="color: blue">public </span>FormCollection(<span style="color: #2b91af">NameValueCollection </span>collection)
{ <span style="color: blue">if </span>(collection == <span style="color: blue">null</span>)
{ <span style="color: blue">throw new </span><span style="color: #2b91af">ArgumentNullException</span>(<span style="color: #a31515">"collection"</span>);
} Add(collection); } <span style="color: blue">public </span><span style="color: #2b91af">ValueProviderResult </span>GetValue(<span style="color: blue">string </span>name)
{</pre>
          <pre class="code">
            <strong>
              <font color="#ff0000" size="4">Commented Code</font>
            </strong>
            <span style="color: green">//if
(String.IsNullOrEmpty(name)) { // throw new ArgumentException(MvcResources.Common_NullOrEmpty,
"name"); //} </span>
            <span style="color: blue">string</span>[] rawValue =
GetValues(name); <span style="color: blue">if </span>(rawValue == <span style="color: blue">null</span>)
{ <span style="color: blue">return null</span>; } <span style="color: blue">string </span>attemptedValue
= <span style="color: blue">this</span>[name]; <span style="color: blue">return new </span><span style="color: #2b91af">ValueProviderResult</span>(rawValue,
attemptedValue, <span style="color: #2b91af">CultureInfo</span>.CurrentCulture); } <span style="color: blue">public </span><span style="color: #2b91af">IValueProvider </span>ToValueProvider()
{ <span style="color: blue">return this</span>; } <span style="color: blue">#region </span>IValueProvider
Members <span style="color: blue">bool </span><span style="color: #2b91af">IValueProvider</span>.ContainsPrefix(<span style="color: blue">string </span>prefix)
{ <span style="color: blue">return </span><span style="color: #2b91af">ValueProviderUtil</span>.CollectionContainsPrefix(AllKeys,
prefix); } <span style="color: #2b91af">ValueProviderResult IValueProvider</span>.GetValue(<span style="color: blue">string </span>key)
{ <span style="color: blue">return </span>GetValue(key); } <span style="color: blue">#endregion
private sealed class </span><span style="color: #2b91af">FormCollectionBinderAttribute </span>: <span style="color: #2b91af">CustomModelBinderAttribute </span>{ <span style="color: green">//
since the FormCollectionModelBinder.BindModel() method is thread-safe, we only need
to keep // a single instance of the binder around </span><span style="color: blue">private
static readonly </span><span style="color: #2b91af">FormCollectionModelBinder </span>_binder
= <span style="color: blue">new </span><span style="color: #2b91af">FormCollectionModelBinder</span>(); <span style="color: blue">public
override </span><span style="color: #2b91af">IModelBinder </span>GetBinder() { <span style="color: blue">return </span>_binder;
} <span style="color: green">// this class is used for generating a FormCollection
object </span><span style="color: blue">private sealed class </span><span style="color: #2b91af">FormCollectionModelBinder </span>: <span style="color: #2b91af">IModelBinder </span>{ <span style="color: blue">public
object </span>BindModel(<span style="color: #2b91af">ControllerContext </span>controllerContext, <span style="color: #2b91af">ModelBindingContext </span>bindingContext)
{ <span style="color: blue">if </span>(controllerContext == <span style="color: blue">null</span>)
{ <span style="color: blue">throw new </span><span style="color: #2b91af">ArgumentNullException</span>(<span style="color: #a31515">"controllerContext"</span>);
} <span style="color: blue">return new </span><span style="color: #2b91af">FormCollection</span>(controllerContext.HttpContext.Request.Form);
} } } } }</pre>
        </div>
        <a href="http://11011.net/software/vspaste">
        </a>
        <p>
 
</p>
        <h1>
        </h1>
        <p>
After the solution was built,  I copied the output to the Libraries folder of
the application:
</p>
        <p>
 <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb_1.png" width="644" height="307" /></a></p>
        <p>
Removed the existing reference to System.Web.Mvc from the MVC Application and created
a reference the the System.Web.Mvc in the Libraries folder.
</p>
        <p>
          <a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb_2.png" width="644" height="469" />
          </a>  
</p>
        <p>
 
</p>
        <p>
        </p>
        <p>
Then I commented out the  System.Web.Mvc GAC-version reference from web.config: 
</p>
        <pre class="code">
          <font size="1">
            <span style="color: blue">&lt;</span>
            <span style="color: #a31515">compilation </span>
            <span style="color: red">debug</span>
            <span style="color: blue">=</span>"<span style="color: blue">true</span>"</font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">assemblies</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Core,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Web.Abstractions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Web.Routing,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;!--</span>
            <span style="color: green">&lt;add assembly="System.Web.Mvc, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
/&gt;</span>
          </font>
          <font size="1">
            <span style="color: blue">--&gt; &lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Xml.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Data.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">Microsoft.ReportViewer.WebForms,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">Microsoft.ReportViewer.Common,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;/</span>
            <span style="color: #a31515">assemblies</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">buildProviders</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">extension</span>
            <span style="color: blue">=</span>"<span style="color: blue">.rdlc</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">Microsoft.Reporting.RdlBuildProvider,
Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;/</span>
            <span style="color: #a31515">buildProviders</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;/</span>
            <span style="color: #a31515">compilation</span>
            <span style="color: blue">&gt;</span>
          </font>
        </pre>
        <p align="left">
and updated the /Views/web.config: (Replaced PublicKeyToken=31bf3856ad364e35 with
PublicKeyToken=null)
</p>
        <pre class="code">
          <font size="1">
            <span style="color: blue">&lt;</span>
            <span style="color: #a31515">pages </span>
            <span style="color: red">validateRequest</span>
            <span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">pageParserFilterType</span><span style="color: blue">=</span>"<span style="color: blue">System.Web.Mvc.ViewTypeParserFilter,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</span>" <span style="color: red">pageBaseType</span><span style="color: blue">=</span>"<span style="color: blue">System.Web.Mvc.ViewPage,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</span>" <span style="color: red">userControlBaseType</span><span style="color: blue">=</span>"<span style="color: blue">System.Web.Mvc.ViewUserControl,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</span>"</font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">controls</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;</span>
            <span style="color: #a31515">add </span>
            <span style="color: red">assembly</span>
            <span style="color: blue">=</span>"<span style="color: blue">System.Web.Mvc,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</span>" <span style="color: red">namespace</span><span style="color: blue">=</span>"<span style="color: blue">System.Web.Mvc</span>" <span style="color: red">tagPrefix</span><span style="color: blue">=</span>"<span style="color: blue">mvc</span>" </font>
          <font size="1">
            <span style="color: blue">/&gt;
&lt;/</span>
            <span style="color: #a31515">controls</span>
          </font>
          <font size="1">
            <span style="color: blue">&gt;
&lt;/</span>
            <span style="color: #a31515">pages</span>
          </font>
          <span style="color: blue">
            <font size="1">&gt;
&lt;!--</font>
          </span>
          <font size="1">
            <span style="color: green">&lt;pages validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" userControlBaseType="System.Web.Mvc.ViewUserControl,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL"&gt; &lt;controls&gt; &lt;add assembly="System.Web.Mvc,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
namespace="System.Web.Mvc" tagPrefix="mvc" /&gt; &lt;/controls&gt;
&lt;/pages&gt;</span>
            <span style="color: blue">--&gt;</span>
          </font>
        </pre>
        <a href="http://11011.net/software/vspaste">
        </a>
        <p>
          <a href="http://11011.net/software/vspaste"> </a>
        </p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=bfae3278-d63c-40ed-9b51-3f1681309b2e" />
      </body>
      <title>Using the ASP.NET MVC 2.0 RC source code to correct a bug</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,bfae3278-d63c-40ed-9b51-3f1681309b2e.aspx</guid>
      <link>http://www.blogs.victorero.com/2010/01/21/UsingTheASPNETMVC20RCSourceCodeToCorrectABug.aspx</link>
      <pubDate>Thu, 21 Jan 2010 21:48:01 GMT</pubDate>
      <description>&lt;p&gt;
One of the advantages of open source software is that it assist in troubleshooting
and solving errors in your application.
&lt;/p&gt;
&lt;p&gt;
Recently I ran into the following problem with ASP.NET MVC 2.0 RC.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb.png" width="644" height="397" /&gt;&lt;/a&gt;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
After some searching I found the following post:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://stackoverflow.com/questions/1936970/asp-net-mvc-2-problem-with-updatemodel" target="_blank"&gt;ASP.NET
MVC 2 problem with UpdateModel&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I downloaded the &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423" target="_blank"&gt;ASP.NET
MVC 2 RC&lt;/a&gt; source code, extracted the zip file, located the offending method and
commented out the problem:
&lt;/p&gt;
&lt;div align="left"&gt;
&lt;pre class="code"&gt;    &lt;span style="color: blue"&gt;public sealed class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollection &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;NameValueCollection&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;IValueProvider &lt;/span&gt;{ &lt;span style="color: blue"&gt;public &lt;/span&gt;FormCollection()
{ } &lt;span style="color: blue"&gt;public &lt;/span&gt;FormCollection(&lt;span style="color: #2b91af"&gt;NameValueCollection &lt;/span&gt;collection)
{ &lt;span style="color: blue"&gt;if &lt;/span&gt;(collection == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
{ &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;collection&amp;quot;&lt;/span&gt;);
} Add(collection); } &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValueProviderResult &lt;/span&gt;GetValue(&lt;span style="color: blue"&gt;string &lt;/span&gt;name)
{&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;strong&gt;&lt;font color="#ff0000" size="4"&gt;Commented Code&lt;/font&gt;&lt;/strong&gt; &lt;span style="color: green"&gt;//if
(String.IsNullOrEmpty(name)) { // throw new ArgumentException(MvcResources.Common_NullOrEmpty,
&amp;quot;name&amp;quot;); //} &lt;/span&gt;&lt;span style="color: blue"&gt;string&lt;/span&gt;[] rawValue =
GetValues(name); &lt;span style="color: blue"&gt;if &lt;/span&gt;(rawValue == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
{ &lt;span style="color: blue"&gt;return null&lt;/span&gt;; } &lt;span style="color: blue"&gt;string &lt;/span&gt;attemptedValue
= &lt;span style="color: blue"&gt;this&lt;/span&gt;[name]; &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValueProviderResult&lt;/span&gt;(rawValue,
attemptedValue, &lt;span style="color: #2b91af"&gt;CultureInfo&lt;/span&gt;.CurrentCulture); } &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IValueProvider &lt;/span&gt;ToValueProvider()
{ &lt;span style="color: blue"&gt;return this&lt;/span&gt;; } &lt;span style="color: blue"&gt;#region &lt;/span&gt;IValueProvider
Members &lt;span style="color: blue"&gt;bool &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IValueProvider&lt;/span&gt;.ContainsPrefix(&lt;span style="color: blue"&gt;string &lt;/span&gt;prefix)
{ &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValueProviderUtil&lt;/span&gt;.CollectionContainsPrefix(AllKeys,
prefix); } &lt;span style="color: #2b91af"&gt;ValueProviderResult IValueProvider&lt;/span&gt;.GetValue(&lt;span style="color: blue"&gt;string &lt;/span&gt;key)
{ &lt;span style="color: blue"&gt;return &lt;/span&gt;GetValue(key); } &lt;span style="color: blue"&gt;#endregion
private sealed class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollectionBinderAttribute &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;CustomModelBinderAttribute &lt;/span&gt;{ &lt;span style="color: green"&gt;//
since the FormCollectionModelBinder.BindModel() method is thread-safe, we only need
to keep // a single instance of the binder around &lt;/span&gt;&lt;span style="color: blue"&gt;private
static readonly &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollectionModelBinder &lt;/span&gt;_binder
= &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollectionModelBinder&lt;/span&gt;(); &lt;span style="color: blue"&gt;public
override &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IModelBinder &lt;/span&gt;GetBinder() { &lt;span style="color: blue"&gt;return &lt;/span&gt;_binder;
} &lt;span style="color: green"&gt;// this class is used for generating a FormCollection
object &lt;/span&gt;&lt;span style="color: blue"&gt;private sealed class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollectionModelBinder &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IModelBinder &lt;/span&gt;{ &lt;span style="color: blue"&gt;public
object &lt;/span&gt;BindModel(&lt;span style="color: #2b91af"&gt;ControllerContext &lt;/span&gt;controllerContext, &lt;span style="color: #2b91af"&gt;ModelBindingContext &lt;/span&gt;bindingContext)
{ &lt;span style="color: blue"&gt;if &lt;/span&gt;(controllerContext == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
{ &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;controllerContext&amp;quot;&lt;/span&gt;);
} &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FormCollection&lt;/span&gt;(controllerContext.HttpContext.Request.Form);
} } } } }&lt;/pre&gt;
&lt;/div&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h1&gt;
&lt;/h1&gt;
&lt;p&gt;
After the solution was built,&amp;#160; I copied the output to the Libraries folder of
the application:
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb_1.png" width="644" height="307" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Removed the existing reference to System.Web.Mvc from the MVC Application and created
a reference the the System.Web.Mvc in the Libraries folder.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogs.victorero.com/content/binary/WindowsLiveWriter/UsingtheASP.N.0RCsourcecodetocorrectabug_DAA4/image_thumb_2.png" width="644" height="469" /&gt;&lt;/a&gt;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Then I commented out the&amp;#160; System.Web.Mvc GAC-version reference from web.config: 
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;compilation &lt;/span&gt;&lt;span style="color: red"&gt;debug&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblies&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Core,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Abstractions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Routing,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;!--&lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;add assembly=&amp;quot;System.Web.Mvc, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&amp;quot;
/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;--&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Xml.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Microsoft.ReportViewer.WebForms,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Microsoft.ReportViewer.Common,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblies&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;buildProviders&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;extension&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;.rdlc&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Microsoft.Reporting.RdlBuildProvider,
Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;buildProviders&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;compilation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p align="left"&gt;
and updated the /Views/web.config: (Replaced PublicKeyToken=31bf3856ad364e35 with
PublicKeyToken=null)
&lt;/p&gt;
&lt;pre class="code"&gt; &lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;pages &lt;/span&gt;&lt;span style="color: red"&gt;validateRequest&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;false&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;pageParserFilterType&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc.ViewTypeParserFilter,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;pageBaseType&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc.ViewPage,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;userControlBaseType&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc.ViewUserControl,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL&lt;/span&gt;&amp;quot;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;controls&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;namespace&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;tagPrefix&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;mvc&lt;/span&gt;&amp;quot; &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;controls&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;pages&lt;/span&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="1"&gt;&amp;gt;
&amp;lt;!--&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: green"&gt;&amp;lt;pages validateRequest=&amp;quot;false&amp;quot;
pageParserFilterType=&amp;quot;System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&amp;quot;
pageBaseType=&amp;quot;System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&amp;quot; userControlBaseType=&amp;quot;System.Web.Mvc.ViewUserControl,
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL&amp;quot;&amp;gt; &amp;lt;controls&amp;gt; &amp;lt;add assembly=&amp;quot;System.Web.Mvc,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&amp;quot;
namespace=&amp;quot;System.Web.Mvc&amp;quot; tagPrefix=&amp;quot;mvc&amp;quot; /&amp;gt; &amp;lt;/controls&amp;gt;
&amp;lt;/pages&amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&amp;#160;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=bfae3278-d63c-40ed-9b51-3f1681309b2e" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,bfae3278-d63c-40ed-9b51-3f1681309b2e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.blogs.victorero.com/Trackback.aspx?guid=92aac207-8b1d-4343-b879-dd1692d47cc2</trackback:ping>
      <pingback:server>http://www.blogs.victorero.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.blogs.victorero.com/PermaLink,guid,92aac207-8b1d-4343-b879-dd1692d47cc2.aspx</pingback:target>
      <dc:creator>Santos Ray Victorero, II</dc:creator>
      <wfw:comment>http://www.blogs.victorero.com/CommentView,guid,92aac207-8b1d-4343-b879-dd1692d47cc2.aspx</wfw:comment>
      <wfw:commentRss>http://www.blogs.victorero.com/SyndicationService.asmx/GetEntryCommentsRss?guid=92aac207-8b1d-4343-b879-dd1692d47cc2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This morning when I turned on my development computer I had the intention to re-factor
some WPF user controls but every time I tried to open any of them in the designer
Visual Studio 2008 will crash without any warning.
</p>
        <p>
When I opened the Application error log I found the following message:  
</p>
        <p>
Log Name:      Application 
<br />
Source:        .NET Runtime 
<br />
Date:          3/26/2009 11:07:53 AM 
<br />
Event ID:      1023 
<br />
Task Category: None 
<br />
Level:         Error 
<br />
Keywords:      Classic 
<br />
User:          N/A 
<br />
Computer:      SRV.Dev.CyberBizSoft.com 
<br />
Description: 
<br />
.NET Runtime version 2.0.50727.3074 - Fatal Execution Engine Error (70FC5FC0) (80131506) 
<br />
Event Xml: 
<br /><span style="color: blue">&lt;</span><span style="color: #a31515">Event</span><span style="color: red">xmlns</span><span style="color: blue">=</span>"<span style="color: blue">http://schemas.microsoft.com/win/2004/08/events/event</span>"<span style="color: blue">&gt; 
<br />
    &lt;</span><span style="color: #a31515">System</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Provider</span><span style="color: red">Name</span><span style="color: blue">=</span>"<span style="color: blue">.NET
Runtime</span>" <span style="color: blue">/&gt; 
<br />
        &lt;</span><span style="color: #a31515">EventID </span><span style="color: red">Qualifiers</span><span style="color: blue">=</span>"<span style="color: blue">0</span>"<span style="color: blue">&gt;</span>1023<span style="color: blue">&lt;/</span><span style="color: #a31515">EventID</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Level</span><span style="color: blue">&gt;</span>2<span style="color: blue">&lt;/</span><span style="color: #a31515">Level</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Task</span><span style="color: blue">&gt;</span>0<span style="color: blue">&lt;/</span><span style="color: #a31515">Task</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Keywords</span><span style="color: blue">&gt;</span>0x80000000000000<span style="color: blue">&lt;/</span><span style="color: #a31515">Keywords</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">TimeCreated </span><span style="color: red">SystemTime</span><span style="color: blue">=</span>"<span style="color: blue">2009-03-26T15:07:53.000Z</span>" <span style="color: blue">/&gt; 
<br />
        &lt;</span><span style="color: #a31515">EventRecordID</span><span style="color: blue">&gt;</span>186149<span style="color: blue">&lt;/</span><span style="color: #a31515">EventRecordID</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Channel</span><span style="color: blue">&gt;</span>Application<span style="color: blue">&lt;/</span><span style="color: #a31515">Channel</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Computer</span><span style="color: blue">&gt;</span>SRV.Dev.CyberBizSoft.com<span style="color: blue">&lt;/</span><span style="color: #a31515">Computer</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Security</span><span style="color: blue">/&gt; 
<br />
    &lt;/</span><span style="color: #a31515">System</span><span style="color: blue">&gt; 
<br />
    &lt;</span><span style="color: #a31515">EventData</span><span style="color: blue">&gt; 
<br />
        &lt;</span><span style="color: #a31515">Data</span><span style="color: blue">&gt;</span>.NET
Runtime version 2.0.50727.3074 - Fatal Execution Engine Error (70FC5FC0) (80131506)
</p>
        <pre class="code">
          <span style="color: blue">&lt;/</span>
          <span style="color: #a31515">Data</span>
          <span style="color: blue">&gt;
&lt;/</span>
          <span style="color: #a31515">EventData</span>
          <span style="color: blue">&gt;
&lt;/</span>
          <span style="color: #a31515">Event</span>
          <span style="color: blue">&gt;</span>
        </pre>
        <p>
          <span style="color: blue">
          </span>
          <span style="color: blue">
          </span>
        </p>
        <p>
After some online searching I found the following <a href="http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/62d3ab35-8536-4a96-91fa-3e81c66186a9" target="_blank">thread</a> with
this <a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&amp;wa=wsignin1.0  " target="_blank">link</a> to
a hotfix to this problem.  
</p>
        <img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=92aac207-8b1d-4343-b879-dd1692d47cc2" />
      </body>
      <title>Visual Studio 2008 Disappearing Act</title>
      <guid isPermaLink="false">http://www.blogs.victorero.com/PermaLink,guid,92aac207-8b1d-4343-b879-dd1692d47cc2.aspx</guid>
      <link>http://www.blogs.victorero.com/2009/03/27/VisualStudio2008DisappearingAct.aspx</link>
      <pubDate>Fri, 27 Mar 2009 02:43:16 GMT</pubDate>
      <description>&lt;p&gt;
This morning when I turned on my development computer I had the intention to re-factor
some WPF user controls but every time I tried to open any of them in the designer
Visual Studio 2008 will crash without any warning.
&lt;/p&gt;
&lt;p&gt;
When I opened the Application error log I found the following message:&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
Log Name:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Application 
&lt;br /&gt;
Source:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .NET Runtime 
&lt;br /&gt;
Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3/26/2009 11:07:53 AM 
&lt;br /&gt;
Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1023 
&lt;br /&gt;
Task Category: None 
&lt;br /&gt;
Level:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Error 
&lt;br /&gt;
Keywords:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Classic 
&lt;br /&gt;
User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A 
&lt;br /&gt;
Computer:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SRV.Dev.CyberBizSoft.com 
&lt;br /&gt;
Description: 
&lt;br /&gt;
.NET Runtime version 2.0.50727.3074 - Fatal Execution Engine Error (70FC5FC0) (80131506) 
&lt;br /&gt;
Event Xml: 
&lt;br /&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Event&lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://schemas.microsoft.com/win/2004/08/events/event&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;System&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Provider&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;.NET
Runtime&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventID &lt;/span&gt;&lt;span style="color: red"&gt;Qualifiers&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;0&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;1023&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Level&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;2&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Level&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Task&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Task&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Keywords&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0x80000000000000&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Keywords&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TimeCreated &lt;/span&gt;&lt;span style="color: red"&gt;SystemTime&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;2009-03-26T15:07:53.000Z&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventRecordID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;186149&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventRecordID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Channel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Application&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Channel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Computer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;SRV.Dev.CyberBizSoft.com&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Computer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Security&lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;System&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventData&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Data&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;.NET
Runtime version 2.0.50727.3074 - Fatal Execution Engine Error (70FC5FC0) (80131506)
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Data&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;EventData&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Event&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
After some online searching I found the following &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/62d3ab35-8536-4a96-91fa-3e81c66186a9" target="_blank"&gt;thread&lt;/a&gt; with
this &lt;a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&amp;amp;wa=wsignin1.0  " target="_blank"&gt;link&lt;/a&gt; to
a hotfix to this problem.&amp;#160; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.blogs.victorero.com/aggbug.ashx?id=92aac207-8b1d-4343-b879-dd1692d47cc2" /&gt;</description>
      <comments>http://www.blogs.victorero.com/CommentView,guid,92aac207-8b1d-4343-b879-dd1692d47cc2.aspx</comments>
    </item>
  </channel>
</rss>