<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Spinning the Web</title>
	<atom:link href="http://spinningtheweb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://spinningtheweb.wordpress.com</link>
	<description>&#34;Will you walk into my parlour?&#34;, said the spider to the fly...</description>
	<lastBuildDate>Sun, 09 Aug 2009 17:24:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='spinningtheweb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Spinning the Web</title>
		<link>http://spinningtheweb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://spinningtheweb.wordpress.com/osd.xml" title="Spinning the Web" />
	<atom:link rel='hub' href='http://spinningtheweb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Easy way to format XML</title>
		<link>http://spinningtheweb.wordpress.com/2008/05/21/easy-way-to-format-xml/</link>
		<comments>http://spinningtheweb.wordpress.com/2008/05/21/easy-way-to-format-xml/#comments</comments>
		<pubDate>Wed, 21 May 2008 12:52:00 +0000</pubDate>
		<dc:creator>spinningtheweb</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://spinningtheweb.wordpress.com/?p=5</guid>
		<description><![CDATA[Presenting a quick and easy utility C# method which could be used for formatting an XML input string. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=5&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A quick and easy utility method which could be used for formatting an XML input string.<br />
<pre class="brush: csharp;">
/// &lt;summary&gt;
/// Formats and returns the input Xml string.
/// &lt;/summary&gt;
/// &lt;param name=&quot;xmlString&quot;&gt;&lt;/param&gt;
public static string FormatXml( string xmlString )
{
    if ( !String.IsNullOrEmpty( xmlString ) )
    {
        XmlTextReader xmlRdr = new XmlTextReader( new
                                       StringReader( xmlString ) );

        StringWriter textWriter = new StringWriter();

        XmlTextWriter xmlWriter = new XmlTextWriter( textWriter );

        xmlWriter.Formatting = Formatting.Indented;

        xmlWriter.WriteNode( xmlRdr, false );
        return textWriter.ToString();
    }
    else
    {
        return string.Empty;
    }
}</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/spinningtheweb.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/spinningtheweb.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spinningtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spinningtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spinningtheweb.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=5&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spinningtheweb.wordpress.com/2008/05/21/easy-way-to-format-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">spinningtheweb</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic web service reference path</title>
		<link>http://spinningtheweb.wordpress.com/2008/05/17/dynamic-web-service-reference-path/</link>
		<comments>http://spinningtheweb.wordpress.com/2008/05/17/dynamic-web-service-reference-path/#comments</comments>
		<pubDate>Fri, 16 May 2008 19:21:31 +0000</pubDate>
		<dc:creator>spinningtheweb</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://spinningtheweb.wordpress.com/?p=4</guid>
		<description><![CDATA[Our team ran into a problem recently in ASP.NET. We&#8217;re using a web service in our web application for data access. The web reference was added to a class library project in our Visual Studio 2005 solution. (We use the WAP &#8211; Web Application Project &#8211; model) . Simply right clicking on the project name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=4&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Our team ran into a problem recently in ASP.NET. We&#8217;re using a web service in our web application for data access. The web reference was added to a class library project in our Visual Studio 2005 solution. (We use the WAP &#8211; Web Application Project &#8211; model) . Simply right clicking on the project name in solution explorer and choose &#8216;Add web reference&#8217; from the context menu. Everything was working perfectly fine.</p>
<p>The problems started when we tried deploying the application to a test server prior to going live with it. The web service was no longer being referenced properly. We racked our brains for a couple of hours trying to find a solution for this. We had a close look at the class library in which the web service was being referenced and found that the web service path was being saved as a setting in a .config file named app.config. The app.config contained the following XML mark-up:</p>
<p><pre class="brush: xml;">
&lt;configuration xmlns=&quot;http://schemas.microsoft.com/.Net Configuration/v2.0&quot;&gt;
 &lt;configsections&gt;
   &lt;sectiongroup name=&quot;applicationSettings&quot; type=&quot;System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;&gt;
    &lt;section name=&quot;ACME.Services.Properties.Settings&quot; type=&quot;System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; requirepermission=&quot;false&quot;&gt;
    &lt;/section&gt;
   &lt;/sectiongroup&gt;
   &lt;applicationsettings&gt;
    &lt;ACME.Services.Properties.Settings&gt;
     &lt;setting name=&quot;ACME_Services_ACMEWebService_ACMEWebService&quot; serializeas=&quot;String&quot;&gt;
      &lt;value&gt;http://ACME/WebServices/ACMEWebService.asmx&lt;/value&gt;
     &lt;/setting&gt;
    &lt;/ACME.Services.Properties.Settings&gt;
   &lt;/applicationsettings&gt;
 &lt;/configsections&gt;
&lt;/configuration&gt;
</pre></p>
<p>The web reference URL was being read from this config file. But since it was in a class library, the whole thing was getting complied into a DLL on deployment.</p>
<p>The workaround we found for this was:</p>
<p>1. copy the section handler ( the mark-up inside &lt;sectiongroup&gt;&#8230;&lt;/sectiongroup&gt; ) into the  node in the applications Web.config</p>
<p>2. copy the &lt;applicationsettings&gt;&#8230;&lt;applicationsettings&gt; section also into the Web.config.</p>
<p>And Voila! Now since this is part of the web.config, it won&#8217;t be compiled any more. On deployment, just change the web service path setting ( inside &lt;value&gt;&#8230;&lt;value&gt; ) to the new path. Cool, right? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/spinningtheweb.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/spinningtheweb.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spinningtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spinningtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spinningtheweb.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=4&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spinningtheweb.wordpress.com/2008/05/17/dynamic-web-service-reference-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">spinningtheweb</media:title>
		</media:content>
	</item>
		<item>
		<title>Common Table Expressions in SQL 2005</title>
		<link>http://spinningtheweb.wordpress.com/2008/05/16/common-table-expressions/</link>
		<comments>http://spinningtheweb.wordpress.com/2008/05/16/common-table-expressions/#comments</comments>
		<pubDate>Fri, 16 May 2008 18:16:51 +0000</pubDate>
		<dc:creator>spinningtheweb</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Common Table Expressions]]></category>
		<category><![CDATA[CTEs]]></category>
		<category><![CDATA[SQL Sever 2005]]></category>

		<guid isPermaLink="false">http://spinningtheweb.wordpress.com/?p=3</guid>
		<description><![CDATA[Common Table Expressions is a newly introduced feature in SQL Server 2005. It is similar to a temp table or a view, but its scope is limited to a single SELECT statement. A CTE is made up of 1. CTE name 2. An optional column list 3. A query defining the CTE The basic syntax [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=3&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Common Table Expressions is a newly introduced feature in SQL Server 2005. It is similar to a temp table or a view, but its scope is limited to a single SELECT statement.</p>
<p>A CTE is made up of</p>
<p>1. CTE name</p>
<p>2. An optional column list</p>
<p>3. A query defining the CTE</p>
<p>The basic syntax structure for a CTE is:</p>
<p>WITH CTE_name [ ( column_name [,...n] ) ]<br />
AS<br />
(<br />
CTE_query_definition<br />
)</p>
<p>The statement to use the CTE is:</p>
<p>SELECT<br />
FROM CTE_name</p>
<p>Note: The query using the CTE must be the first query appearing after the CTE.</p>
<p>Example</p>
<p><pre class="brush: sql;">
WITH PriceList_CTE( ProductName, ListPrice, DiscountPrice) AS
(
SELECT [Name] AS ProductName, ListPrice, ListPrice * .95
FROM Production.Product
)

SELECT ProductName, ListPrice, DiscountPrice
FROM PriceList_CTE
</pre></p>
<p><strong>Recursive CTEs</strong></p>
<p>Used for easily traversing heirarchical data structures. Eg: Displaying employees in an organizational chart.</p>
<p>A recursive CTE consists of three elements:</p>
<p>1. Initial sub-query</p>
<p>The seed value.</p>
<p>2. Recursive sub-query</p>
<p>The recursive portion contains a reference to the rows added during the previous iteration.</p>
<p>3. Termination check</p>
<p>Recursion stops automatically whenever an iteration generates no new rows. The final resultset is the union of all result sets generated by the anchor and recursive members.</p>
<p>Syntax</p>
<p><pre class="brush: sql;">
WITH CTE_name ( column_name [,...n] )
AS
(
CTE_query_definition –- Anchor member

UNION ALL

CTE_query_definition –- Recursive member
)
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/spinningtheweb.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/spinningtheweb.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spinningtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spinningtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spinningtheweb.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spinningtheweb.wordpress.com&amp;blog=3744643&amp;post=3&amp;subd=spinningtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spinningtheweb.wordpress.com/2008/05/16/common-table-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">spinningtheweb</media:title>
		</media:content>
	</item>
	</channel>
</rss>
