<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>YetAnotherDeveloper</title>
    <description>Development blog by Joey Westcott</description>
    <link>http://yetanotherdeveloper.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.0</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://yetanotherdeveloper.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Joey Westcott</dc:creator>
    <dc:title>YetAnotherDeveloper</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <geo:lat>36.101385</geo:lat><geo:long>-79.81425</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/YetAnotherDeveloper" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>WebClient not returning a valid response</title>
      <description>&lt;p&gt;&lt;br /&gt;A while back I was trying to consume some XML from a third party site and I found myself getting stuck on an error.&amp;nbsp; The site would not give me a valid response and would throw up a 403 error.&amp;nbsp; After digging around I found that I left off the user-agent info in the request header.&amp;nbsp; So the moral to this story is: &lt;strong&gt;Don&amp;#39;t forget your user-agent&lt;/strong&gt;!&lt;br /&gt;&lt;br /&gt;Code Sample after the break.&lt;br /&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="rem"&gt;//Get the Document from the url.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    WebClient client = &lt;span class="kwrd"&gt;new&lt;/span&gt; WebClient();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    client.Headers.Add(&lt;span class="str"&gt;&amp;quot;user-agent&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    doc.LoadXml(client.DownloadString(SourceXML));&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    ...&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    ...&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    ...&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/ZYnzfAa24ww" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/ZYnzfAa24ww/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2009/09/12/WebClient-not-returning-a-valid-response.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=d5eb4335-3274-4e03-8090-46cd0d291491</guid>
      <pubDate>Sat, 12 Sep 2009 19:44:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=d5eb4335-3274-4e03-8090-46cd0d291491</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=d5eb4335-3274-4e03-8090-46cd0d291491</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2009/09/12/WebClient-not-returning-a-valid-response.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=d5eb4335-3274-4e03-8090-46cd0d291491</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=d5eb4335-3274-4e03-8090-46cd0d291491</feedburner:origLink></item>
    <item>
      <title>I don't want no stinkin &lt;span&gt;</title>
      <description>&lt;p&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="text-decoration: underline"&gt;Goal:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The label control adds &amp;lt;span&amp;gt; tags around the text when rendered, I needed to have these removed. I also show how to replace the &amp;lt;span&amp;gt; tag with whatever tag you would like.&lt;/p&gt; &lt;p&gt;I currently work on a site that has a custom built CMS, which is not always a good thing.&amp;nbsp; Now don&amp;#39;t get me wrong there are some great ideas in this home grown CMS, but just like any application there are some wrong/bad things as well.&amp;nbsp; Here is one of those bad things that I had the time to fix recently.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The web site content is entered via a WYSIWYG editor by whoever is responsible for the content, this markup (from the WYSIWYG) is stored in the database along with flags/keys that determine when to display this content.&amp;nbsp; If a few content items score the same then they all get built together, each one in its own Label control.&amp;nbsp; This is all fine and dandy, but when it comes time to dynamically create this content and add it to the current page is when they go less than ok.&amp;nbsp; Because of some limitations of the rest of the framework the content has to be built inside a &lt;strong&gt;&lt;em&gt;System.Web.UI.WebControls.WebControl&lt;/em&gt;&lt;/strong&gt;, ok this is fine except we are limited to a select few controls that fall into that category. &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Here are these Controls:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.scriptcontrol.aspx"&gt;System.Web.UI.ScriptControl&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basedataboundcontrol.aspx"&gt;System.Web.UI.WebControls.BaseDataBoundControl&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basedatalist.aspx"&gt;System.Web.UI.WebControls.BaseDataList&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.aspx"&gt;System.Web.UI.WebControls.Button&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.calendar.aspx"&gt;System.Web.UI.WebControls.Calendar&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.checkbox.aspx"&gt;System.Web.UI.WebControls.CheckBox&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.compositecontrol.aspx"&gt;System.Web.UI.WebControls.CompositeControl&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalistitem.aspx"&gt;System.Web.UI.WebControls.DataListItem&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx"&gt;System.Web.UI.WebControls.FileUpload&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlink.aspx"&gt;System.Web.UI.WebControls.HyperLink&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.image.aspx"&gt;System.Web.UI.WebControls.Image&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.label.aspx"&gt;System.Web.UI.WebControls.Label&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linkbutton.aspx"&gt;System.Web.UI.WebControls.LinkButton&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.loginname.aspx"&gt;System.Web.UI.WebControls.LoginName&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.panel.aspx"&gt;System.Web.UI.WebControls.Panel&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sitemapnodeitem.aspx"&gt;System.Web.UI.WebControls.SiteMapNodeItem&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.table.aspx"&gt;System.Web.UI.WebControls.Table&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.tablecell.aspx"&gt;System.Web.UI.WebControls.TableCell&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.tablerow.aspx"&gt;System.Web.UI.WebControls.TableRow&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.aspx"&gt;System.Web.UI.WebControls.TextBox&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.validationsummary.aspx"&gt;System.Web.UI.WebControls.ValidationSummary&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So these controls are great and all but because of this limitation all of the content (well most of it) is being built by adding the content from the database into a label and then added to the page in order.&amp;nbsp; This is fine but as most of you probably know the label control adds &amp;lt;span&amp;gt; tags around the content/text inside of it.&amp;nbsp; Now I know that for the most part a &amp;lt;span&amp;gt; will not break much, in terms of displaying HTML in the browser.&amp;nbsp; In fact the site has run this way for years now with out much problem.&amp;nbsp; Although this works, it also does not follow standards, for example; if the WYSIWYG editor adds a &amp;lt;div&amp;gt; tag then you will have a &amp;lt;div&amp;gt; inside a &amp;lt;span&amp;gt; and we all know this should not be.&lt;/p&gt; &lt;p&gt;In order to remove the &amp;lt;span&amp;gt; tag while still being a WebControl was not going to happen unless I rolled my own control that was a WebControl. So I got to work and ended up creating a new Control that inherited from the Label Control.&amp;nbsp; My new control... say LabelNoSpan, only has one small bit of code that makes this all work.&amp;nbsp; If you were to look into the code of the WebControl class you will see a perfect place to hook into and change how the parent class (label) does its Rendering (hint hint).&amp;nbsp; If I change how the render works then I should be able to remove those nasty &amp;lt;span&amp;gt; tags. Here is what my new class/control looks like.&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Some.Big.Important.Namespace&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="rem"&gt;/// This class was created to remove those nasty &amp;lt;span&amp;gt; tags around all the content on the site.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="rem"&gt;/// this sidesteps the renderbegintag and renderendtag methods by just calling the rendercontents from&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;span class="rem"&gt;/// within the render method.... norm the render method calls all three of those in order.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    &lt;span class="kwrd"&gt;class&lt;/span&gt; LabelNoSpan : Label&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Render(System.Web.UI.HtmlTextWriter writer)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            &lt;span class="kwrd"&gt;base&lt;/span&gt;.RenderContents(writer);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now the reason this works is because the render method of the WebControl class, parent of label, calls these three methods:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderBeginTag(writer)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderContent(writer)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderEndTag(writer)&lt;/p&gt;&lt;p&gt;Now if all we need to do is remove those two tag calls!&amp;nbsp; My new control just overrides the base Render method and just leaves out the call to those two.&amp;nbsp; and bing bang, a label control with no tags.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;The draw back&lt;/u&gt;&lt;/strong&gt; to this is that all the style/css class crap that is an option for a label is now broken, for me this was/is not an issue, but if I still needed them then I would have probably replaced the &amp;lt;span&amp;gt; with a &amp;lt;div&amp;gt; and pulled in all the attributes that were added to the &amp;quot;label&amp;quot;. I have an example of doing just that!&amp;nbsp; it will allow you to change the tag in which this control renders.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;So you want to change that &amp;lt;span&amp;gt; to a &amp;lt;div&amp;gt; or other tag?&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;The WebControl class defines a property called TagKey, that is an enum of type HtmlTextWriterTag and is used in the render methods.&amp;nbsp; In the render methods the writing of the html is carried out by the HtmlTextWriter class, this class relies on the HtmlTextWriterTag inoder to know what tag to wrap around that control.&amp;nbsp; With out requiring these tags then there is no way that the writer can apply style, css classes etc. (which is why none of those work on the LabelNoSpan class).&amp;nbsp; &lt;/p&gt;&lt;p&gt;So without anymore delay here is the super simple code to change out the tag that is applied to a WebControl&lt;/p&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; LabelWithDiv : Label&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; LabelWithDiv(){}&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RenderBeginTag(System.Web.UI.HtmlTextWriter writer)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        &lt;span class="rem"&gt;//Force the tagKey to be a div.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        &lt;span class="kwrd"&gt;this&lt;/span&gt;.AddAttributesToRender(writer);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        writer.RenderBeginTag(HtmlTextWriterTag.Div);        &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;}&lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/zgRhBuskWeo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/zgRhBuskWeo/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2009/03/26/I-dont-want-no-stinkin-3cspan3e.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=2aa659e5-428e-4d87-9c51-5db7edbff2a1</guid>
      <pubDate>Thu, 26 Mar 2009 15:34:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <category>Work</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=2aa659e5-428e-4d87-9c51-5db7edbff2a1</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=2aa659e5-428e-4d87-9c51-5db7edbff2a1</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2009/03/26/I-dont-want-no-stinkin-3cspan3e.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=2aa659e5-428e-4d87-9c51-5db7edbff2a1</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=2aa659e5-428e-4d87-9c51-5db7edbff2a1</feedburner:origLink></item>
    <item>
      <title>Category List bug in BlogEngine.Net 1.4.5.0</title>
      <description>&lt;p&gt;I recently changed the layout of some of my categories in &lt;a href="http://www.codeplex.com/blogengine/Release/ProjectReleases.aspx?ReleaseId=14988" target="_blank"&gt;BlogEngine.Net 1.4.5.0&lt;/a&gt;.&amp;nbsp; In short I wanted to add a few parent Categories for the categories that I was already using.&amp;nbsp; For example: I have a category name &amp;quot;.net&amp;quot; that I lump all of my .net related items in but what if I also have some java code or C++ code and I have a category for them as well?&amp;nbsp; To me it makes sense to have a parent category called &amp;quot;development&amp;quot; and then if I want to view all code or development related items including C#, VB, Java, HTML, C/C++ then all I have to do is click on the new parent category and voila you have everything development related no matter what the sub-category is.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;So for the bug:&lt;/strong&gt;&lt;br /&gt;When the Category List control/widget is rendered it looks at the Category.FullTitle to build the URI. This works fine if you are not a sub-category, like &amp;quot;.net&amp;quot; using the example above, but when rendering the URI for these sub-categories its using the FullTitle which is a concatenation of the parents categories and the title of the sub-category: ie: &amp;quot;development - .net&amp;quot;.&amp;nbsp; This does not work and that link should really just be to the &amp;quot;.net&amp;quot; category. So here is the simple code fix that I used, but take in mind that you could also make it so that &amp;quot;development - .net&amp;quot; works.&amp;nbsp; I just found a quick and easy fix...&lt;br /&gt;&lt;br /&gt;Code fix after the break.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The code change needs to take place in the app_code/controls/categorylist.cs file on line ~130.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;strong&gt;Original code:&lt;/strong&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;HtmlAnchor anc = &lt;span class="kwrd"&gt;new&lt;/span&gt; HtmlAnchor();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;anc.HRef = Utils.RelativeWebRoot + &lt;span class="str"&gt;&amp;quot;category/&amp;quot;&lt;/span&gt; + Utils.RemoveIllegalCharacters(key) + BlogSettings.Instance.FileExtension;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:&lt;/span&gt;  anc.InnerHtml = HttpUtility.HtmlEncode(key) + postCount;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;anc.Title = &lt;span class="str"&gt;&amp;quot;Category: &amp;quot;&lt;/span&gt; + key;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;li.Controls.Add(anc);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;ul.Controls.Add(li);&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fixed Code:&lt;/strong&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;&amp;nbsp;&amp;nbsp; 1:&amp;nbsp; &lt;/span&gt;HtmlAnchor anc = &lt;span class="kwrd"&gt;new&lt;/span&gt; HtmlAnchor();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;Category category = Category.GetCategory(dic[key]);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;anc.HRef = Utils.RelativeWebRoot + &lt;span class="str"&gt;&amp;quot;category/&amp;quot;&lt;/span&gt; + Utils.RemoveIllegalCharacters(category.Title) + BlogSettings.Instance.FileExtension;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;anc.InnerHtml = HttpUtility.HtmlEncode(key) + postCount;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;anc.Title = &lt;span class="str"&gt;&amp;quot;Category: &amp;quot;&lt;/span&gt; + key;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;li.Controls.Add(anc);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;ul.Controls.Add(li);&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/B7bQ9zsJPTw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/B7bQ9zsJPTw/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/09/21/Category-List-bug-in-BlogEngineNet-1450.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=69298b07-3365-4427-a95f-016a49f1cba5</guid>
      <pubDate>Sun, 21 Sep 2008 11:17:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=69298b07-3365-4427-a95f-016a49f1cba5</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=69298b07-3365-4427-a95f-016a49f1cba5</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/09/21/Category-List-bug-in-BlogEngineNet-1450.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=69298b07-3365-4427-a95f-016a49f1cba5</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=69298b07-3365-4427-a95f-016a49f1cba5</feedburner:origLink></item>
    <item>
      <title>TF14082: Can not lock item message during a branch/merge</title>
      <description>&lt;p&gt;
This morning I was creating a branch in &lt;a href="http://en.wikipedia.org/wiki/Team_Foundation_Server" target="_blank"&gt;Team Foundation Server&lt;/a&gt; via &lt;a href="http://en.wikipedia.org/wiki/Visual_Studio_Team_System" target="_blank"&gt;VSTS&lt;/a&gt;, the branch name that I wanted to use was one that has been used before and is in fact still sitting around but is now old and out of date. So it being so out of date I just decided to delete the branch and then recreate if from the main branch of code.&amp;nbsp; After deleting the branch, I went to create the &lt;em&gt;new&lt;/em&gt; branch and I get the message &amp;quot;&lt;strong&gt;TS14082: Can not lock item $/projectName/../filename.ext for merging. This item is checkout to another workspace&lt;/strong&gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://yetanotherdeveloper.com/image.axd?picture=WindowsLiveWriter/TFSCannotlockitemmessageduringabranchmer_F9A4/tfs.cannot.lock.item_2.jpg"&gt;&lt;img style="border-width: 0px" src="http://yetanotherdeveloper.com/image.axd?picture=WindowsLiveWriter/TFSCannotlockitemmessageduringabranchmer_F9A4/tfs.cannot.lock.item_thumb.jpg" border="0" alt="tfs.cannot.lock.item" width="661" height="127" /&gt;&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
At this point I have already deleted and committed the changed to the branch of code that I&amp;#39;m trying to recreate.&amp;nbsp; So being able to see what or even find who has files checked out was not an option, I was for the most part out of luck, well at least using the default tools that come in VSTS.&amp;nbsp; So I fired up the trusty &lt;a href="http://www.attrice.info/cm/tfs/index.htm" target="_blank"&gt;Team Foundation SideKicks&lt;/a&gt; application and opened the &lt;em&gt;Status Sidekick. &lt;/em&gt;This application allows you to search and view who has files checked out and what each of those files are (great tool, go get it). This tool allows you to filter based on username or even project name and then shows a nice tree view of all the files that are checked out and who has them checked out.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://yetanotherdeveloper.com/image.axd?picture=WindowsLiveWriter/TFSCannotlockitemmessageduringabranchmer_F9A4/team.foundation.sidekick.status.screen_2.gif"&gt;&lt;img style="border-width: 0px" src="http://yetanotherdeveloper.com/image.axd?picture=WindowsLiveWriter/TFSCannotlockitemmessageduringabranchmer_F9A4/team.foundation.sidekick.status.screen_thumb.gif" border="0" alt="team.foundation.sidekick.status.screen" width="644" height="441" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
After gathering the details above I contacted each of the offending people who had items checked out in the old, now deleted branch, and asked them to &amp;quot;undo changes&amp;quot; to each of the files that were locked.&amp;nbsp; After all the files are no longer checked out or locked in any way, it allowed me to go ahead and recreate the branch using the same name.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;What if you cant get a hold of those people or they cant undo the changes?&lt;br /&gt;
&lt;/strong&gt;Lucky for you that the Team Foundation Sidekicks - Status Sidekick also supports undoing others pending changes. It accomplishes this by using the following command from the commandline:&lt;br /&gt;
&lt;br /&gt;
tf undo $/path/to/file.txt /workspace:&amp;lt;WSname&amp;gt;;&amp;lt;domain\user&amp;gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/g27htq9vzbw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/g27htq9vzbw/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/09/06/TF14082-Can-not-lock-item-message-during-a-branchmerge.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=95f26940-e805-44ed-b75b-b93d7d9d2c4e</guid>
      <pubDate>Sat, 06 Sep 2008 19:45:00 -1000</pubDate>
      <category>Development</category>
      <category>Work</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=95f26940-e805-44ed-b75b-b93d7d9d2c4e</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=95f26940-e805-44ed-b75b-b93d7d9d2c4e</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/09/06/TF14082-Can-not-lock-item-message-during-a-branchmerge.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=95f26940-e805-44ed-b75b-b93d7d9d2c4e</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=95f26940-e805-44ed-b75b-b93d7d9d2c4e</feedburner:origLink></item>
    <item>
      <title>ImageButton's ImageUrl not resolving correctly</title>
      <description>&lt;p&gt;I was working with an image button the other day and for the life of me I couldn&amp;#39;t get rid of a runtime error when it went to load the control.&amp;nbsp; I had a dynamic URL that was something similar to this:&lt;/p&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;strong&gt;ImageUrl=&amp;#39;&lt;/strong&gt;&lt;/span&gt;../ImageHandler.ashx?File=&amp;lt;%#Eval(&lt;span class="str"&gt;&amp;quot;Path&amp;quot;&lt;/span&gt;) %&amp;gt;&amp;amp;MaxSize=&amp;lt;%=PhotoMaxSize %&amp;gt;&amp;amp;ApplyWaterMark=&amp;lt;%=ApplyWatermark %&amp;gt;&amp;#39;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The problem with this is that when the .Net Framework goes to parse this property it first see the &amp;quot;../*&amp;quot; and then goes down a routine to parse the path out, BUT forgets about the fact that I might have something in the URL that needs to be resolved.&amp;nbsp; It did take me quite a while to figure out what was going on and why the &amp;quot;resolved &amp;quot; path was the same as what was between the quotes.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;My solution was to change it up just a little bit, here is what I ended up with:&lt;/p&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;ImageUrl=&lt;span class="str"&gt;&amp;#39;&amp;lt;%# string.Format(&amp;quot;../ImageHandler.ashx?File={0}&amp;amp;MaxSize={1}&amp;amp;ApplyWaterMark={2}&amp;quot;, Eval(&amp;quot;Path&amp;quot;), PhotoMaxSize, ApplyWatermark) %&amp;gt;&amp;#39;&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The result is the same but I just used a little help from the oh so nice &lt;a href="http://msdn.microsoft.com/en-us/library/system.string.format(VS.85).aspx" target="_blank"&gt;string.Format method&lt;/a&gt;. Now because the URL didn&amp;#39;t start with &amp;quot;../&amp;quot; or even &amp;quot;~/&amp;quot; it looked and noticed that it needed to resolve what is in the &amp;lt;%#...%&amp;gt;.&amp;nbsp; On a side note this also applies to the other properties on the control and i would assume that other controls are handled the same way. &lt;/p&gt;&amp;nbsp; &lt;p&gt;I don&amp;#39;t know maybe I should have known this before now. &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/Zz8KArGm7Zg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/Zz8KArGm7Zg/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/08/16/ImageButtons-ImageUrl-not-resolving-correctly.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=ec1b5f55-acfd-4771-981f-af44dcb9a074</guid>
      <pubDate>Sat, 16 Aug 2008 18:29:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=ec1b5f55-acfd-4771-981f-af44dcb9a074</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=ec1b5f55-acfd-4771-981f-af44dcb9a074</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/08/16/ImageButtons-ImageUrl-not-resolving-correctly.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=ec1b5f55-acfd-4771-981f-af44dcb9a074</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=ec1b5f55-acfd-4771-981f-af44dcb9a074</feedburner:origLink></item>
    <item>
      <title>Could not load file or assembly 'App_Web...'</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;Could not load file or assembly &amp;#39;App_Web_9olwzuwu, Version=&lt;/font&gt;&lt;/em&gt;&lt;a href="http://0.0.0.0"&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;0.0.0.0&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;, Culture=neutral, PublicKeyToken=null&amp;#39; or one of its dependencies. The system cannot find the file specified.&lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Error:&lt;br /&gt;&lt;/strong&gt;Every now and then an ASP.Net 2.0 production app is coming up with the error &lt;font color="#ff0000"&gt;&amp;ldquo;Could not load file or assembly &amp;#39;App_Web...&amp;quot;&lt;/font&gt;.&amp;nbsp;&amp;nbsp; The app works fine up until that point and then it breaks and the only solution seems to be a full recompile.&amp;nbsp;&amp;nbsp; It somehow seems like it is occurring when the application has recycled and .Net Framework recompiles the site to its temp files.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Problem:&lt;br /&gt;&lt;/strong&gt;The website is throwing an error trying to load a custom web control.&amp;nbsp; You see in the last release, we added a new custom control to another custom web control that is displayed as needed.&amp;nbsp; Because the outer most/parent control and the new child control are separate controls in source, when the .Net Framework goes to compile one of these two controls and does not recompile the other one at the same time you will have a an out of date file trying to reference the old version of the assembly.&amp;nbsp; The fact that the .Net framework appends a random string to the name of the assembly at compile time the name of the newly compiled file and the previous version of the file cause a file name mismatch and therefore the outer/parent control is looking for a file that no longer exists.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Possible Permanent Fix:&lt;br /&gt;&lt;/strong&gt;&lt;font color="#ff0000"&gt;WARNING: &lt;br /&gt;The Hotfixes available through this program have not gone through full Microsoft product regression testing. Specifically, these Hotfixes have had targeted testing which does not include testing in combination with other Hotfixes. You are encouraged to install only the Hotfixes needed to address the particular product problem you may have.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Possible Work Around(s) or Temporary Fixes:&lt;/strong&gt; &lt;br /&gt;1) By setting the batch property of the compilation tag to false in the web.config file &lt;br /&gt;2) You can also decrease how often it happens by setting:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;compilation debug=&amp;quot;false&amp;quot; numRecompilesBeforeAppRestart=&amp;quot;50&amp;quot; /&amp;gt;  &lt;/p&gt;&lt;p&gt;See the KB Article &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839"&gt;934839&lt;/a&gt; for more details  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Fixes for the Issue after it has already taken place:&lt;/strong&gt; &lt;br /&gt;1) Delete temp ASP.Net files (this takes down the site) &lt;br /&gt;2) Force the parent/outter control to recompile, edit and save the code file.&amp;nbsp; This is a better option for a fix than #1 because this does not bring down the website.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;My Suggestion:&lt;/strong&gt; &lt;br /&gt;1) First I think that we should put in place the temporary fix #1 from above, this might prevent all issues in the future and could be the only answer we need. &lt;br /&gt;2) Second I would download and install the 934839 hotfix from Microsoft in the QA environment to verify that it does not cause any problems. After some time of testing the hotfix in QA I would install the hotfix to have a permanent fix for this issue. At this time we could remove the temporary work around #1.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;  &lt;/p&gt;&lt;ul&gt;			&lt;li&gt;Microsoft KB Article.  		&lt;ul&gt;						&lt;li&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839&lt;/a&gt;&lt;/li&gt;		&lt;/ul&gt;		&lt;/li&gt;		&lt;li&gt;Important Thread on the bug in the .Net Framework 2.0  		&lt;ul&gt;						&lt;li&gt;&lt;a href="http://forums.asp.net/t/986130.aspx"&gt;http://forums.asp.net/t/986130.aspx&lt;/a&gt;&lt;/li&gt;		&lt;/ul&gt;		&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Other Helpful Links on the subject:&lt;/strong&gt;  &lt;/p&gt;&lt;ul&gt;			&lt;li&gt;&lt;a href="http://www.velocityreviews.com/forums/t115999-could-not-load-file-or-assembly-aspweb-in-aspnet-20.html"&gt;http://www.velocityreviews.com/forums/t115999-could-not-load-file-or-assembly-aspweb-in-aspnet-20.html&lt;/a&gt;  &lt;/li&gt;		&lt;li&gt;&lt;a href="http://msdn.microsoft.com/asp.net/reference/migration/upgrad%20e/default.aspx?pull=/library/en-us/dnaspp/html/conversionissuesasp_net.asp"&gt;http://msdn.microsoft.com/asp.net/...conversionissuesasp_net.asp&lt;/a&gt;  &lt;/li&gt;		&lt;li&gt;&lt;a href="http://www.bizpassion.com/?p=57"&gt;http://www.bizpassion.com/?p=57&lt;/a&gt;  &lt;/li&gt;		&lt;li&gt;&lt;a href="http://www.velocityreviews.com/forums/t119679-20-problem.html"&gt;http://www.velocityreviews.com/forums/t119679-20-problem.html&lt;/a&gt;  &lt;/li&gt;		&lt;li&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;934839&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; After putting Temp fix #1 I have not had the problem again. &amp;nbsp;I have had this fix in place for over 6 months and all is good!&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/67K9myZi_bs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/67K9myZi_bs/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/08/10/Could-not-load-file-or-assembly-App_Web.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=3ee593c9-d4c5-4fce-bc0e-12b19bc75e8a</guid>
      <pubDate>Sun, 10 Aug 2008 16:37:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <category>Work</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=3ee593c9-d4c5-4fce-bc0e-12b19bc75e8a</pingback:target>
      <slash:comments>8</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=3ee593c9-d4c5-4fce-bc0e-12b19bc75e8a</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/08/10/Could-not-load-file-or-assembly-App_Web.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=3ee593c9-d4c5-4fce-bc0e-12b19bc75e8a</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=3ee593c9-d4c5-4fce-bc0e-12b19bc75e8a</feedburner:origLink></item>
    <item>
      <title>IIS Error: The service could not bind instance 1</title>
      <description>&lt;p&gt;
I got this error the other day and was stumped on what caused it.&amp;nbsp; It all started when the place i work decided to install webfiltering, most of the time this would not bother me and i would just go about my normal business. Not this time, so myself and another coworker thought that we would just bypassed the filter using an ssh tunnel to our boxes at home and with the use of a proxy run all web traffic over the ssh.&amp;nbsp; By the way this works great.&amp;nbsp; My solution after the break.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Back to the error: &amp;quot;The service could not bind instance 1&amp;quot;&lt;br /&gt;
&lt;/strong&gt;after i did an iisreset i noticed that my default web site would not come back on line.&amp;nbsp; So after seeing the above error it got me thinking about what would cause this change.&amp;nbsp; After about 20 mins i remembered that i had been running &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank"&gt;PuTTy&lt;/a&gt; to create my ssh tunnel and that it was dealing with port 80 as well.&amp;nbsp; I shutdown &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank"&gt;PuTTy&lt;/a&gt; and bounced IIS, and this time the site came up as normal.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The moral to the story:&lt;/strong&gt;&lt;br /&gt;
if you are running something like a ssh proxy over port 80 or i have even noticed that some people have had issues with Skype using port 80.&amp;nbsp; I think that a lot of application that want to bypass the firewall will resort to trying to use port 80 because this port is almost never fully blocked for web traffic. Just double check what apps you have running and if you think that they might be using port 80 then shut them down and give &amp;#39;ol IIS a bounce and it should clear it all up.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/xsYBCYtoPjo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/xsYBCYtoPjo/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/03/15/IIS-Error-The-service-could-not-bind-instance-1.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=4bf8299f-375b-4c13-9603-1e48f60f2c44</guid>
      <pubDate>Sat, 15 Mar 2008 04:22:00 -1000</pubDate>
      <category>Development</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=4bf8299f-375b-4c13-9603-1e48f60f2c44</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=4bf8299f-375b-4c13-9603-1e48f60f2c44</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/03/15/IIS-Error-The-service-could-not-bind-instance-1.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=4bf8299f-375b-4c13-9603-1e48f60f2c44</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=4bf8299f-375b-4c13-9603-1e48f60f2c44</feedburner:origLink></item>
    <item>
      <title>Monitor Your Websites With Sound</title>
      <description>&lt;div&gt;
This weekend I had some fun messing around with the idea of monitoring one of my sites via sounds. All of the sites I run are .Net 2.0 or .Net 3.5, with that it allowed me to create a .Net solution that would work with any of my sites. &lt;br /&gt;
&lt;br /&gt;
The idea started with a single thought of &amp;quot;boy it would be kinda neat to hear a sound when someone viewed a page in my site.&amp;quot; So I spent all of 30 mins figuring out what i wanted to do create. I built a simple library for playing sounds based on a file or a path to a file. I then took the new lib and built a simple HttpModule for attaching to a site and tapping into begin request event. &lt;br /&gt;
&lt;br /&gt;
This could be used for monitoring a few different sites along with a few different request types, not to mention that you could also include a different sound for events like, app start, begin request, end request, a request for .* file types (ie: if you wanted to know when someone downloaded one of your .rar files, you could just play a different sound file.) I&amp;#39;m sure that you could prob add a hundred more options to this list if you really wanted to. &lt;br /&gt;
&lt;br /&gt;
Anyway I enjoyed hearing all the hits to my different sites this weekend and thought that you might like to as well. &lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;sound playing lib. &lt;br /&gt;
&lt;/strong&gt;
&lt;div class="codeBlock"&gt;
&lt;font size="2" color="#cc7832"&gt;namespace&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; YetAnotherDeveloper.Common.SoundUtility&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;br /&gt;
{ &lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;sealed&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;class&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;/font&gt;&lt;font size="2" color="#ffc66d"&gt;Player&lt;/font&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; Player() { }&lt;br /&gt;
&lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;static&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;void&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; PlaySound(&lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;string&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; filePath)&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SoundPlayer player = &lt;/font&gt;&lt;font size="2" color="#cc7832"&gt;new&lt;/font&gt;&lt;font size="2" color="#ffffff"&gt; SoundPlayer();&lt;/font&gt; &lt;font size="2" color="#ffffff"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; player.SoundLocation = filePath; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; player.Play(); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
} &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;simple http module example. &lt;br /&gt;
&lt;/strong&gt;
&lt;div class="codeBlock"&gt;
&lt;font size="2" color="#cc7832"&gt;namespace&lt;/font&gt; YetAnotherDeveloper.HttpModules &lt;br /&gt;
{ &lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; &lt;font size="2" color="#cc7832"&gt;class&lt;/font&gt; &lt;font size="2" color="#ffc66d"&gt;PlaySoundModule&lt;/font&gt; : &lt;font size="2" color="#6897bb"&gt;IHttpModule&lt;/font&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; &lt;font size="2" color="#cc7832"&gt;void&lt;/font&gt; Dispose() { } &amp;nbsp; &lt;font size="2" color="#808080"&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Tap into the events.&lt;/font&gt; &lt;font size="2" color="#cc7832"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; &lt;font size="2" color="#cc7832"&gt;void&lt;/font&gt; Init(&lt;font size="2" color="#ffc66d"&gt;HttpApplication&lt;/font&gt; context) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context.BeginRequest += &lt;font size="2" color="#cc7832"&gt;new&lt;/font&gt; &lt;font size="2" color="#6897bb"&gt;EventHandler&lt;/font&gt;(context_BeginRequest);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font size="2" color="#cc7832"&gt;void&lt;/font&gt; context_BeginRequest(&lt;font size="2" color="#cc7832"&gt;object&lt;/font&gt; sender, &lt;font size="2" color="#ffc66d"&gt;EventArgs&lt;/font&gt; e) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YetAnotherDeveloper.Common.SoundUtility.&lt;font size="2" color="#ffc66d"&gt;Player&lt;/font&gt;.PlaySound(&lt;font size="2" color="#a31515"&gt;@&amp;quot;C:\Sounds\PageLoad.wav&amp;quot;&lt;/font&gt;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
} &lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Modified webconfig to include this module in its pipeline. &lt;br /&gt;
&lt;/strong&gt;
&lt;div class="codeBlock"&gt;
&amp;lt;&lt;font size="2" color="#cc7832"&gt;httpModules&lt;/font&gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;font size="2" color="#cc7832"&gt;add&lt;/font&gt; name=&amp;quot;&lt;font size="2" color="#a5c25c"&gt;ScriptModule&lt;/font&gt;&amp;quot; type=&amp;quot;&lt;font size="2" color="#a5c25c"&gt;System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/font&gt;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt; &lt;font size="2" color="#cc7832"&gt;add&lt;/font&gt; name=&amp;quot;&lt;font size="2" color="#a5c25c"&gt;PlaySoundModule&lt;/font&gt;&amp;quot; type=&amp;quot;&lt;font size="2" color="#a5c25c"&gt;YetAnotherDeveloper.HttpModules.PlaySoundModule, YetAnotherDeveloper.HttpModules&lt;/font&gt;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/&lt;font size="2" color="#cc7832"&gt;httpModules&lt;/font&gt;&amp;gt; 
&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/UYWkRlejWOo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/UYWkRlejWOo/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/02/24/Monitor-Your-Websites-With-Sound.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=205471c3-0aac-4d07-bdd3-38d7e0881d76</guid>
      <pubDate>Sun, 24 Feb 2008 13:20:00 -1000</pubDate>
      <category>Development</category>
      <category>.Net</category>
      <category>Projects</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=205471c3-0aac-4d07-bdd3-38d7e0881d76</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=205471c3-0aac-4d07-bdd3-38d7e0881d76</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/02/24/Monitor-Your-Websites-With-Sound.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=205471c3-0aac-4d07-bdd3-38d7e0881d76</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=205471c3-0aac-4d07-bdd3-38d7e0881d76</feedburner:origLink></item>
    <item>
      <title>My C# Quine</title>
      <description>&lt;p&gt;I was just dorking it up on the net today and I found an old topic that I haven't thought about in a long time.&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;The Quine&lt;/strong&gt;: (&lt;a href="http://en.wikipedia.org/wiki/Quine_%28computing%29" target="_blank"&gt;wikipedia&lt;/a&gt;)     &lt;br /&gt;In short it is a program in which the output or result of the code is the output of the program itself.&amp;#160; So it really just is a program that's only goal is to output the source code of the program.&amp;#160; Many find it &amp;quot;fun&amp;quot; to see how short of a program they can create, for this reason most will leave out formatting including return/line breaks or anything else that is not required for the program to function.     &lt;br /&gt;    &lt;br /&gt;After a little search on the topic I ran into &lt;a href="http://www.nyx.net/~gthompso/quine.htm" target="_blank"&gt;this&lt;/a&gt; website that had an example of quines for a ton of different programming languages, but I didn't see any for C# or for that matter none for any .Net languages.&amp;#160; This is probably because the site is old and has not been updated in a long time.&amp;#160; So as I started to type in google &amp;quot;C# quine&amp;quot; I stopped myself and decided that I would just write my own... so I did.&amp;#160; As you can tell I didn't aim for the shortest possible quine, but this being my first run at this I just decided to keep it simple. Maybe I will redo this making the shortest one that I can.     &lt;br /&gt;    &lt;br /&gt;First I'll show you the program with all the nice formatting that you are used to with Visual Studio, I have removed the formatting because I didn't want to include it in the output of the program.&amp;#160; I did include it at first and it was working just fine but it adds a lot of more junk that is just really not needed. &lt;/p&gt;  &lt;p&gt;Code after the break    &lt;br /&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;br /&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; Q &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;{ &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main() &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    { &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;string&lt;/span&gt; s = &lt;span class="str"&gt;&amp;quot;using System;class Q{2}static void Main(){2}string s ={1}{0}{1};Console.Write(string.Format(s, s, (char)34, (char)123, (char)125));{3}{3}&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        Console.Write(&lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(s, s, (&lt;span class="kwrd"&gt;char&lt;/span&gt;)34, (&lt;span class="kwrd"&gt;char&lt;/span&gt;)123, (&lt;span class="kwrd"&gt;char&lt;/span&gt;)125)); &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    } &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;} &lt;/pre&gt;
&lt;/div&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;&lt;strong&gt;And now my real Quine in all its one line glory:&lt;/strong&gt; 

&lt;br /&gt;&lt;font size="1"&gt;(fyi its 252 characters long, the shorter ones are just under 200 in C#, so you can see I still could trim some fat on this one.)&lt;/font&gt; 

&lt;br /&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;span class="kwrd"&gt;class&lt;/span&gt; Q{&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(){&lt;span class="kwrd"&gt;string&lt;/span&gt; s =&lt;span class="str"&gt;&amp;quot;using System;class Q{2}static void Main(){2}string s ={1}{0}{1};Console.Write(string.Format(s,s,(char)34,(char)123,(char)125));{3}{3}&amp;quot;&lt;/span&gt;;Console.Write(&lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(s,s,(&lt;span class="kwrd"&gt;char&lt;/span&gt;)34,(&lt;span class="kwrd"&gt;char&lt;/span&gt;)123,(&lt;span class="kwrd"&gt;char&lt;/span&gt;)125));}} &lt;/pre&gt;
&lt;/div&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;Update: 01/21/2008&lt;/strong&gt; 

  &lt;br /&gt;Ok here is my short version of the one above. Not bad; only 166 characters long. I'm not sure if this is one of the shorter ones around, I will have to search and see if I can find one shorter.&amp;#160; &lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; Q{&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(){&lt;span class="kwrd"&gt;string&lt;/span&gt; s =&lt;span class="str"&gt;&amp;quot;class Q{{static void Main(){{string s ={1}{0}{1};System.Console.Write(s,s,(char)34);}}}}&amp;quot;&lt;/span&gt;;System.Console.Write(s,s,(&lt;span class="kwrd"&gt;char&lt;/span&gt;)34);}} &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;strong&gt;Update: 11/11/2008 
    &lt;br /&gt;&lt;/strong&gt;Igor Ostrovsky wrote a nice article on quines, check it out &lt;a href="http://igoro.com/archive/how-to-write-a-self-printing-program" target="_blank"&gt;here&lt;/a&gt;. Also here is the updated quine, now at 149 characters! 

  &lt;br /&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div class="csharpcode"&gt;
    &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Q{&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(){var s=&lt;span class="str"&gt;&amp;quot;class Q{{static void Main(){{var s={1}{0}{1};System.Console.Write(s,s,'{1}');}}}}&amp;quot;&lt;/span&gt;;System.Console.Write(s,s,&lt;span class="str"&gt;'&amp;quot;'&lt;/span&gt;);}}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/1KNTj8EtGFw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/1KNTj8EtGFw/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2008/01/20/My-Quine.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=bc260b97-b452-4255-a246-be289709d6ff</guid>
      <pubDate>Sun, 20 Jan 2008 10:51:00 -1000</pubDate>
      <category>Development</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=bc260b97-b452-4255-a246-be289709d6ff</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=bc260b97-b452-4255-a246-be289709d6ff</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2008/01/20/My-Quine.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=bc260b97-b452-4255-a246-be289709d6ff</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=bc260b97-b452-4255-a246-be289709d6ff</feedburner:origLink></item>
    <item>
      <title>How to remove rogue/zombie workspaces from TeamServer</title>
      <description>&lt;p&gt;
&lt;br /&gt;
When&amp;nbsp;I started my new job&amp;nbsp;I needed to setup my visual studio and map all of my projects to my workspace. But when&amp;nbsp;I attemped to map a project from teamserver to my local box,&amp;nbsp;I got an error stating that this computer already has a workspace with that path in it.&amp;nbsp; At first&amp;nbsp;I didn&amp;#39;t really understand how this could happen because my computer was just F&amp;amp;R&amp;#39;ed (formated and reinstalled), but after a few minutes&amp;nbsp;I realized that this computer probably had the same name as&amp;nbsp;it did before I got there.&amp;nbsp; The person who used this computer&amp;nbsp;left the company before&amp;nbsp;I inherited it and left his workspaces on the server. After doing some digging around the web, I found a set of commands that would allow me to verify workspaces mapped to this computer and remove them if needed-- and because all&amp;nbsp;of this information is stored on the server,&amp;nbsp;reinstalling the client had no effect on it. 
&lt;/p&gt;
&lt;p&gt;
Here is how it all played out... the&amp;nbsp;sections in red are the commands&amp;nbsp;I used.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
 &amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;div class="codeBlock"&gt;
&lt;p&gt;
&lt;font size="1"&gt;C:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;&lt;font color="#ff0000"&gt;tf workspaces /computer:ComputerName /owner:* /format:detailed /server:http://teamserver01:8080&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font size="1"&gt;
&lt;hr /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;Workspace: ComputerName&lt;br /&gt;
Owner&amp;nbsp;&amp;nbsp;&amp;nbsp; : WESTCOTTJ&lt;br /&gt;
Computer : ComputerName&lt;br /&gt;
Comment&amp;nbsp; :&lt;br /&gt;
Server&amp;nbsp;&amp;nbsp; :&amp;nbsp;teamserver01&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Working folders:&lt;br /&gt;
&amp;nbsp;.&lt;br /&gt;
&amp;nbsp;&lt;/font&gt;&lt;font size="1"&gt;.&lt;br /&gt;
&amp;nbsp;&lt;/font&gt;&lt;font size="1"&gt;.&lt;/font&gt; 
&lt;/p&gt;
&lt;font size="1"&gt;
&lt;hr /&gt;
&lt;/font&gt;&lt;br /&gt;
&lt;font size="1"&gt;Workspace: ComputerName&lt;br /&gt;
Owner&amp;nbsp;&amp;nbsp;&amp;nbsp; : TheOtherGuy&lt;br /&gt;
Computer : ComputerName&lt;br /&gt;
Comment&amp;nbsp; :&lt;br /&gt;
Server&amp;nbsp;&amp;nbsp; : teamserver01&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Working folders:&lt;br /&gt;
&amp;nbsp;$/ProjectOne: D:\code\Projects\ProjectOne&lt;br /&gt;
&amp;nbsp;$/ProjectTwo: D:\code\Projects\ProjectTwo&lt;br /&gt;
&amp;nbsp;$/ProjectThree: D:\code\Projects\ProjectThree&lt;br /&gt;
&amp;nbsp;$/ProjectFour: D:\code\Projects\ProjectFour&lt;br /&gt;
&amp;nbsp;$/ProjectFive: D:\code\Projects\ProjectFive&lt;br /&gt;
&amp;nbsp;$/ProjectSix: D:\code\Projects\ProjectSix&lt;br /&gt;
&amp;nbsp;&lt;/font&gt; 
&lt;p&gt;
&lt;br /&gt;
&lt;font size="1"&gt;C:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;&lt;font color="#ff0000"&gt;tf workspace /delete /server:http://teamserver01:8080 ComputerName;TheOtherGuy&lt;/font&gt;&lt;br /&gt;
A deleted workspace cannot be recovered.&lt;br /&gt;
Workspace &amp;#39;ComputerName;TheOtherGuy&amp;#39; on server &amp;#39;http://teamserver01:8080&amp;#39; has 0 pending change(s).&lt;br /&gt;
Are you sure you want to delete the workspace? (Yes/No) &lt;font color="#ff0000"&gt;yes&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
C:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;&lt;font color="#ff0000"&gt;tf workspaces /computer:ComputerName /owner:* /format:detailed /server:http://teamserver01:8080&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;font size="1"&gt;
&lt;hr /&gt;
&lt;/font&gt;
&lt;p&gt;
&lt;font size="1"&gt;Workspace: ComputerName&lt;br /&gt;
Owner&amp;nbsp;&amp;nbsp;&amp;nbsp; : WESTCOTTJ&lt;br /&gt;
Computer : ComputerName&lt;br /&gt;
Comment&amp;nbsp; :&lt;br /&gt;
Server&amp;nbsp;&amp;nbsp; : teamserver01&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Working folders:&lt;br /&gt;
&amp;nbsp;$/ProjectOne: D:\code\Projects\ProjectOne&lt;br /&gt;
&amp;nbsp;$/ProjectTwo: D:\code\Projects\ProjectTwo&lt;br /&gt;
&amp;nbsp;$/ProjectThree: D:\code\Projects\ProjectThree&lt;br /&gt;
&amp;nbsp;$/ProjectFour: D:\code\Projects\ProjectFour&lt;br /&gt;
&amp;nbsp;$/ProjectFive: D:\code\Projects\ProjectFive&lt;br /&gt;
&amp;nbsp;$/ProjectSix: D:\code\Projects\ProjectSix&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
C:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;strong&gt;Summary&lt;/strong&gt;&lt;br /&gt;
The first command was used to verify what workspaces are mapped to my computer name.&amp;nbsp; &lt;br /&gt;
The second command was used to deleted TheOtherGuy&amp;#39;s workspace that was left on the server. &lt;br /&gt;
The third and final step was to just verify that&amp;nbsp;I was the only remaining workspace mapped to this computer name. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/YetAnotherDeveloper/~4/y1EelLtFc9w" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/YetAnotherDeveloper/~3/y1EelLtFc9w/post.aspx</link>
      <author>joey.nospam@nospam.YetAnotherDeveloper.com (joey.westcott)</author>
      <comments>http://yetanotherdeveloper.com/post/2007/12/12/How-to-remove-roguezombie-workspaces-from-TeamServer.aspx#comment</comments>
      <guid isPermaLink="false">http://yetanotherdeveloper.com/post.aspx?id=bb43440b-e543-41b4-b403-1785f6fe623f</guid>
      <pubDate>Wed, 12 Dec 2007 17:49:00 -1000</pubDate>
      <category>Development</category>
      <dc:publisher>joey.westcott</dc:publisher>
      <pingback:server>http://yetanotherdeveloper.com/pingback.axd</pingback:server>
      <pingback:target>http://yetanotherdeveloper.com/post.aspx?id=bb43440b-e543-41b4-b403-1785f6fe623f</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://yetanotherdeveloper.com/trackback.axd?id=bb43440b-e543-41b4-b403-1785f6fe623f</trackback:ping>
      <wfw:comment>http://yetanotherdeveloper.com/post/2007/12/12/How-to-remove-roguezombie-workspaces-from-TeamServer.aspx#comment</wfw:comment>
      <wfw:commentRss>http://yetanotherdeveloper.com/syndication.axd?post=bb43440b-e543-41b4-b403-1785f6fe623f</wfw:commentRss>
    <feedburner:origLink>http://yetanotherdeveloper.com/post.aspx?id=bb43440b-e543-41b4-b403-1785f6fe623f</feedburner:origLink></item>
  </channel>
</rss>
