<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Jeroen Ritmeijer</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/default.aspx</link><description>.NET 3.0, Windows Presentation Foundation, Biztalk, SharePoint, Mobile devices and other Microsoft technologies.</description><dc:language>en-GB</dc:language><generator>CommunityServer 1.0 (Build: 1.0.1.50214)</generator><item><title>Automatically reconnecting SSH Sessions</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/09/22/148089.aspx</link><pubDate>Fri, 22 Sep 2006 21:18:19 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:148089</guid><dc:creator>jritmeijer</dc:creator><slash:comments>1</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/148089.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=148089</wfw:commentRss><description>&lt;p&gt;I use SSH on a daily basis to connect to a number of networks, see &lt;em&gt;&lt;a href="http://jritmeijer.spaces.live.com/blog/cns!8A48A27460FB898A!749.entry"&gt;my previous posting on Opening up network using SSH tunnels&lt;/a&gt;&lt;/em&gt;. Unfortunately not all network connections, most notably the wireless ones, are very reliable. &lt;/p&gt; &lt;p&gt;Some of the tunnels I use are 'reverse tunnels', which means that I need to physically access the remote machine in order to setup those tunnels, which is not always possible or practical.&lt;/p&gt; &lt;p&gt;The standard OpenSSH client application does not seem to have a function to automatically retry when there is a network hiccup. However, with a little bit of creativity we can add this functionality ourselves.&lt;/p&gt; &lt;p&gt;The solution: Setup a bash script that executes the ssh command in an infinite loop. In order to make this work we need to ensure that the user does not need to manually authenticate on every retry as that would defeat the purpose of a fully automatic mechanism. This solution has been tested with Cygwin and&amp;nbsp;should work on Linux without change.&lt;/p&gt; &lt;p&gt;SSH supports authentication using either passwords or public keys. We have already established that password authentication is not going to work so we need to setup DSA (Digital Signature Algorithm) authentication.&lt;/p&gt; &lt;p&gt;In&amp;nbsp;this example we will be using the following names:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;UserClient&lt;/strong&gt;: The user on the client PC (running the SSH client) that wants to connect to a server. Please replace this with the actual user name.  &lt;li&gt;&lt;strong&gt;UserServer&lt;/strong&gt;: The user on the server we want to login as. Change this to the actual user name.  &lt;li&gt;&lt;strong&gt;Client:&lt;/strong&gt; The machine we are connecting from.  &lt;li&gt;&lt;strong&gt;Server:&lt;/strong&gt; The machine we are connecting to.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;First we need to create the keys for &lt;em&gt;UserClient&lt;/em&gt; on the &lt;em&gt;Client&lt;/em&gt; machine. Enter the following command to do so:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;ssh-keygen -t dsa&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;When asked for a pass phrase press enter. This generates a set of keys in the&amp;nbsp;~UserClient/.ssh directory on the &lt;em&gt;Client&lt;/em&gt; machine. As I use Cygwin&amp;nbsp;this directory&amp;nbsp;is located in the following location.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;C:\Program Files\cygwin\home\UserClient\.ssh&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This file needs to be appended to the list of authorized keys on the &lt;em&gt;Server&lt;/em&gt;. Copy ~UserClient/.ssh/id_dsa.pub to the server and concatenate it to the list of authorized keys for &lt;em&gt;UserServer&lt;/em&gt; using the following commands:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;cat id_dsa.pub &amp;gt;&amp;gt; ~UserServer/.ssh/authorized_keys2&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;chmod 644 ~UserServer/.ssh/authorized_keys2&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;That is all what is needed to login using DSA. Try it by issuing the following command on the &lt;em&gt;Client&lt;/em&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;ssh UserServer@Server&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;With this mechanism in place, we can create a small bash script that rebuilds the SSH connection in an infinite loop. Note that in the following example I use the most basic SSH command only. Replace this with your combination of Local and Remote tunnel command line switches.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;#!/bin/bash &lt;br&gt;while [ true ]; do &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo Opening SSH session&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssh&amp;nbsp;UserServer@Server&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo SSH session disconnected&lt;br&gt;done&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Name this file something like 'ssh_connect.sh'. Once saved it can be executed using ./ssh_connect.sh.&lt;/p&gt; &lt;p&gt;That is it, works like a charm.&lt;/p&gt; &lt;p&gt;Another article on setting up SSH&amp;nbsp;using DSA&amp;nbsp;&lt;a href="http://www.bluegum.com/Software/ssh-auth.html"&gt;can be found here&lt;/a&gt;. An introduction to BASH scripting &lt;a href="http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html"&gt;is available here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=148089" width="1" height="1"&gt;</description></item><item><title>Opening networks using SSH Tunnels</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/08/29/145207.aspx</link><pubDate>Tue, 29 Aug 2006 05:03:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:145207</guid><dc:creator>jritmeijer</dc:creator><slash:comments>521</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/145207.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=145207</wfw:commentRss><description>&lt;p&gt;&lt;B&gt;&lt;I&gt;Disclaimer - This post outlines how you can 'open up' firewalls to give you access where network administrators may not want you to go. Please realise that when applying these workarounds in a company you may be breaching corporate policy and&amp;nbsp; end up&amp;nbsp;in serious trouble.&lt;/I&gt;&lt;/B&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; Sometimes you end up in an environment where you don't quite have the liberal network access that you enjoy, let's say, at home. Network ports for services you have come to rely on such as Remote Desktop, Skype or MSN Messenger, have been closed for whatever reason. Sometimes for good reasons such as security, sometimes for sad reasons such as public WiFi access points that only want to offer you limited access. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The solution:&lt;/strong&gt; Enter SSH (&lt;a href="http://en.wikipedia.org/wiki/Secure_Shell"&gt;Wikipedia definition&lt;/a&gt;), which allows you to set up secure encrypted connections between machines. Most people may think SSH is just a glorified secure replacement&amp;nbsp;for good old Telnet,&amp;nbsp;but it has much more tricks up its sleeve, most notably a way of tunneling multiple connections for different destination ports over a single port. Sorry if this sounds confusing, it is the best way I can describe it.&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="http://www.bedfordonline.com/vignettes/tunnel/005.jpg"&gt;&lt;br&gt;&lt;em&gt;Light at the end of the tunnel?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Before going into more detail and installation instructions, a quick discussion of the kind of problems you can solve using SSH tunneling. First and foremost, if you have no access at all to a network then SSH is not going to help you. All you need for SSH to work is a single open port.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1: Accessing your home PC via remote desktop.&lt;/strong&gt; One of my friends recently started a new job for an insurance underwriter. Unfortunately he cannot access his home PC via Remote Desktop as the company blocks port&amp;nbsp;3389. He can solve this by installing SSHD (server application) on his home PC to listen on a port he can access, e.g. port 443 or any other outgoing port that is not blocked by the company firewall. He can then use SSH (client application) to setup a connection from his&amp;nbsp;work PC to listen on a port, e.g. 13389 and connect it to the Remote Desktop port (3389) on his home PC.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 2: Accessing a company server from the public Internet.&lt;/strong&gt; Another friend's retarded boss has not paid the ADSL bill, which results in him having to use a fallback network connection that does not allow any connections to the internal network from the public Internet. The solution to his problem is to setup SSHD (server application) on his home PC and configure his home firewall to allow public access on port 22 (SSH) and one other port that will be used to set up a tunnel. He can then use SSH (client application) to setup a tunnel from his home PC to his office PC.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Installation:&lt;/strong&gt; SSH and all related utilities originate, like so many network utilities, in the Unix domain. Fortunately most of these extremely useful Unix / Linux utilities have been ported to Windows as part of the excellent Cygwin project. Installation instructions for Cygwin including full instructions for setting up the OpenSSH SSHD Server &lt;a href="http://pigtail.net/LRP/printsrv/cygwin-sshd.html"&gt;are available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once everything has been installed you can either use a user friendly Windows Utility such as &lt;a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html"&gt;Putty&lt;/a&gt;&amp;nbsp;to setup tunnels or use the SSH command line utility. My personal experience with Putty is that it is an excellent terminal client, but that it is a bit sensitive to network hiccups when tunneling connections. Since I switched to the SSH command line utility things have been more stable.&lt;/p&gt;
&lt;p&gt;To set up the tunnels for the above mentioned Example 1 use these settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;replace &lt;em&gt;HOME_PC&lt;/em&gt; with the public IP-number of your home PC 
&lt;/li&gt;&lt;li&gt;replace&amp;nbsp;&lt;em&gt;USER&lt;/em&gt; with the name of a user with login privileges on your home PC, e.g. &lt;em&gt;Administrator&lt;/em&gt;. 
&lt;/li&gt;&lt;li&gt;Install OpenSSH on your home pc as described previously. 
&lt;/li&gt;&lt;li&gt;On your office pc start BASH from the Cygwin group and type the following command to setup the tunnel:&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;font face="Courier New"&gt;ssh -p&amp;nbsp;22 -C -L 13389:localhost:3389&amp;nbsp;USER@HOME_PC &lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This sets up an ssh connection on the standard port 22 to the SSHD running on the home pc. Once the connection has been established it creates port 13389 on the OFFICE_PC, which maps to the remote desktop port (3389) on the &lt;em&gt;localhost&lt;/em&gt; SSHD is running on. The -C flag enables compression, which will give you a nice speed boost.&lt;/p&gt;
&lt;p&gt;You can now connect to your home pc by opening the Remote Desktop Client on your office PC and&amp;nbsp;typing &lt;em&gt;localhost:13389&lt;/em&gt;. If you get a message that you cannot open a session to localhost then &lt;a href="http://ccfaq.valar.co.uk/modules.php?name=News&amp;amp;file=article&amp;amp;sid=230"&gt;apply this workaround&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;If port 22 is blocked then you can setup SSHD to listen on a different port. This setting is stored in &lt;em&gt;C:\Program Files\Cygwin\etc\sshd_config&lt;/em&gt; (I have installed Cygwin in 'c:\progra~1').&lt;/p&gt;
&lt;p&gt;That is all for now, I am not sure if this clarifies anything, but I hope it will be useful. This posting just scratches the surface of what you can do with SSH. Some of the other highlights are: using SSH&amp;nbsp;as a SOCKS proxy, setting up multiple tunnels with one command, setting up reverse tunnels (-R switch) etc etc.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A similar article, focused on connecting to hosts outside of the corporate network&amp;nbsp;using Linux&amp;nbsp;can be &lt;/em&gt;&lt;a href="http://polishlinux.com/apps/ssh-tunneling-to-bypass-corporate-firewalls/"&gt;&lt;em&gt;&lt;font color="#8d171c"&gt;found here&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;nbsp;When using Cygwin 99% is the same as Linux anyway.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=145207" width="1" height="1"&gt;</description></item><item><title>Safeguarding against Cross Site Scripting (XSS) vulnerabilities</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/08/19/144074.aspx</link><pubDate>Sat, 19 Aug 2006 22:49:18 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:144074</guid><dc:creator>jritmeijer</dc:creator><slash:comments>2</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/144074.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=144074</wfw:commentRss><description>&lt;div&gt;&lt;font face="Helv"&gt; &lt;p&gt;&lt;font size="2"&gt;Any company worth anything will perform a 'penetration test' on any kind of service or application that is internet facing,&amp;nbsp;including websites.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;An obvious&amp;nbsp;way to approach this is to run any of the many publicly available hacking scripts against port 80 in anticipation of the webserver, being it Apache or an old dodgy IIS installation, not being fully patched.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;However, there is another way to hack websites, which is by looking for flaws in the code that is being served up by the website. These kind of attacks usually involve looking for cross site scripting vulnerabilities.&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;In short, cross site scripting attacks&amp;nbsp;exploit badly written code that does not validate user input before writing it back to the browser. I could go into much more detail but this &lt;/font&gt;&lt;a href="http://www.informit.com/articles/article.asp?p=603037&amp;amp;rl=1"&gt;&lt;font size="2"&gt;XSS Article&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; explains it much better and also describes an actual exploit in a site that was so badly written I find it difficult to believe it is for real.&lt;br&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;font size="2"&gt;&lt;img id="prodImage" height="240" alt="How to Break Web Software: Functional and Security Testing of Web Applications and Web Services" src="http://ec1.images-amazon.com/images/P/0321369440.01._AA240_SCLZZZZZZZ_.jpg" width="240" border="0"&gt;&lt;br&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Fortunately the main environment I develop for, Microsoft's ASP.net, has built-in support for XSS attacks. Just place the following bit of code in a file named test.aspx, point your browser to it and enter &amp;lt;script&amp;gt;alert(document.cookie)&amp;lt;/script&amp;gt; in the input box and click the button.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;HTML&amp;gt;&amp;lt;BODY&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FORM METHOD="POST" ACTION="test.aspx"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;INPUT TYPE="TEXT" NAME="TestVar"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;INPUT TYPE="Submit"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/FORM&amp;gt;&lt;br&gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;ASP.net pre-validates all code that a user may have manipulated and throws an &lt;em&gt;HTTPRequestValidationException&lt;/em&gt; when it finds anything that is potentially harmful.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Pretty cool, even the worst developer, there are many, is now protected.&lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=144074" width="1" height="1"&gt;</description></item><item><title>Some files can harm your computer. If the file information looks suspicious or you do not fully trust the source, do not open the file.</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/08/19/144065.aspx</link><pubDate>Sat, 19 Aug 2006 19:45:09 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:144065</guid><dc:creator>jritmeijer</dc:creator><slash:comments>60</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/144065.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=144065</wfw:commentRss><description>&lt;div&gt;I am now officially a Sharepoint user and developer...wooohooo! One of the first things I ran into&amp;nbsp;is that every time I open a document from SharePoint I get the following message.&lt;/div&gt; &lt;blockquote&gt; &lt;div&gt;&lt;em&gt;Some files can harm your computer. If the file information looks suspicious or you do not fully trust the source, do not open the file.&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;div&gt;There are&amp;nbsp;a number of ways to get rid of this message. You can either &lt;a href="http://www.sharepointu.com/forums/m_23867/tm.htm"&gt;download a registry script from SharePoint University&lt;/a&gt; that disables this message for the most common files types or manually change the settings for each file using the following steps:&lt;/div&gt; &lt;ol&gt; &lt;li&gt;Go to Windows explorer under "Tools" --&amp;gt; "Folder options...",  &lt;li&gt;Select the "File types" option.  &lt;li&gt;Highlight the word file type (.doc) and click on the "advanced" button.  &lt;li&gt;The value corresponds to the first check box "Confirm open after download". If you remove this option, the files are opened without any prompt. &lt;/li&gt;&lt;/ol&gt; &lt;p align="center"&gt;&lt;a href="http://www.demachina.com/images/blog_images/Somefilescanharmyourcomputer.Ifthefilei_DE3E/image010.png"&gt;&lt;img height="313" src="http://www.demachina.com/images/blog_images/Somefilescanharmyourcomputer.Ifthefilei_DE3E/image0_thumb6.png" width="347" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;/p&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=144065" width="1" height="1"&gt;</description></item><item><title>Using host headers and Visual Studio Web projects</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/08/20/144067.aspx</link><pubDate>Sun, 20 Aug 2006 15:34:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:144067</guid><dc:creator>jritmeijer</dc:creator><slash:comments>0</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/144067.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=144067</wfw:commentRss><description>&lt;div&gt;If you are a .net developer using Visual Studio then you probably know of the pain inflicted when taking over someone else's project and trying to get it running on your own system with full web and SourceSafe integration.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;The only way to make it worse is to add multiple web sites to your machine and differentiate between them using '&lt;em&gt;host headers&lt;/em&gt;'. The problem is that VS.NET (or FrontPage server extensions or whatever process messes up this whole web integration) iterates through the list of available sites using WMI with complete disregard of the host headers. The last site it finds for the specified port, usually 80, is used, which&amp;nbsp;is rarely the correct site.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;To make a long story short, the solution of getting web integration working on the correct site is as follows:&lt;/div&gt; &lt;ol&gt; &lt;li&gt;Temporarily put&amp;nbsp;the site on a different port, e.g. 81.  &lt;/li&gt;&lt;li&gt;Open the solution and when VS asks you what web site to use, enter the site name AND the port number (e.g. &lt;a href="http://localhost:81/"&gt;http://localhost:81/&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;With some luck - It is impossible to offer guarantees with this fragile system - VS will open the project and publish the web site to the specified URL.  &lt;/li&gt;&lt;li&gt;Close Visual Studio.  &lt;/li&gt;&lt;li&gt;Put the site back on the port you want to use, e.g. 80  &lt;/li&gt;&lt;li&gt;Open the '.webinfo' file from the root of the web project and change the port number from 81 to 80  &lt;/li&gt;&lt;li&gt;Open the solution again in VS and keep your fingers crossed an pray to whatever gods you prefer praying to.&lt;/li&gt;&lt;/ol&gt; &lt;div&gt;Many thanks to Andrew Connell whose &lt;a href="http://www.andrewconnell.com/blog/archive/2005/07/05/1685.aspx"&gt;blog post&lt;/a&gt; this solution is based on.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=144067" width="1" height="1"&gt;</description></item><item><title>SharePoint Services - Getting Started</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/29/142917.aspx</link><pubDate>Sat, 29 Jul 2006 14:59:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:142917</guid><dc:creator>jritmeijer</dc:creator><slash:comments>0</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/142917.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=142917</wfw:commentRss><description>&lt;div&gt;Anyone who regularly reads this blog has probably noticed that I have recently been posting a lot of 'Getting Started' articles; &lt;a href="http://jritmeijer.spaces.msn.com/PersonalSpace.aspx?_c11_blogpart_blogpart=blogview&amp;amp;_c=blogpart&amp;amp;partqs=cat%3d.Net%2bFramework%2b3.0"&gt;WPF&lt;/a&gt;, &lt;a href="http://jritmeijer.spaces.msn.com/PersonalSpace.aspx?_c11_blogpart_blogpart=blogview&amp;amp;_c=blogpart&amp;amp;partqs=cat%3dBiztalk%2b2006"&gt;Biztalk&lt;/a&gt; and now SharePoint. The reason for this is that I have accepted a new position with a&amp;nbsp;company in the financial industry in London, which requires me to brush up on some technologies.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Today's posting is about Microsoft SharePoint Services, the foundation for the other SharePoint products... I think. Actually I am reasonably sure, but in my opinion Microsoft is not doing the best job in explaining this product to the development community. Nevertheless, enterprises are starting to implement SharePoint at quite a large scale if I need to believe the number of job openings for SharePoint Developers.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p align="center"&gt;&lt;img src="http://www.itseminare.cz/img/sharepoint-services-3.jpg"&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;A full explanation of SharePoint is out of the scope of this posting, in stead I will focus on installing the core SharePoint Services and linking to one or two resources to get started.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The&amp;nbsp;first step is to&amp;nbsp;&lt;a href="http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/default.mspx?mfr=true"&gt;read the SharePoint Admin guide on the Microsoft website&lt;/a&gt;. Even when your plan is to 'just' be a developer it is wise to know what is going on under the covers, what the installation possibilities are and how to plan for performance and scalability. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The next step is to &lt;a href="http://www.microsoft.com/windowsserver2003/techinfo/sharepoint/wss.mspx"&gt;download the free SharePoint Services with integrated SP2&lt;/a&gt;&amp;nbsp;and read the readme file. The previously mentioned Admin Guide, you did read it right, explains that you can either perform a default installation that installs WMSDE or perform a custom install and use SQL 2000. Having read the Admin Guide I decided to&amp;nbsp;perform a custom install as it is not possible to administer WMSDE remotely, not even using the standard MSDE tricks. If you don't care about remote SQL Administration then I strongly recommend to perform a default installation as that is extremely simple. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;After installation, the admin website did not work for me. I got several errors including '401 2148074254' indicating a security problem. I disabled Windows Integrated Authentication for the site in IIS and enabled Basic Authentication. This solved the problem well enough for a development system, but if this happens on a production server I would recommend a more structural solution.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;One final problem I ran into was related to the custom installation I performed. When manually generating a Virtual Server and application pool I got a '1057' error, something about 'SPTimer'. The solution was to use a fully qualified user name \userName. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Once setup is completed you can either go to the administrator pages using 'Start / Administrative Tools / SharePoint Central Administration' or navigate to the SharePoint site you just set up.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;That is all for now. I will discuss creating SharePoint Web Parts in a next posting.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=142917" width="1" height="1"&gt;</description></item><item><title>Sysinternals swallows the red pill</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/18/142242.aspx</link><pubDate>Tue, 18 Jul 2006 21:35:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:142242</guid><dc:creator>jritmeijer</dc:creator><slash:comments>0</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/142242.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=142242</wfw:commentRss><description>&lt;div&gt;Mark Russinovich and Bryce Cogswell, founders of Sysinternals and Winternals, developers of possibly the most useful free and commercial utilities for Windows, &lt;a href="http://www.sysinternals.com/blog/2006/07/on-my-way-to-microsoft.html"&gt;have finally shamed Microsoft into buying them&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p align="center"&gt;&lt;img src="http://www.itc-solutions.ch/images/Sysinternals_logo.jpg"&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Congratulations to both, it is my understanding that although some of the free utilities may be rebranded, they will remain free.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=142242" width="1" height="1"&gt;</description></item><item><title>IIS 7 - Excellent Channel 9 video</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/18/142241.aspx</link><pubDate>Tue, 18 Jul 2006 21:33:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:142241</guid><dc:creator>jritmeijer</dc:creator><slash:comments>1</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/142241.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=142241</wfw:commentRss><description>&lt;div&gt;When Windows Vista&amp;nbsp;will be&amp;nbsp;released, a new version of Internet Information Server (IIS) version 7 will be released as well. One of the major new features on offer is that the entire service has been modularised to allow&amp;nbsp;it to be extended in both C++ as well as the .net Framework.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p align="center"&gt;&lt;img src="http://www.iis.net/App_Themes/iis_default/images/poster-photo-iis7home-01.jpg"&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;a href="http://channel9.msdn.com/Showpost.aspx?postid=215282"&gt;Channel 9&amp;nbsp;has an excellent video outlining these changes&lt;/a&gt; as well as a couple of simple but powerful demos. A &lt;a href="http://www.iis.net/default.aspx?tabid=7"&gt;new IIS.NET website&lt;/a&gt; has been released as well. Visit it to learn more and play with the system using a remote virtual lab.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=142241" width="1" height="1"&gt;</description></item><item><title>Biztalk 2006 - Day 2 - Getting started... a bit more</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/12/141888.aspx</link><pubDate>Wed, 12 Jul 2006 10:16:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:141888</guid><dc:creator>jritmeijer</dc:creator><slash:comments>13</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/141888.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=141888</wfw:commentRss><description>&lt;p align="center"&gt;&lt;a href="http://dotnetjunkies.com/WebLog/jritmeijer/archive/category/2803.aspx"&gt;Read all articles in this series&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;Reading&amp;nbsp;the whitepaper described in &lt;a href="http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/05/141590.aspx"&gt;Day 1&lt;/a&gt; of this series of articles provides a good high level overview of the capabilities of Biztalk Server 2006. However, more information, and maybe an example or two, is required in order to fully understand how the product works and what its real capabilities and limitations are.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;To get this insight, without diving head first into a full blown Biztalk installation process, Microsoft&amp;nbsp;have developed an on-line clinic named &lt;em&gt;&lt;a href="https://www.microsoftelearning.com/eLearning/courseContent.aspx?courseId=51883&amp;amp;courseClosed=true"&gt;First Look: Microsoft® BizTalk® Server 2006 for Developers&lt;/a&gt;&lt;/em&gt;. This 3 hour clinic discusses all the major modules and provides screen casts showing how to use the product. Although I find Microsoft's clinic environment somewhat confusing it is worth your time if you are truly interested&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I am a bit worried about the statement that is made a couple of times during the clinic: &lt;em&gt;After redeploying it is often a good idea to stop and start the Biztalk host&lt;/em&gt;. ...Often?.... Not very specific, is it.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Although I'll reserve my final judgment unti Il have used this version a bit more it seems that Biztalk is still in a bit of an identity crisis. Some tools run in the&amp;nbsp;MMC,&amp;nbsp;some in Visual Studio while others run as stand alone applications. No major disaster, just not very nice.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The next step is to deploy Biztalk 2006 in a Win2K3 VMWare box. My main system is running XP, which can run most of the Biztalk modules, just not Sharepoint for which Win2K3 is required. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;To be continued....&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=141888" width="1" height="1"&gt;</description></item><item><title>Biztalk 2006 - Day 1 - Getting started</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/05/141590.aspx</link><pubDate>Wed, 05 Jul 2006 18:04:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:141590</guid><dc:creator>jritmeijer</dc:creator><slash:comments>21</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/141590.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=141590</wfw:commentRss><description>&lt;p align="center"&gt;&lt;a href="http://dotnetjunkies.com/WebLog/jritmeijer/archive/category/2803.aspx"&gt;Read all articles in this series&lt;/a&gt;&lt;/p&gt;

&lt;div&gt;&lt;em&gt;No application is an island. Whether we like it or not, tying systems together has become the norm. Yet connecting software is about more than just exchanging bytes. As organizations move toward a service-oriented world, the real goal—creating effective business processes that unite separate systems into a coherent whole—comes within reach... &lt;/em&gt;According to the first paragraph of Microsoft's whitepaper &lt;a href="http://download.microsoft.com/documents/australia/windowsserversystem/biztalk2006/Understanding_BTS06.pdf"&gt;Understanding Biztalk 2006&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;So, in addition to starting a &lt;a href="http://jritmeijer.spaces.msn.com/PersonalSpace.aspx?_c11_blogpart_blogpart=blogview&amp;amp;_c=blogpart&amp;amp;partqs=cat%3d.Net%2bFramework%2b3.0"&gt;new series of articles about Windows Presentation Foundation&lt;/a&gt;, I am also starting a series about Biztalk Server 2006. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Ever since I first saw it introduced during a TechEd 2000 session in Florida, I thought it was an interesting product with great potential. However, it was clearly not quite there yet. The last time I did anything serious with Biztalk was for a POS integration project using an extremely buggy beta version of the 2004 version, which was such a bad experience that I rewrote the functionality as a Windows Service, which was good enough for that particular project.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p align="center"&gt;&lt;img src="http://www.s2.com.br/s2arquivos/361/Imagens/2600Image.jpg"&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;However, other than Windows Media Centre, most version 1.0 or 2.0 Microsoft products are rarely any good. Microsoft does not give up easily and with version 2006 it finally seems that they have created a great and mature product.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Over the next few weeks I will author a number of articles about how to get started with Biztalk 2006. As always, we start with the basics:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Login to MSDN -&amp;nbsp;you are a subscriber, right - and download Biztalk 2006 in your favourite language. It is a 450MB download.&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Read the previously mentioned &lt;a href="http://download.microsoft.com/documents/australia/windowsserversystem/biztalk2006/Understanding_BTS06.pdf"&gt;Understanding Biztalk 2006&lt;/a&gt;&amp;nbsp;whitepaper. It is 33 pages and a good read.&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Before installing Biztalk on your own system, follow &lt;a href="http://www.microsoftvirtuallabs.com/express/registration.aspx?LabId=e423099b-b71b-44f6-bd63-b11170f1e0cf"&gt;a 30 minutes Virtual Lab&lt;/a&gt; for a high level overview. This lab is hosted on a server at Microsoft and does not require you to install anything other than a simple ActiveX control.&lt;/li&gt;&lt;/ol&gt;
&lt;div&gt;&amp;nbsp;That is all for today, if you are very eager you can get started on &lt;a href="http://msdn.microsoft.com/virtuallabs/biztalk/"&gt;other Virtual Labs&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=141590" width="1" height="1"&gt;</description></item><item><title>Resolving slow Windows shutdown problems</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/07/04/141538.aspx</link><pubDate>Tue, 04 Jul 2006 16:32:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:141538</guid><dc:creator>jritmeijer</dc:creator><slash:comments>31</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/141538.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=141538</wfw:commentRss><description>&lt;DIV&gt;Although my computer is not suffering too much from this, I have had problems in the past with Windows needing minutes rather than seconds to shut down. I know for a fact that some of my friends are suffering from this problem.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;It is easy to blame Windows, but the problem is actually caused by applications running on top of the OS that are not behaving properly.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;But there is hope, &lt;A href="http://www.intelliadmin.com/blog/2006/07/why-windows-takes-so-long-to-shut-down.html"&gt;IntelliAdmin is reporting&lt;/A&gt; about a free Microsoft application that runs in the background and deals with cleaning up the mess that applications leave behind.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;IMG src="http://www.intelliadmin.com/images/Shutdown_Takes_Too_Long1.jpg"&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You can download the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=1B286E6D-8912-4E18-B570-42470E2F3582&amp;amp;displaylang=en"&gt;&lt;EM&gt;User Profile Hive Cleanup Service&lt;/EM&gt; here&lt;/A&gt;.&lt;/DIV&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=141538" width="1" height="1"&gt;</description></item><item><title>Windows Presentation Foundation - Day 4 - Optimizing video performance</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/06/27/141219.aspx</link><pubDate>Tue, 27 Jun 2006 17:31:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:141219</guid><dc:creator>jritmeijer</dc:creator><slash:comments>277</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/141219.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=141219</wfw:commentRss><description>&lt;p align="center"&gt;&lt;a href="http://dotnetjunkies.com/WebLog/jritmeijer/archive/category/2799.aspx"&gt;Click here for an overview of all posts in this series&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Before I go into the details of today's exercise I'll provide some quick links and useful information first. A few days ago Microsoft released a Post Beta 2 &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8D09697E-4868-4D8D-A4CF-9B82A2AE542D&amp;amp;displaylang=en"&gt;June CTP version&lt;/a&gt; of the .net Framework 3.0. Although it is always tempting to install the latest and greatest version, I advise against it as the Interactive Designer only works with the Beta 2 version. I have also had some problems installing the June version of the SDK&amp;nbsp;and VS add-in. Until further notice my posts &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4A96661C-05FD-430C-BB52-2BA86F02F595&amp;amp;displaylang=en"&gt;assume a Beta 2 installation&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;It is fun to see the WPF community growing little by little. Lee Brimelow, a very experienced Flash developer, has started an excellent&amp;nbsp;&lt;a href="http://thewpfblog.com/"&gt;WPF blog&lt;/a&gt;. His blog contains a number of small but powerful WPF examples that include full source code. He approaches everything from a Flash developer's point of view, which is a good thing. He has also authored a &lt;a href="http://thewpfblog.com/?p=17"&gt;good article comparing WPF with Flash&lt;/a&gt;, which is spot on.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;On to the good stuff. Having played around with some samples, looked at the SDK and read some blog entries I feel comfortable enough to create some code and...gasp... give some advice with respect to performance.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The full source code and a compiled binary &lt;a href="http://www.demachina.com/downloads/BlogDownloads/WPFReflection.zip"&gt;can be downloaded here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p align="center"&gt;&lt;img src="http://tk.files.storage.msn.com/x1p62by_yNu9HGKe_qBE68JR_1nuJ7R6GcFtbFHrBeCNvM3Wkfe9xIApox_RwAAxNrNS0X6I6VTwzRHIZs1lEPGgbtu6_A3uF8sqFagAjbdea1gH2ALqpdKSDpL-IXjlZONnt2OM_nIP30"&gt;&lt;br&gt;&lt;em&gt;Our final result&lt;/em&gt;&lt;/p&gt;&lt;br&gt;
&lt;div&gt;Quite a few of the WPF showcases use a cool reflective surface that mirrors whatever action is going on, e.g. a movie, in real time. An obvious way to do this is to use 2 media elements with the same movie, vertically mirror one of the movies and add a transparency mask. Although in theory this works, it is very inefficient as the video needs to be streamed twice and&amp;nbsp;decoded twice, which uses a lot of CPU and network bandwidth. It is also very difficult to keep the two video sources exactly in sync.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;A better way to do this is to create one &lt;em&gt;MediaElement&lt;/em&gt;, create a vertically mirrored rectangle, and assign the MediaElement's VisualBrush to it.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Sounds simple right, here is how we do it.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Start Interactive Designer and create a new project&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Make the background of the Canvas black or use a fancy gradient to create a horizon&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In the Library window, select the &lt;em&gt;MediaElement&lt;/em&gt; and draw it on the top 2/3 of the Canvas&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;With the MediaElement still selected, navigate to the &lt;em&gt;Properties Window&lt;/em&gt; and specify a video stream in the &lt;em&gt;Source &lt;/em&gt;property, e.g. mms://wm.microsoft.com/ms/msnse/0606/27918/NathanDunlap_MBR.wmv&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Use the &lt;em&gt;Rectangle Tool&lt;/em&gt;&amp;nbsp;from the &lt;em&gt;Toolbox Window&lt;/em&gt; to draw a&amp;nbsp;rectangle about&amp;nbsp;1/3 of the height of the&amp;nbsp;canvas straight underneath the MediaElement. I use gridlines and '0' margins to position everything and line&amp;nbsp;things up, but you can also do it the quick and dirty way.&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Use the &lt;em&gt;Properties Window&lt;/em&gt; to give the rectangle a name, in this case 'Reflection'&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;To vertically mirror the rectangle, grab the handle at the top middle of the&amp;nbsp;rectangle and flip it vertically by dragging it underneath the bottom line of the rectangle.&lt;/li&gt;&lt;/ol&gt;
&lt;p align="center"&gt;&lt;img src="http://tk.files.storage.msn.com/x1p62by_yNu9HGKe_qBE68JR7hK09hzWf8ZV6Gmp9YrMQZLY9sPMdDRE6-MXmNMGVG-wZUbR3aX6ideBzjcC6CvL5tmidR75HkEbE_L5Q7FZdJhESgS5uUr4EbVwrlRXyvSultUYOWGnS4"&gt;&lt;br&gt;&lt;em&gt;The look of the fully created Scene in ID&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Make sure you save&amp;nbsp;often as ID crashes frequently. I had to perform the previous steps about 3 times due to all kind of crashes.&lt;img src="http://jritmeijer.spaces.msn.com/mmm2006-06-19_17.24/rte/emoticons/smile_baringteeth.gif"&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Now for the tricky bit, we need to&amp;nbsp;create a vertical opacity mask in the Reflection rectangle. Follow the steps outline below:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Select the &lt;em&gt;Reflection &lt;/em&gt;rectangle&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In the &lt;em&gt;Appearance Window&lt;/em&gt; select the &lt;em&gt;OpacityMask&lt;br&gt;&amp;nbsp;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Select the &lt;em&gt;Linear Gradient Brush, &lt;/em&gt;the third icon from the left&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select the&amp;nbsp;right most gradient stop, the&amp;nbsp;white&amp;nbsp;one,&amp;nbsp;and give it an 'A' (Alpha) of 0. The Opacity mask now blends from opaque to transparent.&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;To rotate the Opacity Mask 90 degrees, select the &lt;em&gt;Brush Transform Icon&lt;/em&gt; from the &lt;em&gt;Tools Window&lt;/em&gt;. Rotate the arrow in the reflection rectangle by 90 degrees until the white part of the gradient is at the top (Weird, you would expect it to be the other way around and have the transparency at the bottom). After rotating, move the arrow 50% up and make it 2/3 of the original size. This provides a more realistic reflection&lt;/li&gt;&lt;/ol&gt;
&lt;p align="center"&gt;&lt;img src="http://tk.files.storage.msn.com/x1p62by_yNu9HGKe_qBE68JR1t5pCMax9E6vO4FfJyaqElOMq_jZdsTWn8Sv60yOWEXk1Trjjq2QlWHxlJonI3-AfMq5TMqLQq8vvV2UL1YVGpFytreIhVxk2cICjjVYneCKCr4MUE6Qy8"&gt;&lt;br&gt;&lt;em&gt;Creating the opacity mask&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The scene is now finished, we just need to add a little bit of code to assign the Video's brush to the reflection rectangle:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Open scene1.xaml.cs using the &lt;em&gt;Projects Window&lt;/em&gt;&lt;br&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Add the following code to the constructor to create a new VisualBrush and assign it to the rectangle.&lt;br&gt;&lt;br&gt;&lt;font face="Courier New, Courier, Monospace"&gt;// Insert code required on object creation below this point.&lt;br&gt;Reflection.Fill = new VisualBrush(MediaElement);&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;div&gt;That is it, press F5 to see the final results.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Because we have been a bit naughty it doesn't work 100% as expected. The reflection takes the full size of the rectangle while the video may be much smaller. The reason for this is, most likely,&amp;nbsp;that we didn't wait for the video to finish initialising (and thereby determining the video's width) before assigning it to the rectangle.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;There are 2 solutions, either wait for the video to initialise or draw a Border element around the video and use that border's VisualBrush, including the&amp;nbsp;embedded video, as the reflection. The Border has a fixed width so we don't need to wait for it to finish loading.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;I secretly thought that this video would play roughly using the same CPU percentage as it would take Windows Media Player. Unfortunately that is not the case, even when we remove the reflection. While Windows Media Player only takes 10% CPU time, this WPF application almost maxes out one of the cores of my Core Duo CPU. If Anyone can shed any light on this then that would be much appreciated as the current performance is unacceptable, especially considering my Laptop has a 512MB Radeon X1600.&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=141219" width="1" height="1"&gt;</description></item><item><title>Windows Presentation Foundation - Day 3 - What I have learned so far</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/06/20/140825.aspx</link><pubDate>Tue, 20 Jun 2006 10:39:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:140825</guid><dc:creator>jritmeijer</dc:creator><slash:comments>1</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/140825.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=140825</wfw:commentRss><description>&lt;P ALIGN="CENTER"&gt;&lt;a href="http://www.dotnetjunkies.com/WebLog/jritmeijer/archive/category/2799.aspx"&gt;Click here for an overview of all posts in this series&lt;/A&gt;.&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Ok, so &lt;A href="http://jritmeijer.spaces.msn.com/blog/cns!8A48A27460FB898A!698.entry"&gt;Day 2&lt;/A&gt; was really interesting, especially because the documentation in the SDK is not very up to date or correct. This required me to be very creative to get things to work. The good thing is that playing around is often the best way to learn a new technology.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;During my experimentations I also played around with the Interactive Designer (ID) by&amp;nbsp;copying XAML between VS and ID and creating some animations. ID Shows promise, but it is not quite there yet. The user interface for the timeline is quite basic especially when compared to the Macromedia Flash one. For example it does not seem to be possible to insert frames or easily move (key) frames to a different position without selecting them painstakingly one by one.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;One of the things I like is the ability&amp;nbsp;to copy the XAML between ID and VS. For example, I had absolutely no idea how to absolutely position an element in a grid. The easiest way to find this out is to just do it in ID and see what XAML is generated. It turns out that you don't position elements with TOP, LEFT etc properties, but by setting the &lt;EM&gt;margin &lt;/EM&gt;attribute. Unconventional, but there is probably a good reason for doing it this way.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Unfortunately, the moment you add any kind of animation to a scene in ID it no longer seems to be possible to copy the XAML to VS due to some problems with XML namespaces. &lt;A href="http://channel9.msdn.com/showpost.aspx?postid=205390"&gt;I have posted a question on Channel&amp;nbsp;9 to find a workaround&lt;/A&gt;,&amp;nbsp;but have yet to receive a reply. I know I should not copy and paste XAML around, but I just need to know what is going on under the hood.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Anyone who worked through the articles in the SDK I suggested on Day 2 will have noticed that the documentation is not very accurate and up-to-date. Fortunately you can provide feedback to Microsoft's documentation team by clicking on the link at the bottom of each page in the documentation. They are very responsive as I received a personal&amp;nbsp;reply and a thank you in a matter of hours.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The integration of WPF in Visual Studio is coming along quite nicely, but it is not there yet. VS seems to crash more than often, especially when terminating a debug session. The Intellisense list for the objects and elements are also massive. It would be nice if the most common properties and properties that are part of the object itself, not one of the base objects, would be listed in&amp;nbsp;a separate section at the top of the Intellisense window.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Switching to the&amp;nbsp;visual designer for a XAML file in VS also results in errors too often.&amp;nbsp;For example,&amp;nbsp;when the specified source of an image element&amp;nbsp;does not exist then it is not possible to switch to the designer. It would be nice if the offending object would be disabled or skipped.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;XAMLPad is quite useful as well for previewing XAML. Unfortunately it is not very happy when event handlers such as 'Click' have been specified, it just refuses to display the file. I would prefer it if these handlers could optionally be skipped&amp;nbsp;as it takes a lot of time to manually remove all these attributes from the XAML.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The VisualBrush element rocks! More about that in the future.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Finally, as these are still early days, you cannot rely on Googling for help. Too few people use WPF or have posted about it. This, naturally, is just a matter of time.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=140825" width="1" height="1"&gt;</description></item><item><title>Windows Presentation Foundation - Day 2 - Using the SDK</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/06/16/140598.aspx</link><pubDate>Fri, 16 Jun 2006 22:04:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:140598</guid><dc:creator>jritmeijer</dc:creator><slash:comments>0</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/140598.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=140598</wfw:commentRss><description>&lt;P ALIGN="CENTER"&gt;&lt;a href="http://www.dotnetjunkies.com/WebLog/jritmeijer/archive/category/2799.aspx"&gt;Click here for an overview of all posts in this series&lt;/A&gt;.&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Having installed all the prerequisites and tools, see Day 1, we have to start somewhere. It is always good to get your hands dirty and work your way through a couple of examples in the SDK.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Follow the steps listed below:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;Launch the SDK from&amp;nbsp; the Start Menu / All Programs / Microsoft Windows SDK / Windows SDK Documentation&lt;BR&gt;&amp;nbsp; 
&lt;LI&gt;Navigate to WinFX Development / Windows Presentation Foundation / Getting Started / Get started using Windows Presentation Foundation&lt;BR&gt;&amp;nbsp; 
&lt;LI&gt;Work your way through the following simple exercises:&lt;BR&gt;&amp;nbsp; 
&lt;UL&gt;
&lt;LI&gt;Hello World 
&lt;LI&gt;Use "XAML" to Create a Simple Layout 
&lt;LI&gt;Use "XAML" to Create a Complex Layout 
&lt;LI&gt;Create a Dynamic "XAML" Page (The documentation for this exercise seems broken in Beta 2, you may need to be a bit creative. I have reported&amp;nbsp;this to&amp;nbsp;Microsoft's SDK documentation team and receceived a reply within hours) 
&lt;LI&gt;Create a Multipage Application&lt;BR&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;In the navigation tree navigate to the 'How-to Topics / Create a Windows Presentation Foundation' and execute the exercise.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;That is it for today, it shouldn't take you too long.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=140598" width="1" height="1"&gt;</description></item><item><title>Windows Presentation Foundation - Day 1 - Getting started</title><link>http://dotnetjunkies.com/WebLog/jritmeijer/archive/2006/06/15/140410.aspx</link><pubDate>Thu, 15 Jun 2006 08:56:00 GMT</pubDate><guid isPermaLink="false">58df7014-fd75-437c-9641-150997716d1c:140410</guid><dc:creator>jritmeijer</dc:creator><slash:comments>1</slash:comments><comments>http://dotnetjunkies.com/WebLog/jritmeijer/comments/140410.aspx</comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/jritmeijer/commentrss.aspx?PostID=140410</wfw:commentRss><description>&lt;P ALIGN="CENTER"&gt;&lt;a href="http://www.dotnetjunkies.com/WebLog/jritmeijer/archive/category/2799.aspx"&gt;Click here for an overview of all posts in this series&lt;/A&gt;.&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Over the next few weeks, hopefully not months, I will dive, head first, into the new Microsoft .net Framework 3.0. I will focus mainly on Windows Presentation Foundation (WPF), but I may sneak in some Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF, not WWF as that one was already taken ;-).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I will get some help from one of the few real world WPF experts, Andrew Whiddett, &lt;A href="http://jritmeijer.spaces.msn.com/blog/cns!8A48A27460FB898A!361.entry"&gt;who created the excellent WPF based Nascar kiosk&lt;/A&gt;. I will blog about my experiences so if you are interested &lt;A href="http://jritmeijer.spaces.msn.com/feed.rss"&gt;subscribe to my RSS feed&lt;/A&gt;.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So, before we can do anything we need to setup our development environment with all the required development tools, SDKs and runtime components.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;We are currently at Beta 2, but as versions and links will be&amp;nbsp;changing I am only going to provide one link, which is to&amp;nbsp;the new &lt;A href="http://www.netfx3.com/"&gt;.net Framework 3 site&lt;/A&gt;. From here you can download the .net framework 3.0 and all other components.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Click on the download link and download:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;WinFX runtime components. 
&lt;LI&gt;Windows SDK for WinFX Runtime Components 
&lt;LI&gt;Microsoft Visual Studio Extensions - Development Tools for WinFX&lt;/LI&gt;&lt;/UL&gt;
&lt;DIV&gt;After everything has been installed we need to verify that it works. The easiest thing is to open and compile one of the examples that come with the SDK. All WPF Samples are available in the following ZIP file:&lt;/DIV&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV&gt;C:\Program Files\Microsoft SDKs\Windows\v1.0\samples\WPFSamples.zip&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;Unzip the archive and open one of the examples such as:&lt;/DIV&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV&gt;C:\Program Files\Microsoft SDKs\Windows\v1.0\samples\WPFSamples\Demos\15Puzzle\Csharp\15Puzzle.csproj&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;And execute it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Andrew also advices to download the following as it will probably come in handy:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4ef0492d-9cb5-4ea6-88b6-a4cd95e5491b"&gt;Microsoft Expression Interactive Designer&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4dfd5390-0793-420a-890a-97dc3ad94127"&gt;Microsoft Expression Graphic Designer&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=140410" width="1" height="1"&gt;</description></item></channel></rss>