<?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>Frodes technical rants</title>
	<atom:link href="http://frodelillerud.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://frodelillerud.wordpress.com</link>
	<description>Random thoughts on .NET, SuperOffice and whatever comes to mind</description>
	<lastBuildDate>Thu, 08 Oct 2009 18:35:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='frodelillerud.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Frodes technical rants</title>
		<link>http://frodelillerud.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://frodelillerud.wordpress.com/osd.xml" title="Frodes technical rants" />
	<atom:link rel='hub' href='http://frodelillerud.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Testing WebServices with Storm</title>
		<link>http://frodelillerud.wordpress.com/2009/10/08/testing-webservices-with-storm/</link>
		<comments>http://frodelillerud.wordpress.com/2009/10/08/testing-webservices-with-storm/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:35:31 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=213</guid>
		<description><![CDATA[One of the downsides of working with the standard WebServices that ship with SuperOffice is that it can be hard to do some quick and easy testing. The main issue is the way you have to authenticate with the webservices. The username and password is hidden in the SOAP header, instead of being available as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=213&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the downsides of working with the standard WebServices that ship with SuperOffice is that it can be hard to do some quick and easy testing. The main issue is the way you have to authenticate with the webservices. The username and password is hidden in the SOAP header, instead of being available as regular fields in the body. This makes it impossible to test via the .asmx page in IIS.</p>
<p>So, to play around with the webservices you really need to write up a C# dummy project, and do some coding just to get some simple testing done. Alternatively you can also use PowerShell, like I wrote about <a href="http://frodelillerud.wordpress.com/2009/07/16/using-powershell-to-integrate-with-superoffice-crm-part-iv-webservices/">in this post</a>.</p>
<p>But there is actually a simpler way! This is a way where you don&#8217;t need to write a line of code to get a response back from the WebService.</p>
<p>Over at codeplex.com there is a project called <a href="http://storm.codeplex.com/" target="_blank">Storm</a>. It is an open source tool for testing webservices. You can just download the application, unpack it and run it directly from that folder. No installation or setup required.<img class="aligncenter size-full wp-image-220" title="Storm3" src="http://frodelillerud.files.wordpress.com/2009/10/storm3.png?w=780" alt="Storm3"   /></p>
<p>When you start up Storm you can click Add to connect to a webservice. Just add the URL to one of the .asmx files from your SuperOffice 6.web installation.  See <a href="http://frodelillerud.wordpress.com/2009/07/16/using-powershell-to-integrate-with-superoffice-crm-part-iv-webservices/" target="_blank">this post</a> on how to install the webservices.</p>
<p><img class="aligncenter size-full wp-image-217" title="Storm" src="http://frodelillerud.files.wordpress.com/2009/10/storm1.png?w=780" alt="Storm"   /></p>
<p>In this example I&#8217;ve put in the link to the Contact.asmx file, and I&#8217;ve clicked on the GetContact method. Then it is possible to add the required username, password and authentication type into the header. Then, in the body, you can add the values you want to send as query values to the webservice.</p>
<p>Next, clicking the green arrow you get a response back from SuperOffice.</p>
<p><img class="aligncenter size-full wp-image-218" title="Storm2" src="http://frodelillerud.files.wordpress.com/2009/10/storm2.png?w=780" alt="Storm2"   /></p>
<p>And that&#8217;s how you do it! Quick and easy testing of your webservices in seconds. No coding required.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=213&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/10/08/testing-webservices-with-storm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/10/storm3.png" medium="image">
			<media:title type="html">Storm3</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/10/storm1.png" medium="image">
			<media:title type="html">Storm</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/10/storm2.png" medium="image">
			<media:title type="html">Storm2</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell to integrate with SuperOffice CRM, Part IV: WebServices</title>
		<link>http://frodelillerud.wordpress.com/2009/07/16/using-powershell-to-integrate-with-superoffice-crm-part-iv-webservices/</link>
		<comments>http://frodelillerud.wordpress.com/2009/07/16/using-powershell-to-integrate-with-superoffice-crm-part-iv-webservices/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 21:27:40 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=184</guid>
		<description><![CDATA[Previously we&#8217;ve looked at how you can use PowerShell to interact with SuperOffice CRM in different ways. In the first part we looked at using the COM SDK, in the second part we used the NetServer assemblies. In the third installment we sidestepped a bit to look at how you create the Secret using PowerShell. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=184&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Previously we&#8217;ve looked at how you can use PowerShell to interact with SuperOffice CRM in different ways. In the first part we looked at using the COM SDK, in the second part we used the NetServer assemblies. In the third installment we sidestepped a bit to look at how you create the Secret using PowerShell. In this post we&#8217;ll use that secret when we use the WebServices that ships with SuperOffice.</p>
<p>First of all, let&#8217;s just use a moment to talk about the actual webservices SuperOffice gives us. They can be installed by downloading SuperOffice 6.Web, and performing a partial install. Midway through the setup you can choose to install just the WebServices, instead of the entire 6.web. See figure. Note that the webservices require Microsoft Web Service Enhancements 3.0 to work.</p>
<div id="attachment_189" class="wp-caption alignleft" style="width: 520px"><img class="size-full wp-image-189" title="WebServiceInstall" src="http://frodelillerud.files.wordpress.com/2009/07/webserviceinstall1.png?w=780" alt="Installing SuperOffice CRM WebServices"   /><p class="wp-caption-text">Installing SuperOffice CRM WebServices</p></div>
<p>After you&#8217;ve run through the setup you&#8217;ll have a set of &#8220;WebService endpoints&#8221; in the form of .asmx files. You can find them if you go to the directory you installed to. The webservices are divided into logical parts, like Contact.asmx, Sale.asmx, Project.asmx, Find.asmx, Document.asmx and about 27 others.</p>
<p>The WebServices allow you to do just about everything you can do in the SuperOffice client, like listing data, creating new entities, document handling etc. Now, this in itself isn&#8217;t really revolutionary. SuperOffice has several API&#8217;s that give you total control. One of the neat parts about using WebServices is that you can communicate with SuperOffice from a distance. As in waaay over the internet. The Webservice calls are in essence just plain XML text that is transported over HTTP. That makes it robust (compared to raw SQL traffic over TCP/IP), but not neccecarily the fastest.</p>
<p>Each WebService has one or more methods to it. On the Contact.asmx webservice you have methods that allow you to get contact information and create new ones. The List.asmx webservice gives you access to every list SuperOffice has to offer, and so on.</p>
<p>Ok, back to PowerShell and how we can use the webservices.</p>
<p>First of all &#8211; the following script requires PowerShell v2.0. That&#8217;s the one that ships with Windows 7. In that PowerShell version you have a cmdlet called &#8216;New-WebServiceProxy&#8217; that is essential to us. It allows us to pass it a URL and create an object from it we can use.</p>
<div id="attachment_199" class="wp-caption alignleft" style="width: 778px"><img class="size-full wp-image-199" title="CallingWebservice" src="http://frodelillerud.files.wordpress.com/2009/07/callingwebservice1.png?w=780" alt="Connecting and authenticating"   /><p class="wp-caption-text">Connecting and authenticating</p></div>
<p>Take a look at that piece of code. It&#8217;s sort of split into two sections. The first, which is just the #1 line is the one that establishes contact with the webservice. The next 5 lines are used to authenticate us. The #2 and #3 lines are responsible for creating a new SoCredentials object, and the last lines set our username, <a href="http://frodelillerud.wordpress.com/2009/07/13/using-powershell-to-integrate-with-superoffice-crm-part-iii-calculating-secret/" target="_self">encrypted version of our password</a> and the authentication method.</p>
<p>Now we are ready to rock!</p>
<p>Let&#8217;s start of with something basic, like getting some contact information.</p>
<div id="attachment_197" class="wp-caption alignleft" style="width: 649px"><img class="size-full wp-image-197" title="GetContactInfo" src="http://frodelillerud.files.wordpress.com/2009/07/getcontactinfo2.png?w=780" alt="Get basic contact information"   /><p class="wp-caption-text">Get basic contact information</p></div>
<p>By adding a line where we call the method .GetContact on the $contactWS object we can get info about a specific contact.</p>
<p>As you can see from the intellisense in PowerGUI you have all the properties of the contact available.</p>
<p>When you run those lines of code it will echo out the name of contact_id 1509 to the console. With the power of PowerShell you could just as easily save it to a file etc.</p>
<p>You can also create new contacts this way by calling the .CreateDefaultEntity method. But a word of warning here! There is a know bug here when you call the webservice using a normal user. You&#8217;ll end up with a nasty error saying &#8220;<span style="color:#ff0000;">There is an error in XML document</span>&#8220;. In my example code I have created a SYSTEM user. Note though that this requires a separate licence, so this might not be available in your database.</p>
<p>But&#8230;.aaaaanywho.</p>
<p>Let&#8217;s create a new ContactEntity.</p>
<div id="attachment_202" class="wp-caption alignleft" style="width: 504px"><img class="size-full wp-image-202" title="CreateContactEntity" src="http://frodelillerud.files.wordpress.com/2009/07/createcontactentity.png?w=780" alt="Creating a new contact entity"   /><p class="wp-caption-text">Creating a new contact entity</p></div>
<p>And that is sort of it, really. Calling the SuperOffice WebServices from PowerShell. Doable, yes indeed.</p>
<p>I&#8217;ll leave you with a final example &#8211; where we use two webservices at the same time.</p>
<div id="attachment_204" class="wp-caption alignleft" style="width: 755px"><img class="size-full wp-image-204" title="CreateContactAndPerson" src="http://frodelillerud.files.wordpress.com/2009/07/createcontactandperson.png?w=780" alt="Create both Contact and Person"   /><p class="wp-caption-text">Create both Contact and Person</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=184&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/07/16/using-powershell-to-integrate-with-superoffice-crm-part-iv-webservices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/webserviceinstall1.png" medium="image">
			<media:title type="html">WebServiceInstall</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/callingwebservice1.png" medium="image">
			<media:title type="html">CallingWebservice</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/getcontactinfo2.png" medium="image">
			<media:title type="html">GetContactInfo</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/createcontactentity.png" medium="image">
			<media:title type="html">CreateContactEntity</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/createcontactandperson.png" medium="image">
			<media:title type="html">CreateContactAndPerson</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell to integrate with SuperOffice CRM, Part III: Calculating Secret</title>
		<link>http://frodelillerud.wordpress.com/2009/07/13/using-powershell-to-integrate-with-superoffice-crm-part-iii-calculating-secret/</link>
		<comments>http://frodelillerud.wordpress.com/2009/07/13/using-powershell-to-integrate-with-superoffice-crm-part-iii-calculating-secret/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 16:00:53 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=175</guid>
		<description><![CDATA[In the two previous posts about SuperOffice and PowerShell I talked about the COM and NetServer. As I&#8217;ve said before, I am no PowerShell expert. This is a way for me to learn PowerShell, hopefully without killing any kittens along the way. Use the code as you will, but not blindly. Don&#8217;t forget to think. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=175&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the two previous posts about SuperOffice and PowerShell I talked about the <a href="http://frodelillerud.wordpress.com/2009/07/01/using-powershell-to-integrate-with-superoffice-crm/">COM</a> and <a href="http://frodelillerud.wordpress.com/2009/07/09/using-powershell-to-integrate-with-superoffice-crm-part-ii-netserver/">NetServer</a>. As I&#8217;ve said before, I am no PowerShell expert. This is a way for me to learn PowerShell, hopefully without killing any kittens along the way. Use the code as you will, but not blindly. Don&#8217;t forget to think.</p>
<p>In this part I&#8217;m digging into how you calculate the secret for SoCredentials. The secret is an encrypted version of your username, password and a couple of other variables. The original C# definition is documented in the SuperOffice SDK.</p>
<p>Here is the function for calculating the secret &#8211; written in PowerShell. It is implemented as a function.</p>
<div id="attachment_176" class="wp-caption alignleft" style="width: 770px"><img class="size-full wp-image-176" title="1-CalculatePowerShellSecret" src="http://frodelillerud.files.wordpress.com/2009/07/1-calculatepowershellsecret.png?w=780" alt="Function for calculating NetServer secret"   /><p class="wp-caption-text">Function for calculating NetServer secret</p></div>
<p>You can add the entire function into your PowerShell profile so that it is available every time you open powershell prompt.</p>
<p>Type &#8216;<strong>notepad $profile</strong>&#8216; in PowerShell.exe command window, and paste the function there. (Note, you might have to create the profile file if it doesn&#8217;t exist).</p>
<div id="attachment_178" class="wp-caption alignleft" style="width: 484px"><img class="size-full wp-image-178" title="2-CalculatingSecret" src="http://frodelillerud.files.wordpress.com/2009/07/2-calculatingsecret.png?w=780" alt="Using the function from powershell.exe commandline"   /><p class="wp-caption-text">Using the function from powershell.exe commandline</p></div>
<p>From the powershell commandline you can now type in &#8216;<strong>CalculateSecret &lt;yourusername&gt; &lt;yourpassword&gt; &lt;authenticationType</strong>&gt;&#8217;</p>
<p>Note that there is no comma between the parameters. The normal AuthenticationType is &#8220;CRM5&#8243;.</p>
<p>And that ends the third episode in this series. I&#8217;ve learned a little bit about PS functions, and got something useful to show for it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=175&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/07/13/using-powershell-to-integrate-with-superoffice-crm-part-iii-calculating-secret/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/1-calculatepowershellsecret.png" medium="image">
			<media:title type="html">1-CalculatePowerShellSecret</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/2-calculatingsecret.png" medium="image">
			<media:title type="html">2-CalculatingSecret</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell to integrate with SuperOffice CRM, Part II: NetServer</title>
		<link>http://frodelillerud.wordpress.com/2009/07/09/using-powershell-to-integrate-with-superoffice-crm-part-ii-netserver/</link>
		<comments>http://frodelillerud.wordpress.com/2009/07/09/using-powershell-to-integrate-with-superoffice-crm-part-ii-netserver/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 21:06:40 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=153</guid>
		<description><![CDATA[Taking a look at how to use PowerShell to communicate with SuperOffice NetServer API.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=153&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Previously I showed you how to use PowerShell to talk to SuperOffice via the COM object. In this post I&#8217;ll show you how to do the same using the SuperOffice NetServer API. But let me warn you up front &#8211; I&#8217;m not a PowerShell guy, I&#8217;m just a newbie here. It&#8217;s not my fault if this code kills a kitten.</p>
<p>It actually took me a while to get this working, so I&#8217;m going to show you the entire process from blank .ps1 file to finished result with all the hurdles I encountered on the way.</p>
<p>So, first of all we need to load up the NetServer .dlls in our script. Initially I tried to load them directly from the path they are installed on my computer with</p>
<p>[Reflection.Assembly]::LoadFile(&#8220;E:\Program Files\SuperOffice\NetServer 3.1 SDK\v3.1.3268\bin\SOCore.dll&#8221;)<br />
[Reflection.Assembly]::LoadFile(&#8220;E:\Program Files\SuperOffice\NetServer 3.1 SDK\v3.1.3268\bin\SODataBase.dll&#8221;)<br />
[Reflection.Assembly]::LoadFile(&#8220;E:\Program Files\SuperOffice\NetServer 3.1 SDK\v3.1.3268\bin\SuperOffice.Legacy.DLL&#8221;)</p>
<p>$session = [SuperOffice.SoSession]::Authenticate(&#8220;FL&#8221;, &#8220;&#8221;)</p>
<p>However when running that piece of code you&#8217;ll get an exception somewhat like this:</p>
<div id="attachment_160" class="wp-caption alignleft" style="width: 613px"><img class="size-full wp-image-160" title="2-ExceptionNoConfig" src="http://frodelillerud.files.wordpress.com/2009/07/2-exceptionnoconfig.png?w=780" alt="Exception when trying to Authenticate"   /><p class="wp-caption-text">Exception when trying to Authenticate</p></div>
<p>At this point there are actually multiple problems with our setup, and PowerShell isn&#8217;t really helping us as it hides the inner exceptions.</p>
<p>Lets take a small detour away from NetServer related code, and include a little piece of PowerShell code to drill down into the actual problem behind the Exception we see here.</p>
<p>At the top of the .ps1 codefile, just above the calls to [Reflection.Assembly], we add this following snippet:</p>
<div id="attachment_161" class="wp-caption alignleft" style="width: 784px"><img class="size-full wp-image-161" title="3-AddExceptionTrap" src="http://frodelillerud.files.wordpress.com/2009/07/3-addexceptiontrap.png?w=780" alt="Add an Exception trap"   /><p class="wp-caption-text">Add an Exception trap</p></div>
<p>The code, beginning at <span style="color:#0000ff;"><strong>trap</strong></span>, ending before &#8220;<span style="color:#339966;"><strong>[Reflection..</strong></span>" will catch any Exception thrown later on.</p>
<p>It's my understanding that the trap behaves like a try-catch (Exception) in C#.</p>
<p>Inside the trap I'm drilling down into the InnerExceptions and printing the Message for each Exception found.</p>
<p>Note also the <span style="color:#0000ff;"><strong>continue </strong></span>keyword. This causes the script to continue with the rest of the powershell script whenever it reaches an Exception. This might not be what you want in a production environment.</p>
<p>Because it continues I also added printing of a -&gt; for each Exception, with -&gt;-&gt; for the inner exception etc. It makes it easier to difference between two unrelated Exceptions.</p>
<p>Ok, so when we drill down into the innermost Exception we see that it is a SoException that reads "<span style="color:#ff0000;">Configuration file "E:\Program Files\PowerGUI\ScriptEditor.exe.config" is missing</span>".</p>
<p>Ok, so why is it complaining about a .config file for my PowerShell editor? Well, this is NetServer's fault. It loads up a .config file which matches the current process. And since PowerGUI is running the script NetServer expects there to be a ScriptEditor.exe.config in the current directory with all the settings for SuperOffice. When running a script from the PowerShell commandline the current process is typically C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe so that will require there to be a powershell.exe.config file in that directory.</p>
<p>So, I added a NetServer .config file into the E:\Program Files\PowerGUI directory.</p>
<p>Now, when running the script it loads up the .dll's, but fails with a NullReferenceException when calling .Authenticate() method. It's not very obvious, but the problem here is that the .dll files are in another directory.</p>
<p>You need to copy the NetServer .dll's into the current directory. I copied SOCore.dll, SODataBase.dll and SuperOffice.Legacy.dll into the E:\Program Files\PowerGUI directory, and changed the LoadFile statements in the .ps1 file to point to the new path.</p>
<div id="attachment_167" class="wp-caption alignleft" style="width: 714px"><img class="size-full wp-image-167" title="4-newPath" src="http://frodelillerud.files.wordpress.com/2009/07/4-newpath.png?w=780" alt="Loading NetServer assemblies from the current directory."   /><p class="wp-caption-text">Loading NetServer assemblies from the current directory.</p></div>
<p>When we now run the script there are no errors popping up. Cool!</p>
<p>Let us see if we can do some work as well.</p>
<p>The first, simple example, is to get a contact. Let&#8217;s just hardcode a contact_id and get it.</p>
<div id="attachment_169" class="wp-caption alignleft" style="width: 737px"><img class="size-full wp-image-169" title="5-GetContact" src="http://frodelillerud.files.wordpress.com/2009/07/5-getcontact.png?w=780" alt="Get a contact using NetServer Entities layer"   /><p class="wp-caption-text">Get a contact using NetServer Entities layer</p></div>
<p>Let&#8217;s just go through the last three lines.</p>
<p>Line 22; Starts with a #, and is a comment.</p>
<p>Line 23; The class is wrapped in square brackets, and there are two :: before the actual method that gets the Contact.</p>
<p>Line 24; Printing to screen is deadeasy in powershell. Just type, and it&#8217;ll be echoed to screen. There is a .Name property on the $contact object we created on the previous line.</p>
<p>When you need to look at which properties, methods etc are available on an object in powershell just do something like this: &#8220;<strong>$contact | Get-Member</strong>&#8221; and they will all be listed for you.</p>
<p>Lastly I&#8217;ll show an example where we create a new Contact, and add a URL to it.</p>
<div id="attachment_170" class="wp-caption alignleft" style="width: 573px"><img class="size-full wp-image-170" title="6-CreateContact" src="http://frodelillerud.files.wordpress.com/2009/07/6-createcontact.png?w=780" alt="Create a new contact using NetServer"   /><p class="wp-caption-text">Create a new contact using NetServer</p></div>
<p>Here we create a new Contact object, calls a methods and set a property, and also create a URLRow class which we hook onto the Contact. Finally it is all Saved to the SuperOffice database.</p>
<p>So to wrap things up.</p>
<p>This isn&#8217;t exactly self-explanatory. Specially the part with placing the .config file and NetServer .dll files. But where there is a will there is a way.</p>
<p>Hopefully someone will have use for this. I know I have. Now I know a bit more PowerShell than I did a few hours ago. Goal reached.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=153&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/07/09/using-powershell-to-integrate-with-superoffice-crm-part-ii-netserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/2-exceptionnoconfig.png" medium="image">
			<media:title type="html">2-ExceptionNoConfig</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/3-addexceptiontrap.png" medium="image">
			<media:title type="html">3-AddExceptionTrap</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/4-newpath.png" medium="image">
			<media:title type="html">4-newPath</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/5-getcontact.png" medium="image">
			<media:title type="html">5-GetContact</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/6-createcontact.png" medium="image">
			<media:title type="html">6-CreateContact</media:title>
		</media:content>
	</item>
		<item>
		<title>Accessing WMI from cmd.exe</title>
		<link>http://frodelillerud.wordpress.com/2009/07/02/accessing-wmi-from-cmd-exe/</link>
		<comments>http://frodelillerud.wordpress.com/2009/07/02/accessing-wmi-from-cmd-exe/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 19:53:23 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=138</guid>
		<description><![CDATA[Using wmic.exe to query WMI - Windows Management Instrumentation about information on your machine.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=138&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the core of Windows is something called WMI &#8211; <a href="http://en.wikipedia.org/wiki/Windows_Management_Instrumentation" target="_blank">Windows Management Instrumentation</a>. It gives access to a wide range of information about your machine, both hardware and software. After browsing through <a href="http://serverfault.com/questions/3780/useful-commandline-commands-on-windows/" target="_blank">a very interesting thread over at serverfault.com</a> I discovered a DOS command I hadn&#8217;t seen before. wmic.exe.</p>
<p>Wmic.exe is a console application for querying WMI for data, and it has a lot of nice features. It comes with Windows, so it&#8217;s allready on your machine. Take a look at this:</p>
<pre><strong>C:\&gt;wmic bios get name
Name
BIOS Date: 12/10/08  Ver: 6AET52WW (1.18)</strong></pre>
<p>That actually gives you the BIOS version &#8211; from DOS!</p>
<p>How about some information about your CPU?</p>
<pre><img class="aligncenter size-full wp-image-146" title="wmic" src="http://frodelillerud.files.wordpress.com/2009/07/wmic2.png?w=780" alt="wmic"   />
<strong>C:\&gt;wmic cpu get /all /value</strong></pre>
<p>That gives back a ton of information about your CPU, like the Name, how many logical processors there are, what kind of socket it has, its voltage, the current load (in percent) and a whole lot more. This next command indicated if you have a 32- or 64-bit OS. Note, a 32-bit OS installed on a 64-bit CPU will list itself as 32-bit.</p>
<pre><strong>C:\&gt;wmic cpu get datawidth
DataWidth
64
</strong></pre>
<p>The information can be listed as a two column list, or even formatted as HTML. This command will create a html file with information about your desktop monitor, and open the file.</p>
<pre><strong>C:\&gt;wmic desktopmonitor get /all /format:htable &gt;&gt; desktopinfo.html</strong>
<strong>C:\&gt;start desktopinfo.html</strong></pre>
<p>Need info about your network cards?</p>
<pre><strong>C:\&gt;wmic nic get Name, MACAddress
(lists all the network cards and their MAC addresses).

</strong></pre>
<p>You can get info about the motherboard, about the software products installed, about your NT-domain, your printers&#8230;.and the list just goes on and on. Go figure out for yourself all the other goodies this application have to offer by using:</p>
<pre><strong>C:\&gt;wmic /?</strong></pre>
<p>Enjoy, I know I will!</p>
<pre><img class="aligncenter size-full wp-image-148" title="wmic2" src="http://frodelillerud.files.wordpress.com/2009/07/wmic21.png?w=780" alt="wmic2"   /></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=138&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/07/02/accessing-wmi-from-cmd-exe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/wmic2.png" medium="image">
			<media:title type="html">wmic</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/wmic21.png" medium="image">
			<media:title type="html">wmic2</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell to integrate with SuperOffice CRM</title>
		<link>http://frodelillerud.wordpress.com/2009/07/01/using-powershell-to-integrate-with-superoffice-crm/</link>
		<comments>http://frodelillerud.wordpress.com/2009/07/01/using-powershell-to-integrate-with-superoffice-crm/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 13:38:34 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=133</guid>
		<description><![CDATA[The COM interface of SuperOffice CRM can easily be invoked from PowerShell. How, you say? Well, a picture with an example says more than a thousand words, right?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=133&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The COM interface of SuperOffice CRM can easily be invoked from PowerShell. How, you say? Well, a picture with an example says more than a thousand words, right?</p>
<div id="attachment_136" class="wp-caption aligncenter" style="width: 525px"><img class="size-full wp-image-136" title="PowerShell2" src="http://frodelillerud.files.wordpress.com/2009/07/powershell2.png?w=780" alt="Interacting with SuperOffice from PowerShell"   /><p class="wp-caption-text">Interacting with SuperOffice from PowerShell</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=133&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/07/01/using-powershell-to-integrate-with-superoffice-crm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/07/powershell2.png" medium="image">
			<media:title type="html">PowerShell2</media:title>
		</media:content>
	</item>
		<item>
		<title>Unable to list SQL tables in Management Studio?</title>
		<link>http://frodelillerud.wordpress.com/2009/05/27/unable-to-list-sql-tables-in-management-studio/</link>
		<comments>http://frodelillerud.wordpress.com/2009/05/27/unable-to-list-sql-tables-in-management-studio/#comments</comments>
		<pubDate>Wed, 27 May 2009 15:22:32 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=118</guid>
		<description><![CDATA[Looking at the reason why you can't list tables in Management Studio.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=118&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_120" class="wp-caption alignright" style="width: 314px"><img class="size-full wp-image-120" title="No tables" src="http://frodelillerud.files.wordpress.com/2009/05/notables.jpg?w=780" alt="No tables"   /><p class="wp-caption-text">No tables</p></div>
<p>On a couple of occasions I&#8217;ve had people approach me with the same problem. In SQL Management Studio they can query a database using SELECT&#8217;s, but when they try to list the tables in on the left side in Management Studio there appears to be no tables.</p>
<p>I decided to do some research into this, and here is what I found.</p>
<p>In order to view the tables you have to have some sort of access to the metadata for the tables. In SQL 2000 it was enough to have &#8216;public&#8217; access to a database, but from SQL 2005 you need to have a bit more permissions than that. See <a href="http://msdn.microsoft.com/en-us/library/ms187113.aspx" target="_blank">this microsoft article</a> for further details.</p>
<p>So the user you are authenticated as needs to have some more rights than just &#8216;public&#8217; access. If you for instance add the &#8216;db_datareader&#8217; right as well you&#8217;ll be able to list all the tables.</p>
<div id="attachment_122" class="wp-caption alignleft" style="width: 273px"><img class="size-full wp-image-122" title="db_datareader" src="http://frodelillerud.files.wordpress.com/2009/05/datareader.jpg?w=780" alt="db_datareader"   /><p class="wp-caption-text">db_datareader</p></div>
<p>So by adding that right (or some other right that give you more than &#8216;public&#8217; access) the tables will be browsable in Management Studio.</p>
<div id="attachment_124" class="wp-caption alignright" style="width: 377px"><img class="size-full wp-image-124" title="Tables" src="http://frodelillerud.files.wordpress.com/2009/05/tables.jpg?w=780" alt="Tables"   /><p class="wp-caption-text">Tables</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=118&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/05/27/unable-to-list-sql-tables-in-management-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/05/notables.jpg" medium="image">
			<media:title type="html">No tables</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/05/datareader.jpg" medium="image">
			<media:title type="html">db_datareader</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/05/tables.jpg" medium="image">
			<media:title type="html">Tables</media:title>
		</media:content>
	</item>
		<item>
		<title>An alternative approach to copying a SQL database</title>
		<link>http://frodelillerud.wordpress.com/2009/04/21/alternative-way-copy-sql/</link>
		<comments>http://frodelillerud.wordpress.com/2009/04/21/alternative-way-copy-sql/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 15:25:13 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SuperOffice]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=112</guid>
		<description><![CDATA[Copying data between SQL databases.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=112&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today we helped a customer who had a meltdown of their SQL 2005 server. And to make matters worse they were running on SQL 2005 Express &#8211; and had NO backup. The data had begun to walk towards the light &#8211; and it was our job to save it before it was too late.</p>
<p>For some reason the tables weren&#8217;t visible any more in Management Studio, and it kept complaining about &#8220;Possible schema corruption. Please run DBCC CheckCatalog&#8221;. Following that advice just gave the same errormessage again.</p>
<p>We moved the .mdf and .ldf files over to a new server, but got the same problem there.</p>
<p>The single one thing we disovered which worked was using plain SQL queries. So &#8220;SELECT * FROM CRM5.contact&#8221; gave us all the customers, and proved that at least some of the data was intact.</p>
<p>I picked up a <a href="http://technet.microsoft.com/en-us/magazine/dd401720.aspx" target="_blank">tips from Microsoft Technet Magazine</a> the other day regarding the INTO keyword, and thought it could help us here.<img class="alignright size-full wp-image-113" title="polar-meltdown-gal-wildlife" src="http://frodelillerud.files.wordpress.com/2009/04/polar-meltdown-gal-wildlife.jpg?w=780" alt="polar-meltdown-gal-wildlife"   /></p>
<p>By running &#8220;<span style="color:#ff0000;">SELECT * INTO Demo1.CRM5.Contact FROM CRM5.Contact</span>&#8221; I was able to copy all the customers from the original, corrupt database into a new demobase. One table down, just &gt; 250 left&#8230;</p>
<p>Next thing was to figure out how to do this for all tables in one go. At first I tried this piece of T-SQL, but even though it enumerates all the tables it really isn&#8217;t that easy to do loop operations in T-SQL.</p>
<blockquote><p><span style="color:#ff0000;">SELECT TABLE_NAME<br />
FROM INFORMATION_SCHEMA.TABLES</span></p></blockquote>
<p>That first one crashes with &#8220;Schema corruption&#8221;, but this one worked:</p>
<blockquote><p><span style="color:#ff0000;">SELECT DISTINCT TABLE_NAME<br />
FROM INFORMATION_SCHEMA.COLUMNS</span></p></blockquote>
<p>But, as said, doing loop operations in SQL is a pain to work with, so I wanted to see if there was another way. Aha &#8211; there is the <a href="http://www.databasejournal.com/features/mssql/article.php/3441031/SQL-Server-Undocumented-Stored-Procedures-spMSforeachtable-and-spMSforeachdb.htm" target="_blank">undocumented sp_msforeachtable</a> stored procedure.</p>
<p>So, by running a single (1!) line we managed to read out all the data from the corrupt SuperOffice database, and put it in a new database.</p>
<blockquote><p><span style="color:#ff0000;">EXEC sp_msforeachtable &#8220;SELECT * INTO Demo1.? FROM ?&#8221;</span></p></blockquote>
<p>And that little piece of T-SQL brought back six months of data.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=112&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/04/21/alternative-way-copy-sql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/polar-meltdown-gal-wildlife.jpg" medium="image">
			<media:title type="html">polar-meltdown-gal-wildlife</media:title>
		</media:content>
	</item>
		<item>
		<title>Forgotten cmd.exe commands</title>
		<link>http://frodelillerud.wordpress.com/2009/04/12/forgotten-cmdexe-commands/</link>
		<comments>http://frodelillerud.wordpress.com/2009/04/12/forgotten-cmdexe-commands/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:38:08 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=103</guid>
		<description><![CDATA[Even if MSDOS as a standalone operating system is a thing of the past DOS in itself still lives on in the form of cmd.exe. And it still contains a lot of nifty little features that few really use or know about. Let&#8217;s take a quick trip down memory lane, and see if we can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=103&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Even if MSDOS as a standalone operating system is a thing of the past DOS in itself still lives on in the form of cmd.exe. And it still contains a lot of nifty little features that few really use or know about.</p>
<p>Let&#8217;s take a quick trip down memory lane, and see if we can revive some of the underutilized features in cmd.exe.</p>
<p><strong>Coloring</strong></p>
<p>Did you know you could change the background and foreground color by using the COLOR command with two color-code attributes? For example &#8220;COLOR 4E&#8221; gives yellow text on red background. Just type &#8220;COLOR&#8221; to get back to the original gray-on-black.</p>
<p><strong>Title</strong></p>
<p>The title of the Window can be set using the TITLE command. That will make it easy to distinguish between multiple cmd.exe windows when you look at the task bar. For example &#8220;TITLE This is my commandwindow&#8221; or &#8220;TITLE %USERNAME% opened this at %TIME%&#8221;.</p>
<div id="attachment_104" class="wp-caption aligncenter" style="width: 662px"><img class="size-full wp-image-104" title="DOS commands" src="http://frodelillerud.files.wordpress.com/2009/04/dos1.jpg?w=780" alt="DOS commands"   /><p class="wp-caption-text">DOS commands</p></div>
<p><strong>Size</strong></p>
<p>Ever tried to make the window bigger? You just can&#8217;t make it any wider, can you? Well, enter the MODE CON command, and it&#8217;ll resize the window for you.</p>
<p>Type &#8220;MODE CON COLS=160 LINES=20&#8243; to make the window double width and 1/10 height. The standard values are 80 columns and 300 lines, as you can see by just typing &#8220;MODE CON&#8221;.</p>
<p><strong>Autorun</strong></p>
<p>You can also have something execute when you open a new command prompt by adding a new String value in the Registry at [HKCU|HKLM]\Software\Microsoft\Command Processor\, and call it Autorun.</p>
<div id="attachment_105" class="wp-caption aligncenter" style="width: 822px"><img class="size-full wp-image-105" title="Registry key for autorun" src="http://frodelillerud.files.wordpress.com/2009/04/dos2.jpg?w=780" alt="Registry key for autorun"   /><p class="wp-caption-text">Registry key for autorun</p></div>
<p><strong>History</strong></p>
<p>Now this next one really took me by surprise. I always use the Up/Down arrows to get to the history, but there is actually a graphical representation of the DOS command history as well. Just press F7.</p>
<div id="attachment_107" class="wp-caption aligncenter" style="width: 678px"><img class="size-full wp-image-107" title="Visual history in cmd.exe" src="http://frodelillerud.files.wordpress.com/2009/04/dos3.jpg?w=780" alt="Visual history in cmd.exe by pressing F7"   /><p class="wp-caption-text">Visual history in cmd.exe by pressing F7</p></div>
<p>How cool isn&#8217;t that, a GUI for the history in DOS!</p>
<p><strong>IF-condition and file Exist<br />
</strong></p>
<p>You can also do some logical checking. This command will check to see if a file exists, and change the color of the window to indicate success or failure.</p>
<div id="attachment_108" class="wp-caption aligncenter" style="width: 582px"><img class="size-full wp-image-108" title="IF condition, file check and coloring" src="http://frodelillerud.files.wordpress.com/2009/04/dos4.jpg?w=780" alt="IF condition, file check and coloring"   /><p class="wp-caption-text">IF condition, file check and coloring</p></div>
<p>Take a look at <a href="http://www.ss64.com/nt/">http://www.ss64.com/nt/</a> for a list of most commands.</p>
<p>So you see cmd.exe still has a few tricks up it&#8217;s sleeve, even though PowerShell is trying to replace it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=103&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/04/12/forgotten-cmdexe-commands/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/dos1.jpg" medium="image">
			<media:title type="html">DOS commands</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/dos2.jpg" medium="image">
			<media:title type="html">Registry key for autorun</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/dos3.jpg" medium="image">
			<media:title type="html">Visual history in cmd.exe</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/dos4.jpg" medium="image">
			<media:title type="html">IF condition, file check and coloring</media:title>
		</media:content>
	</item>
		<item>
		<title>Copying XAML code with CopySourceAsHtml</title>
		<link>http://frodelillerud.wordpress.com/2009/04/07/copying-xaml-code-with-copysourceashtml/</link>
		<comments>http://frodelillerud.wordpress.com/2009/04/07/copying-xaml-code-with-copysourceashtml/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 00:35:53 +0000</pubDate>
		<dc:creator>frodelillerud</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://frodelillerud.wordpress.com/?p=95</guid>
		<description><![CDATA[Copying syntax highlighted XAML code in Visual Studio with CopySourceAsHtml<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=95&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/">CopySourceAsHtml</a> plugin for Visual Studio is good for copying a block of sourcecode where you want to keep the syntax highlighting. Without highlighting the code looks like this.</p>
<p>string message = &#8220;Hello World&#8221;;</p>
<p>Kind of boring, uninspiring and&#8230;just blah. But when you use CopySourceAsHtml you get like this instead.</p>
<div style="background:white none repeat scroll 0 0;font-family:Courier New;font-size:10pt;color:black;">
<pre style="margin:0;"><span style="color:blue;">string</span> message = <span style="color:#a31515;">"Hello World"</span>;</pre>
</div>
<p>Which is a lot easier to read. Now, the last couple of days I&#8217;ve been reading up on WPF (Windows Presentation Foundation), and it uses a new syntax called XAML. When I tried to rightclick on the selected text in a .xaml file in VS2008 I didn&#8217;t have the CopyAsHtml option in the context menu. Bummer!</p>
<p>Fortunately there is an easy workaround. Just use the Edit menu, and you&#8217;ll find &#8220;Copy As HTML&#8230;&#8221; there.</p>
<div id="attachment_97" class="wp-caption aligncenter" style="width: 386px"><img class="size-full wp-image-97" title="xaml2" src="http://frodelillerud.files.wordpress.com/2009/04/xaml2.jpg?w=780" alt="Copy as Html in Edit menu"   /><p class="wp-caption-text">Copy as Html in Edit menu</p></div>
<p>And then you get pretty XAML code, like this.</p>
<div style="background:white none repeat scroll 0 0;font-family:Courier New;font-size:10pt;color:black;">
<pre style="margin:0;"><span style="color:#a31515;">        </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Button</span><span style="color:red;"> Content</span><span style="color:blue;">="Click me!"&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">            </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Button.Background</span><span style="color:blue;">&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">                </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">LinearGradientBrush</span><span style="color:blue;">&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">                    </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">GradientStop</span><span style="color:red;"> Color</span><span style="color:blue;">="WhiteSmoke"</span><span style="color:red;"> Offset</span><span style="color:blue;">="0.2" /&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">                    </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">GradientStop</span><span style="color:red;"> Color</span><span style="color:blue;">="Gray"</span><span style="color:red;"> Offset</span><span style="color:blue;">="0.8" /&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">                </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">LinearGradientBrush</span><span style="color:blue;">&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">            </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Button.Background</span><span style="color:blue;">&gt;</span></pre>
<pre style="margin:0;"><span style="color:#a31515;">        </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Button</span><span style="color:blue;">&gt;</span></pre>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/frodelillerud.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/frodelillerud.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/frodelillerud.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frodelillerud.wordpress.com&amp;blog=6402057&amp;post=95&amp;subd=frodelillerud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frodelillerud.wordpress.com/2009/04/07/copying-xaml-code-with-copysourceashtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28efc373031792159334ebc693427e3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">frodelillerud</media:title>
		</media:content>

		<media:content url="http://frodelillerud.files.wordpress.com/2009/04/xaml2.jpg" medium="image">
			<media:title type="html">xaml2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
