<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.claritycon.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Peterson&amp;#39;s Ponderings</title><subtitle type="html">Technical findings, ideas, thoughts and news directly from me.</subtitle><id>http://blogs.claritycon.com/blogs/don_peterson/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.claritycon.com/blogs/don_peterson/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.20917.1142">Community Server</generator><updated>2007-03-24T11:38:00Z</updated><entry><title>Microsoft Synchronization Framework - Worth a Look</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2008/06/29/microsoft-synchronization-framework-worth-a-look.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/06/29/microsoft-synchronization-framework-worth-a-look.aspx</id><published>2008-06-29T19:41:00Z</published><updated>2008-06-29T19:41:00Z</updated><content type="html">&lt;p&gt;At TechEd earlier this month I attended some sessions on the new Microsoft Sync Framework that was just released as CTP2.&amp;nbsp; Synchronizing data to a mobile device and between home office and remote locations has been a feature of several systems I&amp;#39;ve worked on in the past.&amp;nbsp; There were always challenges in this type of functionality and no real good &amp;#39;fit&amp;#39; that you could easily implement out-of-the-box before.&amp;nbsp; In writing my own customized sync features for applications in the past,&amp;nbsp;I can appreciate the complexities involved which is why at first glance I&amp;#39;m impressed by the range of features available in the Microsoft Sync Framework.&amp;nbsp; Here is a list of the primary features of the framework:&lt;/p&gt;
&lt;p&gt;- Different sync topologies are supported including hub and spoke (central system sync to remote systems), one-way syncs, and peer to peer.&lt;/p&gt;
&lt;p&gt;- Conflict detection and resolution&lt;/p&gt;
&lt;p&gt;- Supports sync of database to database, database to SQL CE, file system, feed syncs (Mesh), and you can create your own synchronization custom provider to sync any other special forms of data you may have.&lt;/p&gt;
&lt;p&gt;- Supports unreliable networks, interruptions and partial syncs&lt;/p&gt;
&lt;p&gt;- Operates over arbitrary protocols&lt;/p&gt;
&lt;p&gt;The functionality is pretty baked at this point as it has entered a CTP2 version and will be released in conjunction with SQL Server 2008 later this year.&amp;nbsp; With the proliferation of smart mobile devices I can only see good things for having this kind of tool in your coding tool kit to easily give LOB applications offline and remote capabilities that can easily sync up with a central system when they come back online.&amp;nbsp; For a download of the framework and detailed documentation on how the sync process works (the concept of &amp;quot;Knowledge&amp;quot; between the sync&amp;#39;ing systems) see the MSDN home site for the &lt;a class="" title="Microsoft Sync Framework" href="http://msdn.microsoft.com/en-us/sync/default.aspx" target="_blank"&gt;Microsoft Sync Framework&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=6301" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Microsoft SQL Server" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+SQL+Server/default.aspx" /><category term="Visual Studio 2008" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Visual+Studio+2008/default.aspx" /></entry><entry><title>SQL Server Reporting Services Subscriptions with custom security</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2008/05/28/sql-server-reporting-services-subscriptions-with-custom-security.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/05/28/sql-server-reporting-services-subscriptions-with-custom-security.aspx</id><published>2008-05-28T12:38:00Z</published><updated>2008-05-28T12:38:00Z</updated><content type="html">&lt;p&gt;I ran into an interesting &amp;#39;gotcha&amp;#39; when working with an SSRS site that has a custom security extension implemented (instead of using the built in Windows authentication model, see the &lt;a class="" title="MSDN SSRS security extension" href="http://msdn.microsoft.com/en-us/library/ms160724.aspx"&gt;MSDN security extension&lt;/a&gt; example).&amp;nbsp; The problem was that when users had set up a subscription through the SSRS web site that requested a copy of the report (such as in pdf or excel format), the subscription would fail to run.&amp;nbsp; Looking in the SSRS I&amp;#39;d see error entries similar to the following:&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;ReportingServicesService!library!13!05/27/2008-14:00:16:: i INFO: Call to RenderFirst( &amp;#39;/Financial Reports/Virtual Bookstore Sales By Term&amp;#39; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;ReportingServicesService!library!13!05/27/2008-14:00:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---&amp;gt; System.TypeInitializationException: The type initializer for &amp;#39;Framework.SystemConfiguration&amp;#39; threw an exception. ---&amp;gt; System.ApplicationException: Can not find applicationConfigurationManagement section in app.config.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Framework.ConfigurationManagement.ConfigurationManager.Read(String sectionName, String qualifierName)&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Framework.SystemConfiguration.LoadConnectionStrings()&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Framework.SystemConfiguration.Initialize()&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Framework.SystemConfiguration..cctor()&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; --- End of inner exception stack trace ---&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at customReporting.Authorization.CheckAccess(String userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType catItemType, Byte[] secDesc, ReportOperation rptOper, String reportPath)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext reportContext, String historyID, Boolean forRendering, Guid&amp;amp; reportID, Int32&amp;amp; executionOption, String&amp;amp; savedParametersXml, ReportSnapshot&amp;amp; compiledDefinition, ReportSnapshot&amp;amp; snapshotData, Guid&amp;amp; linkID, DateTime&amp;amp; historyOrSnapshotDate, Byte[]&amp;amp; secDesc)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.ReportingServices.Library.RSService._GetReportParameters(ClientRequest session, String report, String historyID, Boolean forRendering, NameValueCollection values, DatasourceCredentialsCollection credentials)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]&amp;amp; warnings, ParameterInfoCollection&amp;amp; effectiveParameters)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]&amp;amp; warnings, ParameterInfoCollection&amp;amp; effectiveParameters, String[]&amp;amp; secondaryStreamNames)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&amp;nbsp;&amp;nbsp; --- End of inner exception stack trace --&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&amp;nbsp;The error indicated that my custom security dll (customReporting) which utilizes a common library component for our data access and such (framework.dll) was not able to find a setting section in the app.config file.&amp;nbsp; At first I thought it was something related to the web site configuration for custom security since that is where you have to set everything up to get your custom security extension to work.&amp;nbsp; But, everything looked good there.&amp;nbsp; Looking further I found that it is running the subscription process under the SQL Reporting Services windows service instance so it is actually not using the web configurations when executing the custom extension dll but it runs in the context of the service.&amp;nbsp; So to fix this problem you need to add any configuration settings into the ReportServer\bin\ReportingServicesService.exe.config file.&amp;nbsp; This is the configuration file that the SQL Reporting Services windows service is utilizing.&amp;nbsp; Once I added my config information to that file subscriptions worked like a charm!&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=5571" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Microsoft SQL Server" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+SQL+Server/default.aspx" /></entry><entry><title>Data Warehousing Resources</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2008/03/31/data-warehousing-resources.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/03/31/data-warehousing-resources.aspx</id><published>2008-04-01T03:04:00Z</published><updated>2008-04-01T03:04:00Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve had a few requests lately for resources I&amp;#39;ve used related to data warehouse design and performance tips for SSAS and SSRS for SQL Server 2005.&amp;nbsp; I thought if a few people are interest there must be a lot of others out&amp;nbsp;searching the web for similar nuggets of gold.&amp;nbsp; So, here is my list of useful links for others to cash in on:&lt;/p&gt;
&lt;p&gt;SSAS Performance tips:&amp;nbsp; &lt;a href="http://www.calumo.com/pdf/SSAS2005PerformanceGuide.pdf" target="_blank"&gt;http://www.calumo.com/pdf/SSAS2005PerformanceGuide.pdf&lt;/a&gt;&amp;nbsp; - this is a great white paper from Microsoft on fine tuning your&amp;nbsp;cube performance from dimension design, through query and server hardware best practices.&lt;/p&gt;
&lt;p&gt;Using Indexed Views to increase performance:&amp;nbsp; &lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2005/impprfiv.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/sql/2005/impprfiv.mspx&lt;/a&gt;&amp;nbsp; - this article describes what indexed views are and when you should consider using them in your database.&lt;/p&gt;
&lt;p&gt;Designing your data warehouse schema - dimension modeling&amp;nbsp;instruction and best practices:&amp;nbsp; &lt;a href="http://www.kimballuniversity.com/"&gt;http://www.kimballuniversity.com/&lt;/a&gt;&amp;nbsp;- This site was started by Ralph Kimball, called the father of data warehousing by some, and includes many free articles on dimension modeling for a data warehouse.&amp;nbsp; Understanding the Kimball technique is a must for those just starting out in data warehousing.&lt;/p&gt;
&lt;p&gt;Best practices&amp;nbsp;from a practical implementation:&amp;nbsp; &lt;a href="http://www.microsoft.com/sql/solutions/bi/projectreal.mspx" target="_blank"&gt;http://www.microsoft.com/sql/solutions/bi/projectreal.mspx&lt;/a&gt;&amp;nbsp; - Project REAL was an attempt to implement a data warehouse for a real customer (Barnes &amp;amp; Noble) using SQL Server 2005 and a large set of real business data.&amp;nbsp; The result is a collection of&amp;nbsp;the project code and documentation on suggested design approaches, best practices and scripts you can migrate into your own applications.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=4765" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Microsoft SQL Server" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+SQL+Server/default.aspx" /></entry><entry><title>February DevCares Content</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2008/02/21/february-devcares-content.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/02/21/february-devcares-content.aspx</id><published>2008-02-22T04:16:00Z</published><updated>2008-02-22T04:16:00Z</updated><content type="html">&lt;p&gt;Thank you everyone who attended the Chicago DevCares event on Feb. 11.&amp;nbsp; We had some interesting conversations on web site security techniques and the new VS 2008 office applications features.&amp;nbsp; I&amp;#39;m sorry for the delay on posting the slides from the event, I know I promised I&amp;#39;d have it up last week after the Chicago DevCares.&amp;nbsp; You can find the slide content for the event at the following links:&lt;/p&gt;
&lt;p&gt;&lt;a class="" title="Securing Web Applications (Part 1)" href="http://employees.claritycon.com/dpeterson/DevCaresFeb08/Securing_Web_Applications_Part1.pptx"&gt;Securing Web Applications (Part 1)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" title="Securing Web Applications (Part 2)" href="http://employees.claritycon.com/dpeterson/DevCaresFeb08/Securing_Web_Applications_Part2.pptx"&gt;Securing Web Applications (Part 2)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" title="VS 2008 Office Business Applications" href="http://employees.claritycon.com/dpeterson/DevCaresFeb08/VS2008_OBA_nc.pptx"&gt;VS 2008 Office Business Applications&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please note, to view the slides you&amp;#39;ll need Office 2007 or install the &lt;a class="" title="Office Compatibility Pack for 2007 File Formats" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=941b3470-3ae9-4aee-8f43-c6bb74cd1466&amp;amp;displaylang=en"&gt;Office Compatibility Pack for 2007 File Formats&lt;/a&gt; so you can view the file in an older version of office.&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3840" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Microsoft Office" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+Office/default.aspx" /><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Threading model issues when using VB 6 COM components in a .NET Web Service</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2008/01/17/3621.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/01/17/3621.aspx</id><published>2008-01-18T03:59:00Z</published><updated>2008-01-18T03:59:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;I recently encountered a very&amp;nbsp;tricky issue with the threading model of .NET when you need to interop with a legacy VB 6 COM component.&amp;nbsp; The web service in question was created to consume components of a third party vendor that still distributed API functionality as a set of VB 6 COM dlls.&amp;nbsp; Each web service method utilized one or more calls into the VB 6 components to perform the desired functionality.&amp;nbsp; Initially everything appeared to be working properly under a light user load, but as soon as load increased on the application the web service response times began to vary drastically and in some instances slow to a crawl.&amp;nbsp; This was very perplexing as the call times varied so much it was hard to discern any sort of pattern.&amp;nbsp; The problem was narrowed down to be coming from the&amp;nbsp;response time of method calls to the VB 6 components.&amp;nbsp; A trend was also noticed that the database connection for the VB 6 components was never exceeding 1 connection, which was odd considering there would be 20 ASP.NET calls in progress simultaneously and they were all utilizing the COM component.&amp;nbsp; To me this indicated some kind of bottleneck that seemed to be single threading the VB 6 COM component usage.&amp;nbsp; Slowly I began to remember my glorious (at the time) VB 6 days back in the late 90s and how VB 6 components are compiled to run&amp;nbsp;in a&amp;nbsp;single threaded apartment (STA).&amp;nbsp; After doing a quick search I found an excellent &lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/10/WickedCode/"&gt;article&lt;/A&gt; from MSDN Magazine that described the exact same issues the problem web service was demonstrating.&amp;nbsp; The article explains how the issue&amp;nbsp;arises from .NET running in a MTA (Multi-threaded apartment) and the way the OS is forced to run the&amp;nbsp;COM components in a seperate STA space causing a queuing effect between the multiple ASP.NET threads trying to access the single COM component thread.&amp;nbsp; The solution is to get ASP.NET running in a STA mode as well so that the COM components can be loaded within each individual thread&amp;nbsp;space&amp;nbsp;of the ASP.NET processing threads&amp;nbsp;removing the need to marshal across apartments.&amp;nbsp; This achieves what was the original desired result for the web service of having multiple seperate instances of the VB 6 component running concurrently&amp;nbsp;for each&amp;nbsp;web request.&amp;nbsp; The article gives a&lt;/FONT&gt;&lt;FONT size=2&gt; sweet implementation work around for .NET to get a web service running in STA mode instead of the default MTA.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;I had to post this for as many people to see as possible because we all know VB 6 lives on and this hidden threading issue of using the legacy components from within a .NET web service is not a very apparent problem when it starts happening.&amp;nbsp; I hope this saves&amp;nbsp;every developer from pulling out hair trying to isolate and resolve this issue!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3621" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Client side JavaScript optimization techniques</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/12/24/3577.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/12/24/3577.aspx</id><published>2007-12-24T16:24:00Z</published><updated>2007-12-24T16:24:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;Thanks to everyone that attended the December DevCares event in Chicago last week.&amp;nbsp; One of the topics I presented on was techniques for optimizing client side JavaScript to obtain a better Rich Interactive Internet Application (RIIA) experience.&amp;nbsp; A lot of you gave me feedback that you found the content informative and I wanted to pass along a blog link that contains most of the topics we covered so you can have it for future reference:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/ie/archive/2006/11/16/ie-javascript-performance-recommendations-part-2-javascript-code-inefficiencies.aspx"&gt;http://blogs.msdn.com/ie/archive/2006/11/16/ie-javascript-performance-recommendations-part-2-javascript-code-inefficiencies.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Keep&amp;nbsp;the following points in mind as well when writing your script code to maximize your performance:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Performance implications can be tied to the lookup in the scope chain for the variables you are accessing.&amp;nbsp; Here is the list of scope in order of least to highest performance impact:&lt;/FONT&gt;&lt;FONT size=2&gt; Local variables, global variables, DOM.&amp;nbsp; The DOM is the most expensive operation you can do so be sure to evaluate whenever you are going to walk the tree to work on an object.&amp;nbsp; If you need access to an object in the tree for multiple operations consider using a pointer so that your code doesn't walk the tree each time and take the performance hit.&amp;nbsp; Example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var lside = document.body.all.lside.value;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var rside = document.body.all.rside.value;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;can be changed to:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var ptrAll = document.body.all;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var lside = ptrAll.lside.value;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var rside = ptrAll.rside.value;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Also, you can use function pointers to reduce the overhead of looking up the entry point in situations where the function may be called numerous times.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var length = myCollection.getItemCount();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;for (var idx=0; idx&amp;lt;length; idx++){&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Work(myCollection[idx]);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The above loop will perform symbol resolution for the location of the Work function every iteration of the loop, which depending on the collection could be a large iteration.&amp;nbsp; The following example utilizes a function pointer to perform the symbol resolution&amp;nbsp; once prior to the loop.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var funcWork = Work;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;var length = myCollection.getItemCount();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;for (var idx=0; idx&amp;lt;length; idx++){&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;funcWork(myCollection[idx]);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Look for more great developer tips, examples and overviews coming in&amp;nbsp;the 2008 DevCares sessions!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3577" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Performing Joins using LINQ to Objects</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/11/04/3433.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/11/04/3433.aspx</id><published>2007-11-04T20:08:00Z</published><updated>2007-11-04T20:08:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;In last months DevCares LINQ presentations there were some good questions on using joins within LINQ statements when&amp;nbsp;querying a collection of objects similar to how you would write a SQL join statement when querying a database.&amp;nbsp; In this post I'll show a simple example of performing a LINQ to objects join.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;In order to be able to perform a join of objects you first must have a property on the object that refers to either a reference to the other object itself or any sort of identifier value (such as a numeric ID).&amp;nbsp; You can then use that property as the join property in the LINQ statement.&amp;nbsp; For example, look at the following class definitions:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;B&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Person&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;{&lt;/FONT&gt;&lt;/B&gt; &lt;BR&gt;&lt;B&gt;&lt;FONT size=2&gt;... &lt;/B&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Name {&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; _name; }&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { _name = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;; }&lt;BR&gt;}&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DateTime&lt;/FONT&gt;&lt;FONT size=2&gt;? Birthday {&lt;BR&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; _Birthday; }&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { _Birthday = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;; }&lt;BR&gt;}&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; JobID {&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; _jobID; }&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { _jobID = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;; }&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; Person(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; name, DateTime birthday, &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; member, &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; jobID)&lt;/STRONG&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/FONT&gt;&lt;FONT size=2&gt;._name = name;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/FONT&gt;&lt;FONT size=2&gt;._Birthday = birthday;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/FONT&gt;&lt;FONT size=2&gt;._jobID = jobID;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;public class&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Job&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; {&lt;/STRONG&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; Title {&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; _title; }&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { _title = &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;; }&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; Company {&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; _company; }&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { _company = &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;; }&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; ID {&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; _id; }&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { _id = &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;; }&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Region&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; Location {&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; _location; }&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; { _location = &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;; }&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; Job(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; id, &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; title, &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt; company, Region location) {&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_title = title;&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_id = id;&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_company = company;&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_location = location;&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;The Person object has a JobID property which is the identifier of the person's job.&amp;nbsp; We can use this to join to a collection of job objects that has more details on the actual job to return in our shaped LINQ result.&amp;nbsp; If we loaded the following person objects and job objects:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;B&gt;&lt;FONT size=2&gt;
&lt;P&gt;List&amp;lt;Person&amp;gt; people = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; List&amp;lt;Person&amp;gt;();&lt;BR&gt;myPeople.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Person(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Gerald"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, DateTime.Parse(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"1/2/2003"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;),&amp;nbsp;3&lt;/B&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;));&lt;BR&gt;myPeople.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Person(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Linda"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, DateTime.Parse(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"2/2/2002"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;),&amp;nbsp;&lt;/B&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; 1));&lt;BR&gt;myPeople.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Person(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Sarah"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, DateTime.Parse(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"4/2/2002"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;),&amp;nbsp;&lt;/B&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; 1));&lt;BR&gt;myPeople.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Person(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Bill"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, DateTime.Parse(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"4/5/2006"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;),&amp;nbsp;&lt;/B&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; 2));&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;B&gt;&lt;FONT size=2&gt;List&amp;lt;Job&amp;gt; jobs = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; List&amp;lt;Job&amp;gt;();&lt;BR&gt;jobs.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Job(1, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Developer"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Microsoft"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, Region.West));&lt;BR&gt;jobs.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Job(2, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Developer"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Microsoft"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, Region.East));&lt;BR&gt;jobs.Add(&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Job(3, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Technical Account Representative"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Microsoft"&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;, Region.Central));&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;We could then perform a LINQ statement to filter person's by specific jobs.&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;B&gt;&lt;FONT size=2&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;var&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; result = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; p &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; people&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; j &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; jobs&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;where&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; p.JobID == j.ID&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;p.Name, j.Company, j.Title&lt;BR&gt;};&lt;BR&gt;&lt;/P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;Using an anonymous type as the output we can shape the resulting objects to include the person's name, job title and company.&amp;nbsp; We can then manipulate or display this shaped type as necessary.&amp;nbsp; If you wanted you could have also had a Job property of type Job on the Person object and having a direct object reference on the Job property of every Person.&amp;nbsp; It would still be possible to join the Person.Job property to Job in a LINQ statement to include a filter by an attribute of Job or specific pull out Job property values into the results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Change the JobID property on Person to:&lt;/FONT&gt;&lt;BR&gt;&lt;B&gt;&lt;FONT size=2&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Job&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; Job {&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; _job; }&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; { _job = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;; }&lt;BR&gt;}&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;Then after assigning Job object references to the Person objects in the people collection you could use LINQ to join in a query:&lt;/FONT&gt;&lt;/P&gt;&lt;B&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;var&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; result = &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; p &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; people&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; j &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; jobs&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;where&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; p.Job == j&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;p.Name,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;j.Company,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;j.Title,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;j.Location &lt;BR&gt;};&lt;BR&gt;&lt;/B&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;LINQ to objects gives you a lot of flexibility in how you can filter against a collection of objects.&amp;nbsp; With this new VS 2008 feature you can virtually wave good bye to all those previous foreach loops with comparison checks embedded within them!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3433" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author></entry><entry><title>October Microsoft DevCares LINQ Presentation Slides</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/10/11/3311.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/10/11/3311.aspx</id><published>2007-10-12T00:15:00Z</published><updated>2007-10-12T00:15:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;A few people attending the October DevCares presentation in Chicago earlier this week requested access to the slides.&amp;nbsp; You can find the slide decks for all three LINQ presentations given by myself and Rick Haffey &lt;A href="http://employees.claritycon.com/dpeterson/samples/DevCares-LINQ.zip"&gt;here&lt;/A&gt;.&amp;nbsp; Please note, you will need Microsoft Office 2007 or the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&amp;amp;displaylang=en"&gt;Office&amp;nbsp;Compatibility Pack&lt;/A&gt;&amp;nbsp;to view the slide decks.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;If you were unable to attend in Chicago you still have time to sign up for the event taking place at the Microsoft office in Downers Grove on Thursday, Oct. 25.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3311" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author></entry><entry><title>Chicago area September Microsoft events</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/09/05/3277.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/09/05/3277.aspx</id><published>2007-09-06T01:12:00Z</published><updated>2007-09-06T01:12:00Z</updated><content type="html">&lt;P class=MsoNormal&gt;&lt;FONT face=Calibri&gt;There are a couple of free&amp;nbsp;Microsoft developer events coming up in the month of September in Chicago that are worth a look.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;-&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;In downtown Chicago on Sept. 12&lt;SUP&gt;th&lt;/SUP&gt; is the ArcREADY session.&amp;nbsp; ArcREADY is an event that is touring the Midwest through the month of September.&amp;nbsp; This is a 3 hour morning presentation and discussion covering the technology aspects related to the industry buzz word “Web 2.0”.&amp;nbsp; The topics cover best practices and architecture options for planning and implementing applications using Web 2.0 technologies such as AJAX in ASP.NET, Sharepoint Server 2007 and Windows Communication Foundation (WCF) in Visual Studio 2008.&amp;nbsp; To read more about the session or to register go to &lt;/FONT&gt;&lt;A href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032345647&amp;amp;Culture=en-US"&gt;&lt;FONT face=Calibri&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032345647&amp;amp;Culture=en-US&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;-&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;In downtown Chicago on Sept. 18th and then in the Microsoft office in Downers Grove on Sept. 27&lt;SUP&gt;th&lt;/SUP&gt;, is the monthly DevCares event.&amp;nbsp; The topic is Windows Communication Foundation (WCF).&amp;nbsp; DevCares is an afternoon event consisting of multiple presentation sessions focusing each month on a different technology topic.&amp;nbsp; WCF is available in the .NET 3.0 framework and is a significant architecture feature which becomes fully integrated and available in Visual Studio 2008 (there is limited availability of it in Visual Studio 2005 through add ins).&amp;nbsp; This event consists of three presentation sessions on the details of WCF management features, diagnostics, channels and scalability.&amp;nbsp; I will be presenting several of the sessions so I can guarantee it will dig into technical implementation details.&amp;nbsp; For more information, or to register, go to &lt;/FONT&gt;&lt;A href="http://www.devcares.com/"&gt;&lt;FONT face=Calibri&gt;http://www.devcares.com&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3277" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author></entry><entry><title>Semantic Model Generator Error when creating a report model off of a SSAS cube</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/08/30/3276.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/08/30/3276.aspx</id><published>2007-08-31T00:46:00Z</published><updated>2007-08-31T00:46:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Arial size=2&gt;I recently experienced a really frustrating error when attempting to build a report model for SQL Server 2005 Reporting Services off of a SQL Server 2005 Analysis Services cube.&amp;nbsp; I kept getting the following error message:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;w3wp!semanticmodelgenerator!5!08/28/2007-09:16:39:: e ERROR: Semantic Model Generator: ModelGeneratorExtention&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;An error occurred while executing rule 'Create attributes for dimension Customer ':Error Code = 0x80004005, External Code = 0x00000000:..&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This cryptic error message gave me no hints as to what&amp;nbsp;was really wrong and surprisingly there was nothing on the internet about it (until now!).&amp;nbsp; At first it sent me on a wild goose chase thinking there was something wrong with my Customer dimension defined in the SSAS cube.&amp;nbsp; But what could it be?&amp;nbsp; I couldn't find anything odd about the dimension as it was a straight forward dimension with a few basic hierarchies.&amp;nbsp; So at that point I removed the dimension from the cube altogether and alas got the same error when attempting to create a report model,&amp;nbsp;but this time it said 'Create attributes for dimension Date '.&amp;nbsp; At this point I suspected the rule information it was showing with the error information was inaccurate so I had to&amp;nbsp;do some deeper&amp;nbsp;problem solving.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What I eventually found to be the real cause of the error was the parent-child relationship I had defined in a Product dimension.&amp;nbsp; This dimension had two fields in the Product table that were keys back to the Product table.&amp;nbsp; One of the keys had its parent-child hierarchy relationship defined in the dimension already.&amp;nbsp; Once I removed the&amp;nbsp;self referencing foreign keys&amp;nbsp;and the parent-child hierarchy on the Product dimension (and after adding my Customer dimension back into the cube) the model was finally able to be generated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm posting this in case anyone else runs into this cryptic and misleading error message during model generation.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3276" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Microsoft SQL Server" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+SQL+Server/default.aspx" /></entry><entry><title>Customize the Default Web Service Help Page</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/07/16/3227.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/07/16/3227.aspx</id><published>2007-07-17T02:22:00Z</published><updated>2007-07-17T02:22:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;Most .NET developers that write web services are familiar with the default test page that appears when you&amp;nbsp;navigate&amp;nbsp;to the&amp;nbsp;asmx page in a web browser.&amp;nbsp; This page is installed with Visual Studio and allows a developer to test posting data to web service methods as long as the web service is only using simple type parameters.&amp;nbsp; If the web service is more complicated with complex types (serialized classes from your code) the default test page is of no help.&amp;nbsp; But alas, it can be utilized for testing if you customize it!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;I've made a customized landing page&amp;nbsp;that shows&amp;nbsp;examples of the raw SOAP XML message request and response.&amp;nbsp; It also allows the user to fill in values for the XML elements as SOAP parameters for simple or complex types and post them directly to the service which then displays the raw SOAP XML response.&amp;nbsp; This is the best way for testing that the XML output of a web service method is being produced the way you expect it to be and involves no complex port sniffing or extra tool installation.&amp;nbsp; It's also a quick way (no coding involved) to test posting different types of input values and how the service responds to them.&amp;nbsp; You can find my customized landing page &lt;A href="http://employees.claritycon.com/dpeterson/samples/DefaultWsdlHelpGenerator.zip"&gt;here&lt;/A&gt;.&amp;nbsp; The code essentially reads the wsdl information of the web service to generate the compliant XML of a SOAP message for every method defined in the service.&amp;nbsp; This customized page also supports web services that import from a static wsdl file (which a web site can be configured to do in the case where you want to override the wsdl .NET creates when hitting the .asmx?wsdl url of&amp;nbsp;the web service page).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;There are two ways you can set up a customized asmx default page.&amp;nbsp; The first is to replace the main copy that is in effect for all web services on the server and can be found&amp;nbsp;at c:\windows\microsoft.net\framework\v2.0.50727\config\DefaultWsdlHelpGenerator.aspx&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Essentially the asmx handler is forwarding all non-SOAP http requests to the help generator aspx page to display a user friendly landing page.&amp;nbsp; If you want all your sites to utilize the same test page then replace the DefaultWsdlHelpGenerator.aspx page with your own version.&amp;nbsp; Be sure to retain the same file name though.&amp;nbsp; (This works as well for the .NET 1.1 framework, just replace the v2.0.50727 folder with v1.1.4322 in the above path.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;If you want just a particular site to use a customized page then add a web.config entry to the web site to point to the location of the desired page.&amp;nbsp; This overrides the usage of the page found in the windows directory listed above.&amp;nbsp; An example&amp;nbsp;web.config settings to make the default page point to a page in my current web site would be:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;webServices&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;wsdlHelpGenerator&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;href&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyWsdlHelpPage.aspx&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;webServices&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;Since the help generator&amp;nbsp;page is just an aspx page you can&amp;nbsp;feel free to&amp;nbsp;make any web&amp;nbsp;changes you'd like including branding to match an associated site.&amp;nbsp; The page does not have to include the ability to&amp;nbsp;submit data to the web service allowing you to conceal that ability from any user that happens to land on the page.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3227" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Introducing ClarityTV</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/06/08/3178.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/06/08/3178.aspx</id><published>2007-06-09T03:15:00Z</published><updated>2007-06-09T03:15:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;We've recently introduced a new section to the Clarity Consulting web site called ClarityTV.&amp;nbsp; In this section we are posting recordings of all the latest technology presentations given by Clarity consultants.&amp;nbsp; This includes recent DevCares topics such as the Orcas and Linq previews along with CNUG presentations.&amp;nbsp; ClarityTV can be found at &lt;A href="http://www.claritycon.com/claritytv/"&gt;ClarityTV&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;All the presentations are viewable using the new Microsoft Silverlight technology.&amp;nbsp; Silverlight is a cross-browser, cross-platform plug in for rich content and media in a .NET enabled environment.&amp;nbsp; For more information on Silverlight go to the official &lt;A href="http://silverlight.net"&gt;Microsoft Silverlight&lt;/A&gt; web site.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3178" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author></entry><entry><title>IIS 7.0 Features Summary</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/05/02/3107.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/05/02/3107.aspx</id><published>2007-05-03T02:11:00Z</published><updated>2007-05-03T02:11:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;Last month's DevCares topic was focused on the new features of IIS 7.0.&amp;nbsp; For those of you that missed the Chicago area presentations I've composed a short summary of what I felt were the most interesting items for developers.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- IIS 7 is currently only available on Windows Vista.&amp;nbsp; It will be released with Longhorn once the product ships and you can use it on the Longhorn CTP currently available.&amp;nbsp; IIS 7 cannot be installed separately on Windows 2003 server as the architecture is built into benefits of OS changes available in the new OS versions.&amp;nbsp; The only difference between the version of IIS 7 running on Vista and what will be available in Longhorn is that the Vista version has a 10 simultaneous connection limit (it can only accept 10 concurrent requests at any one time).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- Componentized Architecture - IIS 7 is built as a set of configurable component blocks.&amp;nbsp; This means you can 'build' the type of web server you want to run on your server by selecting only the component blocks with features you are going to use.&amp;nbsp; All the other blocks can be disregarded and as such are not even loaded into memory.&amp;nbsp; This gives you a stream lined service without loading unused dlls and minimizes the surface area of attack since you only have specific blocks resident on the server.&amp;nbsp; Everything is a block, you can essential strip away all the blocks and the IIS service becomes a dumb socket listener that receives connections but does nothing with them (not that you'd ever have a use for that in a real environment, but the building block concept is powerful).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- Merged pipeline allows a request to first go through native and managed pipeline handlers before being handed off to the isapi extension for page processing.&amp;nbsp; This means you can now have all of your pages take advantage of ASP.NET 2.0 features such as forms authentication.&amp;nbsp; Want to protect your images or classic ASP pages with the same security scheme used in your ASP.NET forms app?&amp;nbsp; Well now you can as the merged pipeline will process the forms authentication managed handler before it directs the page request to any of the handlers so all requests regardless of file extension must pass forms auth.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- New Win32 API makes it easier to build your own component blocks to plug into the merged IIS pipeline or custom ISAP extensions.&amp;nbsp; Extensions can now be made in managed code using an object oriented Win32 API, no more struggling with native C++ and antiquated Win32 calls.&amp;nbsp; All the features the blocks built by Microsoft take advantage of are also exposed to your custom blocks by the API.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- IIS and ASP.NET configuration is now all done in one single config file.&amp;nbsp; A server level config file can host the default settings for all sites on the server and are inherited to all sites and applications.&amp;nbsp; A site or application can override inherited settings within their own web.config file if the setting isn't locked down at the server level.&amp;nbsp; The server administrator can decide which settings are locked down and which aren't so your server features can be customized according to your corporate standards.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- Metabase is gone!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- New IIS Manager GUI provides ASP.Net and IIS configuration abilities.&amp;nbsp; A command line tool (appcmd.exe) exists as well and enables the same capabilities as the UI.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- Real time process information is available through the GUI or command line tool.&amp;nbsp; You can now see exactly what app pools are running, how many AppDomains are loaded and what requests are being executed in each pool.&amp;nbsp; Request information shows the page name, client connection information, and current execution time.&amp;nbsp; No more having to guess what's going on and what requests are in progress by watching perfmon stats and thread counts in task manager!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;- New Failed Request Tracing gives detailed IIS pipeline trace information to help troubleshoot errors and performance in&amp;nbsp;your pipeline.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;This is a significant IIS release as there have been a lot of core changes while still making it simple for you to copy an IIS 6 site and have it just work under IIS 7!&amp;nbsp; For more detailed information visit the new dedicated IIS site at &lt;A href="http://www.IIS.net"&gt;http://www.IIS.net&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3107" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>A generic deserialization method</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/04/15/3053.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/04/15/3053.aspx</id><published>2007-04-15T18:39:00Z</published><updated>2007-04-15T18:39:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;A while back I posted code on a method that would allow for serializing any object that was serializable into XML called &lt;A href="/blogs/don_peterson/archive/2006/07/08/1279.aspx"&gt;'A generic serialization method'&lt;/A&gt;.&amp;nbsp; I had some requests on how the XML could be deserialized back into an object instance such as once the XML is passed between systems or stored and reloaded by an application at a later time.&amp;nbsp; The following is a generic deserialization method that will take the XML document as a string and deserialize it back into an object instance.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; Deserialize an XML document into the specified object.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This can only work&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; on objects that are Serializable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; Be sure to type cast the object being returned.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; MyObject obj = (MyObject)UtilityFunctions.DeserializeFromXML(xmlOfObject, typeof(MyObject));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;param name="objToDeserialize"&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;The full XML document representation of the object as a string.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;param name="objectType"&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;The type of the object that the XML will be deserialized into.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;///&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;returns&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;An object reference to the deserialized object instance.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/returns&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;public&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;static&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;object&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; DeserializeFromXML(&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;string&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; objToDeserialize, &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;Type&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; objectType) {&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;System.Xml.Serialization.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;XmlSerializer&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; mySerializer = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;XmlTextReader&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; reader = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;//Instantiate the Serializer with the type of object that is being deserialized. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mySerializer = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; System.Xml.Serialization.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;XmlSerializer&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;(objectType);&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;reader = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;XmlTextReader&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;(objToDeserialize, &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;XmlNodeType&lt;/SPAN&gt;&lt;SPAN&gt;.Document, &lt;SPAN&gt;null&lt;/SPAN&gt;&lt;B&gt;);&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;//Serialize the object to xml &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;[] objData = System.Text.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;ASCIIEncoding&lt;/SPAN&gt;&lt;SPAN&gt;.ASCII.GetBytes(objToDeserialize);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;object&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; result = mySerializer.Deserialize(reader);&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&am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ormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; (reader != &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;) { reader.Close(); }&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;When a caller calls this method be sure to remember to cast the return value into the type of object being deserialized.&amp;nbsp; Below is a simple example object and a code snipet on how to call the SerializeToXML and DeserializeFromXML methods.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;Serializable&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;()]&lt;/SPAN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gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;SerializeMe&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;cls.Prop2 = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;"testing"&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;string&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; test = &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;UtilityFunctions&lt;/SPAN&gt;&lt;SPAN&gt;.SerializeToXML(cls);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;SerializeMe&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt; cls2 = (&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;SerializeMe&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;UtilityFunctions&lt;/SPAN&gt;&lt;SPAN&gt;.DeserializeFromXML(test, &lt;SPAN&gt;typeof&lt;/SPAN&gt;&lt;B&gt;(&lt;/B&gt;&lt;SPAN&gt;SerializeMe&lt;/SPAN&gt;&lt;B&gt;));&lt;/B&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3053" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="ASP.NET" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>General advice on SQL Server General Network Errors</title><link rel="alternate" type="text/html" href="http://blogs.claritycon.com/blogs/don_peterson/archive/2007/03/24/2969.aspx" /><id>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/03/24/2969.aspx</id><published>2007-03-24T16:38:00Z</published><updated>2007-03-24T16:38:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;Arghh, what are these "General Network Error" messages?&amp;nbsp; You know the ones,&amp;nbsp;that randomly with no apparent pattern or reason&amp;nbsp;happen in an application and raise tension between your developer and networking groups on who is to blame?&amp;nbsp; Typically because it says 'network' in the message the developers toss it over the fence to the network guys to try to tackle, but they toss back because the network connectivity passes all of their secret tests and then the issue drags on endlessly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Well, I just found a great &lt;A href="http://blogs.msdn.com/sql_protocols/archive/2006/04/12/574608.aspx"&gt;blog entry&lt;/A&gt; from one of the SQL engineers that may be an answer for some people.&amp;nbsp; I recently ran into this issue myself when SQL 2005 server was under load on a Windows 2003 server it would generate errors with the generic "General Network Error" message or "server has timed out or is unavailable".&amp;nbsp; The errors were very sporatic and seemed unrelated to anything going on in the code or the server itself.&amp;nbsp;&amp;nbsp;Since the applications were still running on the .NET 1.1 framework the details of the underlying protocol issue couldn't be seen in the exception stack (the SqlClient stack in .NET 2.0 has&amp;nbsp;a more robust error messaging syntax that actually reports the underlying protocol message such as 'TCP socket was closed from the remote host')&amp;nbsp;and the generic error messages&amp;nbsp;were all we had to work with.&amp;nbsp; Implementing the suggested registry change virtually eliminated the problem.&amp;nbsp; Be sure to read the comments of the blog that correct the registry parameter name (SynAttackProtect) which was mis-typed in the blog entry.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2969" width="1" height="1"&gt;</content><author><name>dpeterson</name><uri>http://blogs.claritycon.com/members/dpeterson.aspx</uri></author><category term="Microsoft SQL Server" scheme="http://blogs.claritycon.com/blogs/don_peterson/archive/tags/Microsoft+SQL+Server/default.aspx" /></entry></feed>