<?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>Dot Net Technologies -- MS Tech talk and more - Debugging</title>
    <link>http://www.dotnettechnologies.com/</link>
    <description>Creating Solutions with Microsoft's .Net Technologies</description>
    <language>en-us</language>
    <copyright>© Copyright 2010 </copyright>
    <lastBuildDate>Sat, 07 Nov 2009 03:45:19 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>daryl@rubiconcomputing.com</managingEditor>
    <webMaster>daryl@rubiconcomputing.com</webMaster>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=a0f5b464-8bcd-43d2-a17d-58c4bb7b392b</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,a0f5b464-8bcd-43d2-a17d-58c4bb7b392b.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,a0f5b464-8bcd-43d2-a17d-58c4bb7b392b.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a0f5b464-8bcd-43d2-a17d-58c4bb7b392b</wfw:commentRss>
      <title>New features of VS2010 which have me smiling (Part 2)</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,a0f5b464-8bcd-43d2-a17d-58c4bb7b392b.aspx</guid>
      <link>http://www.dotnettechnologies.com/2009/11/07/NewFeaturesOfVS2010WhichHaveMeSmilingPart2.aspx</link>
      <pubDate>Sat, 07 Nov 2009 03:45:19 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Session compression – For out-of-process session
maintenance, the session state is compressed using the &lt;i style="mso-bidi-font-style: normal"&gt;System.IO.Compression.GZipStream&lt;/i&gt; class.
It also looks like it will only do this when CPU cycles are available (but I need
to investigate this further).&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If that’s
the case, you might want to set up some Performance indicators or alerts when it’s
not being compressed because that might indicate further problems.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&amp;lt;&lt;a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx"&gt;http://www.asp.net/learn/whitepapers/aspnet4/default.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Multi-Targeting – I’ve mentioned this before,
but it allows you to specify which .Net version you are writing for in the VS2010
IDE. This expands the support that VS2008 has by adaptively changing&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;the
IDE to the targeted environment. The IDE adjusts its Intellisense and compilation
towards the targeted version.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The whitepaper
indicates ASP.Net, so I need to test and see if it applies to WPF and WinForm as well.
Some features:&lt;/font&gt;
&lt;/p&gt;
&lt;ul style="MARGIN-TOP: 0in" type=disc&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo2"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Specified in the .config file, defaults to
4.0 when not specified.&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo2"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Compiles the code to the &lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo2"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Intellisense adapts to the current version
of the framework selected&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&amp;lt;&lt;a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx"&gt;http://www.asp.net/learn/whitepapers/aspnet4/default.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx"&gt;&lt;font face=Calibri size=3&gt;http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Script Loading – The AJAX library includes
the ability to have better control of script loading in .Net 4.0. It loads the scripts
automatically, and in the order needed. From the whitepaper, here’s the features:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;&lt;font face=Calibri&gt;Automatically
loads all resources that are required by a script. &lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;&lt;font face=Calibri&gt;Makes
sure that each script is loaded only once. &lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;&lt;font face=Calibri&gt;Improves
performance by loading scripts in parallel and by combining scripts. &lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;&lt;font face=Calibri&gt;Supports
loading scripts only when they are needed (“lazy loading”). &lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;&lt;font face=Calibri&gt;Supports
loading third-party scripts like jQuery and your own scripts.&lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; VERTICAL-ALIGN: middle; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&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 size=3&gt;Supports
loading scripts from the Microsoft Ajax Content Delivery Network&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;One of the client features is the Sys.require.
When a component and a function is provided, the callback function is called when
the scripts are done loading.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&amp;lt;&lt;a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx"&gt;http://www.asp.net/learn/whitepapers/aspnet4/default.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;jQuery integration – Speaking of jQuery, it’s
now included&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;as part of the ASP.Net Web
forms and the MVC project.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&amp;lt;&lt;a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx"&gt;http://www.asp.net/learn/whitepapers/aspnet4/default.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;ClientID changes – I am mixed about this one,
simply because once In understood how ASP.Net set its clientIDs upon rendering, I
could generate my script accordingly&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;in
my code behind.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However, it’s been simplified
in VS2010 to allow the user to have control over setting the client IDs. Be forewarned
though, this could open you up to naming issues within container controls as such.
Regardless, I am always supportive of giving the developer the option of more control.
There’s a new property at the configuration file, page and control level called &lt;i style="mso-bidi-font-style: normal"&gt;ClientIDMode&lt;/i&gt; which
has the following settings:&lt;/font&gt;
&lt;/p&gt;
&lt;ul style="MARGIN-TOP: 0in" type=disc&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo4"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;AutoID – mimics the previous version naming
scheme&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo4"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Static – This specifies that the ClientID
value will be the same as the ID without concatenating the IDs of parent naming containers. &lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo4"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Predictable – useful for controls which will
be generated in template controls&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo4"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Inherit – take the setting of the parent control
(lots of this in VS2010, which is great, since I have been a champion for UI inheritance
and control-centric programming).&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&amp;lt;&lt;a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx"&gt;http://www.asp.net/learn/whitepapers/aspnet4/default.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Improved “Add Reference” functionality – Over
the past couple of days, I found myself converting a project from VS2005 to VS2008.
As a result, I found myself needing to change some references as well as I changed
some of the related projects. This change in VS2008 is sort of a “nice to have”. While
it’s not a big win, it’s still nice as it can get painful at times changing the references.
Here are the changes with this:&lt;/font&gt;
&lt;/p&gt;
&lt;ul style="MARGIN-TOP: 0in" type=disc&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The .Net and COM tabs are loaded asynchronously&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Defaults opening to the project tab (I find
myself using this a LOT anyways, but would have preferred this to start at the “Browse”
tab, or better, consider this like a MRU action and remember where I was last time)&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link&lt;/font&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;:
&amp;lt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2009/10/29/add-reference-dialog-improvements-vs-2010-and-net-4-0-series.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2009/10/29/add-reference-dialog-improvements-vs-2010-and-net-4-0-series.aspx&lt;/a&gt;&amp;gt; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;UML Support! Visual Studio 2010
will support the creation of UML diagrams via a modeling project. I like Visio and
all, but I look forward to being able to create UML diagrams right from the same IDE
I develop in. As of now, there’s no code generation support. I do think a clever developer
could possible do some code generation from the saved file via CodeSmith or IDE programming,
so I bet we’ll see something like that soon if Microsoft doesn’t provide it first.
Check out the link below and you can see some of the functionality.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;a href="http://weblogs.asp.net/gunnarpeipman/archive/2009/11/04/visual-studio-2010-uml-modeling-projects.aspx"&gt;&lt;font face=Calibri size=3&gt;http://weblogs.asp.net/gunnarpeipman/archive/2009/11/04/visual-studio-2010-uml-modeling-projects.aspx&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Although available in v3.5, VS2010/v4 will
have the chart control integrated into it. In the past, your options were a third-party
control for charting or to use Interop and Excel, or writing your own charting libraries
(gulp!). &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;The link below lists some details
on this impressive charting library if you’ve never used it.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Link: &lt;/font&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx"&gt;&lt;font face=Calibri size=3&gt;http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Developers will have more deployment options
Web application &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Get it here: &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx"&gt;&lt;font face=Calibri size=3&gt;http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=a0f5b464-8bcd-43d2-a17d-58c4bb7b392b" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,a0f5b464-8bcd-43d2-a17d-58c4bb7b392b.aspx</comments>
      <category>All Things</category>
      <category>ASP.Net</category>
      <category>CSharp</category>
      <category>Debugging</category>
      <category>Design</category>
      <category>General</category>
      <category>Tips and Tricks</category>
      <category>Tools</category>
      <category>WinForms</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=886aa54f-3ce6-48ac-8164-5733d9a870da</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,886aa54f-3ce6-48ac-8164-5733d9a870da.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,886aa54f-3ce6-48ac-8164-5733d9a870da.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=886aa54f-3ce6-48ac-8164-5733d9a870da</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you'd like to redirect your page trace infomation to a file (which can be useful
when you are trying to run down a problem and don't want the world to see your trace
information during testing), it's as simple as this:
</p>
        <p>
Add this to your web.config:
</p>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
            <p>
&lt;
</p>
          </font>
        </font>
        <font color="#a31515" size="2">
          <font color="#a31515" size="2">trace</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
          </font>
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">enabled</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">=</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">true</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
          </font>
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">traceMode</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">=</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">SortByTime</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
          </font>
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">pageOutput</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">=</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">false</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
          </font>
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">localOnly</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">=</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">false</font>
        </font>
        <font color="#000000" size="2">"</font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2"> /&gt;</font>
        </font>
        <p>
          <font color="#0000ff" size="2">
            <font color="#0000ff" size="2">
              <font color="#003300">The
key is the <font color="#ff0000">pageOutput</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font color="#000000" size="2">"</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">false</font></font><font color="#000000" size="2">" <font color="#003300">which
tells the framework to redirect the trace info to the trace.axd file. To view the
trace information, you just need to load the page in the browser, such as:</font></font></font>
            </font>
          </font>
        </p>
        <p>
          <font color="#0000ff" size="2">
            <font color="#0000ff" size="2">
              <font color="#003300">http://localhost:4774/trace.axd</font>
            </font>
          </font>
        </p>
        <p>
          <font color="#0000ff" size="2">
            <font color="#0000ff" size="2">
              <font color="#003300">This
will allow you to see the trace history of any browsed files since the trace was started,
as well as clearing the trace history. Just remember to remove this before you deploy
(or make sure you compile in release mode!).</font>
            </font>
          </font>
        </p>
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=886aa54f-3ce6-48ac-8164-5733d9a870da" />
      </body>
      <title>Tip of the Day: Redirecting page trace output to a file</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,886aa54f-3ce6-48ac-8164-5733d9a870da.aspx</guid>
      <link>http://www.dotnettechnologies.com/2009/09/25/TipOfTheDayRedirectingPageTraceOutputToAFile.aspx</link>
      <pubDate>Fri, 25 Sep 2009 05:11:05 GMT</pubDate>
      <description>&lt;p&gt;
If you'd like to redirect your page trace infomation to a file (which can be useful
when you are trying to run down a problem and don't want the world to see your trace
information during testing), it's as simple as this:
&lt;/p&gt;
&lt;p&gt;
Add this to your web.config:
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
&amp;lt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;trace&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;enabled&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;traceMode&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;SortByTime&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;pageOutput&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;localOnly&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#003300&gt;The key
is the &lt;font color=#ff0000&gt;pageOutput&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;" &lt;font color=#003300&gt;which
tells the framework to redirect the trace info to the trace.axd file. To view the
trace information, you just need to load the page in the browser, such as:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#003300&gt;http://localhost:4774/trace.axd&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#003300&gt;This will
allow you to see the trace history of any browsed files since the trace was started,
as well as clearing the trace history. Just remember to remove this before you deploy
(or make sure you compile in release mode!).&lt;/font&gt;
&lt;/p&gt;
&gt;&gt;&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=886aa54f-3ce6-48ac-8164-5733d9a870da" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,886aa54f-3ce6-48ac-8164-5733d9a870da.aspx</comments>
      <category>All Things</category>
      <category>ASP.Net</category>
      <category>Debugging</category>
      <category>General</category>
      <category>Tips and Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=46475fa1-9c46-45fc-aed3-d3e4fdf045f4</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,46475fa1-9c46-45fc-aed3-d3e4fdf045f4.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,46475fa1-9c46-45fc-aed3-d3e4fdf045f4.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=46475fa1-9c46-45fc-aed3-d3e4fdf045f4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Most people set break points, and iterate through code until they find the condition
they were looking for. Although (IMHO) poorly documented, it's possible to place a
condition on your breakpoint to have it stop when your condition is met. 
</p>
        <p>
Let's look at this code:
</p>
        <div style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
          <span style="COLOR: blue">
            <div style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
              <p style="MARGIN: 0px">
                <span style="COLOR: #2b91af">   20</span>        
    <span style="COLOR: blue">int</span> maxIdx = 15;
</p>
              <p style="MARGIN: 0px">
                <span style="COLOR: #2b91af">   21</span>        
    <span style="COLOR: blue">for</span>(<span style="COLOR: blue">int</span> idx=1;
idx &lt; maxIdx; idx++)
</p>
              <p style="MARGIN: 0px">
                <span style="COLOR: #2b91af">   22</span>        
    {
</p>
              <p style="MARGIN: 0px">
                <span style="COLOR: #2b91af">   23</span>        
        Response.Write(<span style="COLOR: #a31515">"Index:"</span> +
idx.ToString());
</p>
              <p style="MARGIN: 0px">
                <span style="COLOR: #2b91af">   24</span>        
    }
</p>
              <p style="MARGIN: 0px">
 
</p>
            </div>
            <!--EndFragment-->
          </span>
          <p style="MARGIN: 0px">
            <font face="Verdana" size="2">If I were to place a breakpoint on line 23, the debugger
would stop every time it hit the Response.Write. For a small loop that *might* be
ok, but let's say I notice something weird with the 13th item. Within the breakpoint
itself, I can place a condition when I actually want it to stop, in this case, the
13th iteration.</font>
          </p>
          <p style="MARGIN: 0px">
            <font face="Verdana" size="2">
            </font> 
</p>
          <p style="MARGIN: 0px">
            <font face="Verdana" size="2">By right clicking on the debug "circle", the following
context-sensitive menu comes up: </font>
          </p>
          <p style="MARGIN: 0px">
 
</p>
        </div>
        <p>
          <!--EndFragment-->
          <img src="http://www.dotnettechnologies.com/content/binary/DebugCondition.png" border="0" />
        </p>
        <p>
Select "Condition" and the following dialog appears:
</p>
        <p>
 
</p>
        <p>
          <img src="http://www.dotnettechnologies.com/content/binary/BreakCondition.png" border="0" />
        </p>
        <p>
In the textbox, place the condition that you want. In this case, when idx == 13, the
condition is true, and therefore, the breakpoint will now be active and execution
will stop.
</p>
        <p>
When a condition for a breakpoint is set, you'll notice the image for the breakpoint
changes as well:
</p>
        <img src="http://www.dotnettechnologies.com/content/binary/condbreak.png" border="0" />
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=46475fa1-9c46-45fc-aed3-d3e4fdf045f4" />
      </body>
      <title>Tip of the Day: Debugging -- Conditional Breaks</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,46475fa1-9c46-45fc-aed3-d3e4fdf045f4.aspx</guid>
      <link>http://www.dotnettechnologies.com/2009/09/07/TipOfTheDayDebuggingConditionalBreaks.aspx</link>
      <pubDate>Mon, 07 Sep 2009 22:46:14 GMT</pubDate>
      <description>&lt;p&gt;
Most people&amp;nbsp;set break points, and iterate through code until they find the condition
they were looking for. Although (IMHO) poorly documented, it's possible to place a
condition on your breakpoint to have it stop when your condition is met. 
&lt;/p&gt;
&lt;p&gt;
Let's look at this code:
&lt;/p&gt;
&lt;div style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt; 
&lt;div style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; maxIdx = 15;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;21&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;for&lt;/span&gt;(&lt;span style="COLOR: blue"&gt;int&lt;/span&gt; idx=1;
idx &amp;lt; maxIdx; idx++)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;22&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;23&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; Response.Write(&lt;span style="COLOR: #a31515"&gt;"Index:"&lt;/span&gt; +
idx.ToString());
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;24&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;&lt;/span&gt; 
&lt;p style="MARGIN: 0px"&gt;
&lt;font face=Verdana size=2&gt;If I were to place a breakpoint on line 23, the debugger
would stop every time it hit the Response.Write. For a small loop that *might* be
ok, but let's say I notice something weird with the 13th item. Within the breakpoint
itself, I can place a condition when I actually want it to stop, in this case, the
13th iteration.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;font face=Verdana size=2&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;font face=Verdana size=2&gt;By right clicking on the debug "circle", the following context-sensitive
menu comes up: &lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;!--EndFragment--&gt;&lt;img src="http://www.dotnettechnologies.com/content/binary/DebugCondition.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Select "Condition" and the following dialog appears:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.dotnettechnologies.com/content/binary/BreakCondition.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
In the textbox, place the condition that you want. In this case, when idx == 13, the
condition is true, and therefore, the breakpoint will now be active and execution
will stop.
&lt;/p&gt;
&lt;p&gt;
When a condition for a breakpoint is set, you'll notice the image for the breakpoint
changes as well:
&lt;/p&gt;
&lt;img src="http://www.dotnettechnologies.com/content/binary/condbreak.png" border=0&gt;&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=46475fa1-9c46-45fc-aed3-d3e4fdf045f4" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,46475fa1-9c46-45fc-aed3-d3e4fdf045f4.aspx</comments>
      <category>All Things</category>
      <category>Debugging</category>
      <category>General</category>
      <category>Tips and Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=f42ed926-5622-4a75-ba3e-8f36637b572b</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,f42ed926-5622-4a75-ba3e-8f36637b572b.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,f42ed926-5622-4a75-ba3e-8f36637b572b.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f42ed926-5622-4a75-ba3e-8f36637b572b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This has been around for quite some time, but I am always suprised when I go to a
new client site at the number of developers who don't know how to make the debugger
stop when it encounters an error. This is a repeat tip of a long time ago, as it's
just that useful. It's a very useful debug trick because some projects are so
large, you don't know where to start looking for an issue. Additionally, an error
may actually be occurring somewhere unexpected because it's getting caught in error
handling.
</p>
        <p>
By setting it to break on "Thrown", the debugger will stop right where an error originates.
To turn this functionality on, you can select the "Debug" menu item, and select "Exceptions".
For you hot key fans out there, you can invoke the dialog with Ctrl+Alt+E. When you
do, you'll see the following dialog. Mark the "Thrown" box for the "Common Language
runtime Exceptions" as shown below.
</p>
        <p>
          <img src="http://www.dotnettechnologies.com/content/binary/BreakOnError.png" border="0" />
        </p>
        <p>
When done debugging, save yourself some grief and uncheck the "Thrown" box, otherwise
you'll be stopping a LOT when you don't mean to.
</p>
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=f42ed926-5622-4a75-ba3e-8f36637b572b" />
      </body>
      <title>Tip of the Day: Debugging -- Break on Error</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,f42ed926-5622-4a75-ba3e-8f36637b572b.aspx</guid>
      <link>http://www.dotnettechnologies.com/2009/09/07/TipOfTheDayDebuggingBreakOnError.aspx</link>
      <pubDate>Mon, 07 Sep 2009 22:28:20 GMT</pubDate>
      <description>&lt;p&gt;
This has been around for quite some time, but I am always suprised when I go to a
new client site at the number of developers who don't know how to make the debugger
stop when it encounters an error. This is a repeat tip of a long time ago, as it's
just that useful.&amp;nbsp;It's a very useful debug trick because some projects are so
large, you don't know where to start looking for an issue. Additionally, an error
may actually be occurring somewhere unexpected because it's getting caught in error
handling.
&lt;/p&gt;
&lt;p&gt;
By setting it to break on "Thrown", the debugger will stop right where an error originates.
To turn this functionality on, you can select the "Debug" menu item, and select "Exceptions".
For you hot key fans out there, you can invoke the dialog with Ctrl+Alt+E. When you
do, you'll see the following dialog. Mark the "Thrown" box for the "Common Language
runtime Exceptions" as shown below.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.dotnettechnologies.com/content/binary/BreakOnError.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
When done debugging, save yourself some grief and uncheck the "Thrown" box, otherwise
you'll be stopping a LOT when you don't mean to.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=f42ed926-5622-4a75-ba3e-8f36637b572b" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,f42ed926-5622-4a75-ba3e-8f36637b572b.aspx</comments>
      <category>All Things</category>
      <category>Debugging</category>
      <category>General</category>
      <category>Tips and Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=e889b6b0-390d-4c5a-a94c-1702a2d7d8e5</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,e889b6b0-390d-4c5a-a94c-1702a2d7d8e5.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,e889b6b0-390d-4c5a-a94c-1702a2d7d8e5.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e889b6b0-390d-4c5a-a94c-1702a2d7d8e5</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There's a pretty useful feature (IMHO) in the .Net 2.0 Exception object which
I hadn't noticed before. The Exception object contains a new Data interface, which
is essentially an IDictionary for applying additional values to the exception object.
I am currently using it with my integration of the new VS2005 Enterprise Library into
our framework. 
</p>
        <p>
I want to log exceptions to a database, but I have found it useful in the past to
have an Error #. In the old days (VB 6, for example) I could usually look at the error
number of an application and tell exactly what the problem was. When .Net came into
being, we lost the error number, and there was no easy way to get around it. You could
roll your own exception classes of course and add these properties, but this is only
a limited solution because other exception handlers wouldn't be capable of handling
the additional features by default.
</p>
        <p>
Now this feature is going to allow me to take advantage of error numbers by classifying
each exception type, and appending an error number to the exception object. I can
use this information in my database to classify and group errors by type to identify
weak areas in an application as well. Not Earth shattering, but still a useful feature
full of all kinds of possibilities.
</p>
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=e889b6b0-390d-4c5a-a94c-1702a2d7d8e5" />
      </body>
      <title>New feature in .Net 2.0 Exception object</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,e889b6b0-390d-4c5a-a94c-1702a2d7d8e5.aspx</guid>
      <link>http://www.dotnettechnologies.com/2006/06/13/NewFeatureInNet20ExceptionObject.aspx</link>
      <pubDate>Tue, 13 Jun 2006 15:42:38 GMT</pubDate>
      <description>&lt;p&gt;
There's a pretty useful feature (IMHO)&amp;nbsp;in the .Net 2.0 Exception object which
I hadn't noticed before. The Exception object contains a new Data interface, which
is essentially an IDictionary for applying additional values to the exception object.
I am currently using it with my integration of the new VS2005 Enterprise Library into
our framework. 
&lt;/p&gt;
&lt;p&gt;
I want to log exceptions to a database, but I have found it useful in the past to
have an Error #. In the old days (VB 6, for example) I could usually look at the error
number of an application and tell exactly what the problem was. When .Net came into
being, we lost the error number, and there was no easy way to get around it. You could
roll your own exception classes of course and add these properties, but this is only
a limited solution because other exception handlers wouldn't be capable of handling
the additional features by default.
&lt;/p&gt;
&lt;p&gt;
Now this feature is going to allow me to take advantage of error numbers by classifying
each exception type, and appending an error number to the exception object. I can
use this information in my database to classify and group errors by type to identify
weak areas in an application as well. Not Earth shattering, but still a useful feature
full of all kinds of possibilities.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=e889b6b0-390d-4c5a-a94c-1702a2d7d8e5" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,e889b6b0-390d-4c5a-a94c-1702a2d7d8e5.aspx</comments>
      <category>All Things</category>
      <category>CSharp</category>
      <category>Debugging</category>
      <category>Design</category>
      <category>General</category>
      <category>Tips and Tricks</category>
      <category>VB.Net</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=e71c0a9e-e77d-4544-8698-d2c8674e7435</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,e71c0a9e-e77d-4544-8698-d2c8674e7435.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,e71c0a9e-e77d-4544-8698-d2c8674e7435.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e71c0a9e-e77d-4544-8698-d2c8674e7435</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So it has been hit or miss posting here, but I am trying to correct it by bringing
on some additional help. I set up a new blog, <a href="http://www.developernation.net">developernation.net</a>,
and begun getting some content on there. Likely I'll crosspost on here too (my content
anyways) but likely most new entries are going to be there first. I figured if I could
get someone else on there helping doing some content, it will have more regular posts.
This blog will continue, just a lag a few days on the content of theother site, and
contain more personal observations.
</p>
        <p>
So swing on by and pop in. I've started off with a bang, and I am in the process of
posting a web service design I created and tested which handles paging and sorting
of data on the server, which my initial tests have shown to be highly efficient. I
am walking through the entire design, and by the end of the weekend I hope to have
the series done and the code posted. If not, you can wait a few days and I will post
it all here as well. 
</p>
        <p>
Thanks!
</p>
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=e71c0a9e-e77d-4544-8698-d2c8674e7435" />
      </body>
      <title>A change of directions...</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,e71c0a9e-e77d-4544-8698-d2c8674e7435.aspx</guid>
      <link>http://www.dotnettechnologies.com/2006/04/28/AChangeOfDirections.aspx</link>
      <pubDate>Fri, 28 Apr 2006 15:38:06 GMT</pubDate>
      <description>&lt;p&gt;
So it has been hit or miss posting here, but I am trying to correct it by bringing
on some additional help. I set up a new blog, &lt;a href="http://www.developernation.net"&gt;developernation.net&lt;/a&gt;,
and begun getting some content on there. Likely I'll crosspost on here too (my content
anyways) but likely most new entries are going to be there first. I figured if I could
get someone else on there helping doing some content, it will have more regular posts.
This blog will continue, just a lag a few days on the content of theother site, and
contain more personal observations.
&lt;/p&gt;
&lt;p&gt;
So swing on by and pop in. I've started off with a bang, and I am in the process of
posting a web service design I created and tested which handles paging and sorting
of data on the server, which my initial tests have shown to be highly efficient. I
am walking through the entire design, and by the end of the weekend I hope to have
the series done and the code posted. If not, you can wait a few days and I will post
it all here as well. 
&lt;/p&gt;
&lt;p&gt;
Thanks!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=e71c0a9e-e77d-4544-8698-d2c8674e7435" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,e71c0a9e-e77d-4544-8698-d2c8674e7435.aspx</comments>
      <category>All Things</category>
      <category>ASP.Net</category>
      <category>C#</category>
      <category>CSharp</category>
      <category>Debugging</category>
      <category>Design</category>
      <category>General</category>
      <category>SQL Tips</category>
      <category>Tips and Tricks</category>
      <category>Tools</category>
      <category>VB.Net</category>
      <category>Web Services</category>
      <category>Windows</category>
      <category>WinForms</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=85fc9c9c-5e1e-4b33-8873-86b05c0d443d</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,85fc9c9c-5e1e-4b33-8873-86b05c0d443d.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,85fc9c9c-5e1e-4b33-8873-86b05c0d443d.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=85fc9c9c-5e1e-4b33-8873-86b05c0d443d</wfw:commentRss>
      <title>Web Service Issues Part II: The Underlying Connection was closed</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,85fc9c9c-5e1e-4b33-8873-86b05c0d443d.aspx</guid>
      <link>http://www.dotnettechnologies.com/2006/03/16/WebServiceIssuesPartIITheUnderlyingConnectionWasClosed.aspx</link>
      <pubDate>Thu, 16 Mar 2006 05:19:42 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;Previously, I discussed how I worked around a firewall
issue where the HTTPS port was re-mapped, and the return URL was different than the
request URL as a result of that remapping. So I trudged on, and hit a real stumper.
Here’s the new issue:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;&lt;em&gt;&lt;strong&gt;The underlying connection was closed: Could
not establish secure channel for SSL/TLS. Inner Exception: The function completed
successfully, but must be called again to complete the context&lt;/strong&gt;&lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;I ran across Jan Tielen’s blog post (&lt;/font&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx" target=_blank&gt;&lt;font face=Arial&gt;http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx&lt;/font&gt;&lt;/a&gt;&lt;font face=Arial color=#000000&gt;)
where he provided a code snippet to override the GetWebRequest method in the Reference.cs
file. I implemented it, and it worked great --- on my development machine! However,
when rolled out to the same test environment, the problem remained. However, I modified
it futher, and got it to work..&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; Set
web request properties here&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param
name="uri"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;uri &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;override&lt;/span&gt;&lt;font color=#000000&gt; System.Net.WebRequest
GetWebRequest(System.Uri uri) 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.Net.HttpWebRequest
webRequest = (System.Net.HttpWebRequest)WebRequest.Create(uri);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;webRequest.AllowWriteStreamBuffering
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;webRequest.KeepAlive
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 3"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; webRequest;&lt;/font&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;Sort of. When I tried to use DIME with the above code,
it gave me an error “Client found response content type of '', but expected 'text/xml'”.
That was not going to work. I found some more code, and it seemed to work great once
again, until I tried to make a DIME call. Here was that attempt.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;override&lt;/span&gt;&lt;font color=#000000&gt; System.Net.WebRequest
GetWebRequest(System.Uri uri) 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;WebRequest
request = &lt;/font&gt;&lt;span style="COLOR: blue"&gt;base&lt;/span&gt;&lt;font color=#000000&gt;.GetWebRequest(uri);
;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 4"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;font color=#000000&gt; (requestPropertyInfo==&lt;/font&gt;&lt;span style="COLOR: blue"&gt;null&lt;/span&gt;&lt;font color=#000000&gt;) 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 5"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;requestPropertyInfo
= request.GetType().GetProperty(&lt;/font&gt;&lt;span style="COLOR: red"&gt;"Request"&lt;/span&gt;&lt;font color=#000000&gt;); 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;HttpWebRequest
webRequest = (HttpWebRequest)requestPropertyInfo.GetValue(request,&lt;/font&gt;&lt;span style="COLOR: blue"&gt;null&lt;/span&gt;&lt;font color=#000000&gt;); 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;webRequest.KeepAlive
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;&lt;font color=#000000&gt;; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;webRequest.ProtocolVersion
=&amp;nbsp;System.Net.HttpVersion.Version10; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 4"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; request; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;Once again, it worked fine during my WSE calls, but
failed when trying to use DIME attachments with the following error:&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;em&gt;&lt;strong&gt;found
response content 'application/dime', but expected 'text/xml'&lt;/strong&gt;&lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;To save any readers some time, I will go through everything
I tried to resolve the problem, and finally, how I ended up resolving it. Here’s the
items which didn’t work:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried setting the SoapActor&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried turning off the Document protocol&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried setting the request and return URI&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried overding the GetWebRequest function a few
different ways&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried using wsdl instead of asmx in setting up the
Web Reference&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- tried setting the URI target/destination seperately&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- moved web service to the same machine as the calling
web site (but still had to make an external call)&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;-- turned on tracing input and output and analyzed
the logs created by WSE 2.0&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Arial color=#000000&gt;So what finally worked? I ended up abandoning DIME,
and encoded the file as a string, and passed it as an element of my XML. Here’s the
code to encode the file as a string.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; Encodes
the file in a Base64 string format.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;param
name="file"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt;Name
of the file.&lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;///&lt;/span&gt;&lt;span style="COLOR: green; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="COLOR: gray; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;private&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt; EncodeFile(HtmlInputFile
file)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;try&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;font color=#000000&gt; (file.PostedFile.ContentLength
&amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&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;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 3"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;byte&lt;/span&gt;&lt;font color=#000000&gt;[]
fsBytes = &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;byte&lt;/span&gt;&lt;font color=#000000&gt;[file.PostedFile.ContentLength];&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&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.IO.Stream
fileStream = file.PostedFile.InputStream;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&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;fileStream.Read(fsBytes,
0, file.PostedFile.ContentLength);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; Convert.ToBase64String(fsBytes);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&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;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;else&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 3"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; String.Empty;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;catch&lt;/span&gt;&lt;font color=#000000&gt; (Exception
ex)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&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;//Handle
the Error&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; String.Empty;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-FAMILY: 'Courier New'"&gt;&lt;font face=Arial color=#000000&gt;What a trip
it was to get there, but the resulting service has performed well, and I don’t have
the issues I had with DIME. Don’t get me wrong, DIME worked great. But deployment
of the web service in a secure environment proved to be quite a challenge. If you
need more detail in resolving your issue, feel free to leave a comment or shoot me
an email, and I will be glad to save you some of the pain I had to go through!&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=85fc9c9c-5e1e-4b33-8873-86b05c0d443d" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,85fc9c9c-5e1e-4b33-8873-86b05c0d443d.aspx</comments>
      <category>All Things</category>
      <category>ASP.Net</category>
      <category>CSharp</category>
      <category>Debugging</category>
      <category>General</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnettechnologies.com/Trackback.aspx?guid=a37ea5f6-5b2c-497c-b13c-cafeb5557e35</trackback:ping>
      <pingback:server>http://www.dotnettechnologies.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnettechnologies.com/PermaLink,guid,a37ea5f6-5b2c-497c-b13c-cafeb5557e35.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.dotnettechnologies.com/CommentView,guid,a37ea5f6-5b2c-497c-b13c-cafeb5557e35.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnettechnologies.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a37ea5f6-5b2c-497c-b13c-cafeb5557e35</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a little tip, as I didn't read the error message generated as closely as I should
have. I was working this weekend on the Microsoft <a href="http://msdn.microsoft.com/asp.net/downloads/providers/">Code
Template for Building a Provider Based Feature</a> and was migrating some existing
libraries I had for VS2003 to take advantage of the features in VS2005. 
</p>
        <p>
First, let me say I love things in VS2005 like Generics, and the implementation of
the Provider Model. I was migrating my data access libraries and error handling libraries,
and was setting up some tests in nUnit as part of ongoing testing. Although I haven't
changed my data and error handling models in a long time, I figured it was a great
design idea to be able to change them dynamically using the Provider Model.
</p>
        <p>
To make a long story short, I was running my tests for the data library, and when
I invoked my Data Access classes, I was getting a "TypeInitializationException" error.
I checked and double-checked my configuration file, and it appeared to all be correct.
I looked at the InnerException, and it didn't seem to be much more help. <em>However</em>,
I went further to look at the InnerException of the InnerException, and there's where
I found the solution. The Rosetta Stone? 
</p>
        <ul>
          <li>
            <font color="#0000ff">Only one &lt;configSections&gt; element allowed per config file
and <strong>if present must be the first child of the root &lt;configuration&gt; element.</strong></font>
          </li>
        </ul>
        <p>
          <font color="#000000">A quick check indicated that I hadn't made the configSection
the first element. Doh!</font>
        </p>
        <p>
          <font color="#000000">So there are a few lessons to learn here. 1) Make sure
your configSections is first (normally not a problem, just a cut and paste issue here)
and 2) Make sure you dig <em>REAL</em> deep into the InnerExceptions for the details
and 3) the new Visualizers in vs2005 were too cool and very helpful. </font>
        </p>
        <p>
          <font color="#000000">Hats off to the VS2005 IDE team! It's spawned a few visualizers
I can think of, so if time permits in the future, I will be publishing those right
here!</font>
        </p>
        <img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=a37ea5f6-5b2c-497c-b13c-cafeb5557e35" />
      </body>
      <title>VS2005 Provider Model and the config file</title>
      <guid isPermaLink="false">http://www.dotnettechnologies.com/PermaLink,guid,a37ea5f6-5b2c-497c-b13c-cafeb5557e35.aspx</guid>
      <link>http://www.dotnettechnologies.com/2006/03/14/VS2005ProviderModelAndTheConfigFile.aspx</link>
      <pubDate>Tue, 14 Mar 2006 17:52:31 GMT</pubDate>
      <description>&lt;p&gt;
Just a little tip, as I didn't read the error message generated as closely as I should
have. I was working this weekend on the Microsoft &lt;a href="http://msdn.microsoft.com/asp.net/downloads/providers/"&gt;Code
Template for Building a Provider Based Feature&lt;/a&gt;&amp;nbsp;and was migrating some existing
libraries I had for VS2003 to take advantage of the features in VS2005. 
&lt;/p&gt;
&lt;p&gt;
First, let me say I love things in VS2005 like Generics, and the implementation of
the Provider Model. I was migrating my data access libraries and error handling libraries,
and was setting up some tests in nUnit as part of ongoing testing. Although I haven't
changed my data and error handling models in a long time, I figured it was a great
design idea to be able to change them dynamically using the Provider Model.
&lt;/p&gt;
&lt;p&gt;
To make a long story short, I was running my tests for the data library, and when
I invoked my Data Access classes, I was getting a "TypeInitializationException" error.
I checked and double-checked my configuration file, and it appeared to all be correct.
I looked at the InnerException, and it didn't seem to be much more help. &lt;em&gt;However&lt;/em&gt;,
I went further to look at the InnerException of the InnerException, and there's where
I found the solution. The Rosetta Stone? 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font color=#0000ff&gt;Only one &amp;lt;configSections&amp;gt; element allowed per config file
and &lt;strong&gt;if present must be the first child of the root &amp;lt;configuration&amp;gt; element.&lt;/strong&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font color=#000000&gt;A quick check indicated that I hadn't made the configSection the
first element. Doh!&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;So there are a&amp;nbsp;few lessons to learn here. 1) Make sure your
configSections is first (normally not a problem, just a cut and paste issue here)
and 2) Make sure you dig &lt;em&gt;REAL&lt;/em&gt; deep into the InnerExceptions for the details
and 3) the new Visualizers in vs2005 were too cool and very helpful. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Hats off to the VS2005 IDE team! It's spawned a few visualizers
I can think of, so if time permits in the future, I will be publishing those right
here!&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnettechnologies.com/aggbug.ashx?id=a37ea5f6-5b2c-497c-b13c-cafeb5557e35" /&gt;</description>
      <comments>http://www.dotnettechnologies.com/CommentView,guid,a37ea5f6-5b2c-497c-b13c-cafeb5557e35.aspx</comments>
      <category>All Things</category>
      <category>CSharp</category>
      <category>General</category>
      <category>Tips and Tricks</category>
      <category>Debugging</category>
    </item>
  </channel>
</rss>