<?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/"
	>

<channel>
	<title>Quercus Blogs</title>
	<atom:link href="http://blogs.quercussolutions.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.quercussolutions.com</link>
	<description>A blog hosted by Quercus Solutions, an Edmonton, Alberta based consulting company and Microsoft Gold Certified Partner. We work with our clients to achieve a common goal: streamline your business using innovative IT solutions.</description>
	<lastBuildDate>Wed, 09 May 2012 15:14:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Patterns and Practices: Dependency Injection 101</title>
		<link>http://blogs.quercussolutions.com/index.php/patterns-and-practices-dependency-injection-101/</link>
		<comments>http://blogs.quercussolutions.com/index.php/patterns-and-practices-dependency-injection-101/#comments</comments>
		<pubDate>Wed, 09 May 2012 15:14:46 +0000</pubDate>
		<dc:creator>robbie</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[aspnetmvc]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1356</guid>
		<description><![CDATA[This is the start of a series of posts that I’ll be doing on design patterns and best practices; it involves the use of common development concepts that I find a core part of development.  If your interested in following, they will be under the category ‘Patterns and Practices’. One of the most common patterns [...]]]></description>
			<content:encoded><![CDATA[<p>This is the start of a series of posts that I’ll be doing on design patterns and best practices; it involves the use of common development concepts that I find a core part of development.  If your interested in following, they will be under the category ‘Patterns and Practices’.</p>
<p>One of the most common patterns seen in ASP.NET MVC is dependency injection (otherwise known as Inversion of Control).  Why? It loosely couples the parts of the application and really emphasizes the ability to unit test the separate layers of your application.  Why is unit testing important? Unit Testing, while it may add more time to your development, it allows developers, testers and the client to feel more confident that their code is doing what it is supposed to do.</p>
<p>So what exactly is dependency injection?  Many of us use patterns without even knowing that we are doing it, so this may sound familiar.  It’s actually pretty straightforward, using an instance of one class, it calls an instance of another class, but not by a concrete implementation, but rather by interface.  In essence, dependency injection, aims to reduce the amount of boilerplate wiring and infrastructure code that you must write and implement one of the core design principles, code to an interface not a implementation.</p>
<p>Here’s a simple example, the AccountService has to get a Account.   It looks like this:</p>
<pre>public class AccountService
{
  private IAccountRepository _accountRepository;
  public AccountService(IAccountRepository accountRepo)
  {
    _accountRepository = accountRepo;
  }

  public Account GetAccount(int accountId)
  {
    return _accountRepository.GetAccountById(accountId);
  }
}</pre>
<p>When we need the AccountRepository, we ask the dependency container to get it for us the instance based on what it’s mapped too.  Why does this benefit developers? It’s good because the AccountService doesn’t know or care about it gets an Account.  You can stub out what the methods and properties on a fake IAccountRepository might return, and test just the AccountService.  You can also use this to change the implementation of the IAccountRepository on the fly based on the type of storage you may be using.  Coupled with a framework such as Ninject, using dependency injection is a powerful pattern that should be used more often.  In one of my following posts I’ll go into using an example of using Ninject and a basic tutorial.</p>
<p>Article source: <a href="http://robbiemadan.com/2012/05/09/patterns-and-practices-dependency-injection-101/">http://robbiemadan.com/2012/05/09/patterns-and-practices-dependency-injection-101/</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/patterns-and-practices-dependency-injection-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Storage 101</title>
		<link>http://blogs.quercussolutions.com/index.php/password-storage-101/</link>
		<comments>http://blogs.quercussolutions.com/index.php/password-storage-101/#comments</comments>
		<pubDate>Tue, 08 May 2012 15:58:04 +0000</pubDate>
		<dc:creator>robbie</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[aspnetmvc]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1353</guid>
		<description><![CDATA[For all sites that store memberships in a database, security and encryption of sensitive data is extremely important. The password being the obvious field that would need to be protected.  It’s surprising to see how many sites still use plain text passwords or one-way hashes for password storage and don’t realize how easy those are [...]]]></description>
			<content:encoded><![CDATA[<p>For all sites that store memberships in a database, security and encryption of sensitive data is extremely important. The password being the obvious field that would need to be protected.  It’s surprising to see how many sites still use plain text passwords or one-way hashes for password storage and don’t realize how easy those are to hack.  Most systems implement a format known as the “one-way hash”. This means that for any input that set the password, the same input will always result in the same hash. But, there is no mathematical method of taking the resulting hash and determining what the original input was.  Using a system such as MD5, hashing the password “qwerty” will result in the string “d8578edf8458ce06fbc5bb76a58c5ca4″, but if I give this same string to people to reverse, it will be impossible for them to determine that the string comes from “password”.</p>
<p>How does this work from an application perspective? Lets assume your building out a membership provider, when you first go to create the user you will store the password as a hash – so instead of storing ‘qwerty’ you will store “d8578edf8458ce06fbc5bb76a58c5ca4″. When that user logs in next, they will enter their password, the system will hash this password using the same algorithm and compare the hashed values, there is no way for you to compare the actual passwords without hashing them. This is quickly becoming standard practice.</p>
<p>Now what if I wanted to break into this account? The fact that the same input always generates the same hash tag means I can build up a database of inputs and outputs and use that to attack an account, this is called using a ‘rainbow table’, a database of inputs/outputs used to determine a hashed password.  Rainbow tables are easily found on the internet, so this one-way hash is not as safe as once thought.  If your interested in learning more about rainbow tables, check out <a title="http://ophcrack.sourceforge.net/" href="http://ophcrack.sourceforge.net/" target="_blank">http://ophcrack.sourceforge.net/</a>.</p>
<p>So what’s the best way of stoping rainbow table hacking? Salting. By generating a random “salt” for every user and attaching it to their passwords before hashing, you have made the rainbow tables ineffective. For example, the password ‘qwerty123′ becomes ‘qwerty123AS@#$fgr=’ and is then hashed into ’8a7bb436d4849395072483f7715b7edb’.  Because the salt generates a random string and each user in your database has a different salt value, you have effectively removed the threat of rainbow tables.</p>
<p><a href="http://robbiemadan.files.wordpress.com/2012/04/password-hash-salt.png"><img class="aligncenter size-thumbnail wp-image-72" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/1fbf0_password-hash-salt.png" alt="" width="150" height="105" /></a></p>
<p>If you want to read more about the inner workings of rainbow tables, take a look at this post: <a title="http://chargen.matasano.com/chargen/2007/9/7/enough-with-the-rainbow-tables-what-you-need-to-know-about-s.html" href="http://chargen.matasano.com/chargen/2007/9/7/enough-with-the-rainbow-tables-what-you-need-to-know-about-s.html" target="_blank">http://chargen.matasano.com/chargen/2007/9/7/enough-with-the-rainbow-tables-what-you-need-to-know-about-s.html</a></p>
<p>Article source: <a href="http://robbiemadan.com/2012/04/26/password-storage-101/">http://robbiemadan.com/2012/04/26/password-storage-101/</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/password-storage-101/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Missing TFS Build Templates</title>
		<link>http://blogs.quercussolutions.com/index.php/missing-tfs-build-templates/</link>
		<comments>http://blogs.quercussolutions.com/index.php/missing-tfs-build-templates/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 16:46:18 +0000</pubDate>
		<dc:creator>Jakew</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[TFS Build]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1341</guid>
		<description><![CDATA[Background I am just learning how to use TFS 2010 build services and ran into an issue setting up the default build.&#160; The XAML templates just didn’t exist.&#160; Being my first experience with TFS build I had no idea they were missing in the first place.&#160; I realized fairly early on that something was not [...]]]></description>
			<content:encoded><![CDATA[<blockquote><h2>Background</h2>
<p>I am just learning how to use TFS 2010 build services and ran into an issue setting up the default build.&#160; The XAML templates just didn’t exist.&#160; Being my first experience with TFS build I had no idea they were missing in the first place.&#160; I realized fairly early on that something was not quite right with the team project.&#160; I started going through blogs, MSDN, etc… trying to determine where I went wrong but could not find any information on how to create the templates or why they would be missing in the first place.</p>
<p>All the documentation referred to the BuildProcessTemplates folder in source control which was not created with our project.&#160; The&#160; team project was created with Visual Studio 2010 on a brand new TFS 2010 installation.</p>
<h2>Steps I took</h2>
<p>I created my own test project to try and recreate the issue.&#160; When I created a new team project, the BuildProcessTemplates folder was created and populated with the XAML files.&#160; This obviously confused me as the projects were built less than a week apart.</p>
<p>To solve one issue, I copied the BuildProcessTemplates folder into my existing projects and checked them into source control.&#160; I was then able to create a default build in less than five minutes.&#160; This did not answer why the folder was missing in the first place.</p>
<h2>What Happened</h2>
<p>I did determine why the original project did not have the Build Templates created but the newly created test project did.&#160; When TFS was installed, the build services were not configured.&#160; The build services were configured <strong><em>after </em></strong>the original project was created.&#160; If build services are not configured, TFS will not create the default build templates.&#160; In hindsight this make sense, if there are no build services why bother with creating build templates.</p>
<h2>Conclusion</h2>
<p>I learned a few things from this issue, the most important for me being that the default build templates are not specific to a project and can be used in any project to created the default build.</p>
<p>This was my first Blog posting and I hope that it helps some people just getting started with TFS 2010 builds.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/missing-tfs-build-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lync for Android Update</title>
		<link>http://blogs.quercussolutions.com/index.php/lync-for-android-update/</link>
		<comments>http://blogs.quercussolutions.com/index.php/lync-for-android-update/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 19:08:46 +0000</pubDate>
		<dc:creator>Bhavin M</dc:creator>
				<category><![CDATA[Lync]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1332</guid>
		<description><![CDATA[A new update for the Lync app for Android was released yesterday. Here are the changes: Enabled call-via-work &#8211; allowing Enterprise Voice enabled users to make and recieve calls using your Enterprise Voice (Lync ID) number only. Connect with other using a single identity. Added user controls for adjusting the sound/vibration for incoming notifications. Improved [...]]]></description>
			<content:encoded><![CDATA[<p>A new update for the Lync app for Android was released yesterday.</p>
<p>Here are the changes:</p>
<ul>
<li>Enabled call-via-work &#8211; allowing Enterprise Voice enabled users to make and recieve calls using your Enterprise Voice (Lync ID) number only. Connect with other using a single identity.</li>
<li>Added user controls for adjusting the sound/vibration for incoming notifications.</li>
<li>Improved Lync status icon: know if you can receive IM messages.</li>
<li>Enabled copy of IM text to the clipboard.</li>
<li>Multiple bug fixes.</li>
</ul>
<p>Grab it at the Market: <a href="https://market.android.com/details?id=com.microsoft.office.lync&amp;hl=en">https://market.android.com/details?id=com.microsoft.office.lync&amp;hl=en</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/lync-for-android-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drive: The Surprising Truth About What Motivates People</title>
		<link>http://blogs.quercussolutions.com/index.php/drive-the-surprising-truth-about-what-motivates-people/</link>
		<comments>http://blogs.quercussolutions.com/index.php/drive-the-surprising-truth-about-what-motivates-people/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 17:02:02 +0000</pubDate>
		<dc:creator>paulg</dc:creator>
				<category><![CDATA[Corporate Culture]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1325</guid>
		<description><![CDATA[By Daniel H. Pink Original Source: The RSA Animate: &#8216;DRIVE &#8211; The Surprising Truth About What Motivates Us&#8217;]]></description>
			<content:encoded><![CDATA[<p>By Daniel H. Pink</p>
<p>Original Source: The RSA Animate: <a href="http://www.youtube.com/watch?v=u6XAPnuFjJc">&#8216;DRIVE &#8211; The Surprising Truth About What Motivates Us&#8217;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/drive-the-surprising-truth-about-what-motivates-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Focus of Leadership</title>
		<link>http://blogs.quercussolutions.com/index.php/the-focus-of-leadership/</link>
		<comments>http://blogs.quercussolutions.com/index.php/the-focus-of-leadership/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 16:42:20 +0000</pubDate>
		<dc:creator>robbie</dc:creator>
				<category><![CDATA[Corporate Culture]]></category>
		<category><![CDATA[Developing Teams]]></category>
		<category><![CDATA[#leadership #culture #hr]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1322</guid>
		<description><![CDATA[&#160; I first heard of the concept of Convex Leadership during a TEDTalk by R.A. Mashelkar, when he was speaking at TEDIndia in 2009. His talk discussed breakthrough designs for ultra low cost products being developed in India. Borrowing the concept, Gandhian engineering, from Tata Motors, his discussion expanded on the concept of frugality and [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>I first heard of the concept of Convex Leadership during a TEDTalk by R.A. Mashelkar, when he was speaking at TEDIndia in 2009. His talk discussed breakthrough designs for ultra low cost products being developed in India. Borrowing the concept, Gandhian engineering, from Tata Motors, his discussion expanded on the concept of frugality and challenging conventional wisdom in technological innovations, engineering and new product development. Getting more, from less, for more&#8230;.. meaning Getting more service, from less resources, for more people. Amazing concept for the manufacturing and production world; especially for a world of depleting resources and a population that can’t afford luxurious overpriced designs.</p>
<p>Going back to the concept of convex leadership, the talk by Mashelkar brought up the idea of how leaders can transform the views and perceptions of those around them to focus and act as one; this type of leadership is needed to take advantage of concepts like Gandhian Engineering. Mashelkar further discusses how he came up with the concept:</p>
<p><span id="more-1322"></span></p>
<p>“Principal Bhave took us out into the sun to demonstrate to us as to how to find the focal length of a convex lens. He had a piece of paper here, a convex lens here and he moved it up and down and there was a point when there was a sharp focus and a bright spot on the paper. He showed the distance between paper and the lens and said that this distance was the focal length. But then the paper started burning. For some reason, he then turned to me, and said, Mashelkar, if you focus your energies like this, you can burn anything in the world.&#8221;</p>
<p>If you think carefully about this story, it tells you about the new model for the society and for the nation. What is the experiment? You have the lens. And what does the lens do? It takes the parallel rays of the sun and then lets them converge. And what is the property of parallel lines? Parallel lines never meet. Parallel rays never meet but the lens actually makes them meet. The “convex lens” brings things together to focus and work together – leadership that brings people together.</p>
<p>Lets bring this back to the world of technology for a minute. Many frameworks and methodologies exist on leadership and project management, but when it comes down to leadership, it really comes down to basics &#8211; team leadership means focusing the team on obtaining a goal. As a company, the same concept can be applied &#8211; focusing the company on common goals; focusing everyones energy on obtaining the same strategic goals is key to obtaining success. Leaders that are able to display the attributes of convex leadership will be able to focus their teams of employees towards achieving the objectives laid out by the company; in some cases this may be in the form of helping employees obtain their own objectives (SMART goals from performance reviews) which thereby result in moving a step forward towards reaching the overall company objectives. In the end, the ability to lead people and converge the parallel lines that represent individual goals, is the true measure of a good leader.</p>
<p>The challenging part is finding those individuals that can lead by using a convex leadership style within a company; these leaders are the ones who understand the true motivators that get people to work in the morning; the difference between intrinsic and extrinsic motivators, Herzberg&#8217;s motivation-hygiene theory and are able to build the culture and team that have chemistry to work together.</p>
<p>So, the question I pose is, do you have a leader that is able to motivate and focus you? Or are you that leader?</p>
<p>&nbsp;</p>
<p>Article source: <a href="http://www.robbiemadan.com/2012/01/04/the-art-of-leadership">http://www.robbiemadan.com/2012/01/04/the-art-of-leadership</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/the-focus-of-leadership/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Video Call Federation with Microsoft Lync to Windows Live Network</title>
		<link>http://blogs.quercussolutions.com/index.php/video-call-federation-with-microsoft-lync-to-windows-live-network/</link>
		<comments>http://blogs.quercussolutions.com/index.php/video-call-federation-with-microsoft-lync-to-windows-live-network/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 21:06:04 +0000</pubDate>
		<dc:creator>Bhavin M</dc:creator>
				<category><![CDATA[Lync]]></category>
		<category><![CDATA[AV]]></category>
		<category><![CDATA[Federation]]></category>
		<category><![CDATA[Live Messenger]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1296</guid>
		<description><![CDATA[I was recently troubleshooting an issue where Lync clients could not connect via video calls with Windows Live Messenger 2011 clients. The users could instant message each other but video calls would never connect. The underlining issue for the disconnect is that Lync requires SRTP encryption by default which the Windows Live network does not [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently troubleshooting an issue where Lync clients could not connect via video calls with Windows Live Messenger 2011 clients. The users could instant message each other but video calls would never connect.</p>
<p>The underlining issue for the disconnect is that Lync requires SRTP encryption by default which the Windows Live network does not support.</p>
<p>Assuming that your federation is working to the Windows Live network, we have to insure that the Lync users have Public A/V connectivity:</p>
<pre>Set-CsExternalAccessPolicy Global -EnablePublicCloudAudioVideoAccess $true</pre>
<p>&nbsp;</p>
<p>The second step is to change the Lync encryption requirement fromt required to supported. The Lync client will still try to negotiate an encrypted session first, but if that fails it will allow the unencrypted session with the Windows Live network to take place:</p>
<pre>Set-CsMediaConfiguration Global -EncryptionLevel SupportEncryption</pre>
<p>&nbsp;</p>
<p>You can also apply these commands to a specific policy that you have created. After these commands are entered on the server, wait a few minutes and then sign out and back in to the Lync client. You can verify that change has taken place by looking at the <strong>PC to PC AV Encryption</strong> in Lync (hold down CTRL and right click the tray icon and select &#8220;Configuration Information&#8221;. The setting should display &#8220;AV Encryption Supported&#8221;.<br />
<a href="http://blogs.quercussolutions.com/index.php/video-call-federation-with-microsoft-lync-to-windows-live-network/capture-2/" rel="attachment wp-att-1298"><img class="alignnone size-medium wp-image-1298" src="http://blogs.quercussolutions.com/wp-content/uploads/2012/01/Capture-300x28.png" alt="" width="300" height="28" /></a></p>
<p>If the encryption level is not changed there will be an error logged on the Front-End server when an A/V call is trying to be established:</p>
<blockquote>
<pre><strong>Start-Line: SIP/2.0 488 Not Acceptable Here</strong>
<strong>ms-client-diagnostics:</strong> 52017;reason="Encryption levels do not match"</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/video-call-federation-with-microsoft-lync-to-windows-live-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft LightSwitch – Sending Emails From the Client</title>
		<link>http://blogs.quercussolutions.com/index.php/microsoft-lightswitch-sending-emails/</link>
		<comments>http://blogs.quercussolutions.com/index.php/microsoft-lightswitch-sending-emails/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:20:25 +0000</pubDate>
		<dc:creator>paul.patterson</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[LightSwitch]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1291</guid>
		<description><![CDATA[Most of you may have already read an earlier post on how to send emails from LightSwitch (seen here). This post extends what was learned in that previous post, and shows how to wire up a button to send an email on demand.That previous post showed a specific function that would send out an email [...]]]></description>
			<content:encoded><![CDATA[<p>Most of you may have already read an earlier post on how to send emails from LightSwitch (<a title="Send Email from LightSwitch" href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-send-an-email-from-lightswitch/">seen here</a>). This post extends what was learned in that previous post, and shows how to wire up a button to send an email on demand.That <a title="Send an Email from LightSwitch" href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-send-an-email-from-lightswitch/">previous post</a> showed a specific function that would send out an email when an entity was added to the database. A helper class was created in the Server project of the LightSwitch solution. Then, when the new record was created in the database, that server code was called and an email went out. Here is how  I did that&#8230;<span id="more-1291"></span></p>
<p>The whole process was pretty simple to implement, however it was a good exercise that helped me better understand how LightSwitch separates concerns. It was this knowledge and understanding that helped me implement a solution for another email challenge.</p>
<p>The challenge I have is this; I want functionality that will let me send an email on demand, via a button on a screen, and I don’t want to code some fancy WCF service or custom extension to do the job.</p>
<p>Here is the thing – you can’t call server code from the client. It is in the server code that the email processing occurs. Why? Because the client and common projects are Silverlight based projects and I can’t add the necessary System.Net reference to those projects – otherwise I would have used the System.Net.Mail namespace directly from the client.</p>
<p>But hey, the Server project is a .Net 4 class library project, and I can add the System.Net reference to that project. That is why the actual email processing has to occur in the Server project. Following me so far?</p>
<p>So, here is what I did…</p>
<p>In the Solution Explorer of my LightSwitch project, I switched to File View so that I can get at the Server project…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/8d5e8_LSEmailFromClient001.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2898" title="LSEmailFromClient001" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/8d5e8_LSEmailFromClient001.png" alt="" width="340" height="242" /></a></p>
<p>Knowing that I need to use an external (SMTP) email service to actually send out the email, I decided to store some static information that my email processing can use to process the email; such as stuff for the email service authentication. To do this, I opened the Server project settings.</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/8b2a6_LSEmailFromClient002.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2899" title="LSEmailFromClient002" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/8b2a6_LSEmailFromClient002.png" alt="" width="333" height="225" /></a></p>
<p>Next, I added some Application scoped configuration settings…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04cbd_LSEmailFromClient003.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2900" title="LSEmailFromClient003" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04cbd_LSEmailFromClient003.png" alt="" width="564" height="382" /></a></p>
<p>…come on, you didn’t actually think that I would post my own credentials did ya…I learned from that mistake already</p>
<p>I made sure to save the updates.</p>
<p>Next, a folder is created within the Server project, and named the folder “UserCode”. Within that folder I created a new Class file and named it “EmailHelper.vb”.</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04c05_LSEmailFromClient004.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2905" title="LSEmailFromClient004" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04c05_LSEmailFromClient004.png" alt="" width="537" height="369" /></a></p>
<p>This is the code I added to this file…</p>
<pre class="brush:vb">Imports System.Net
Imports System.Net.Mail

Namespace LightSwitchApplication
    Public Class MailHelper

        Private Property SMTPServer As String = My.Settings.SMTPServer
        Private Property SMTPUserId As String = My.Settings.SMTPUserID
        Private Property SMTPPassword As String = My.Settings.SMTPPassword
        Private Property SMTPPort As Integer = My.Settings.SMTPPort

        Private Property MailFrom As String
        Private Property MailFromName As String
        Private Property MailTo As String
        Private Property MailToName As String
        Private Property MailSubject As String
        Private Property MailBody As String

        Sub New(ByVal SendFrom As String,
                ByVal SendFromName As String, _
                ByVal SendTo As String, _
                ByVal SendToName As String, _
                ByVal Subject As String, _
                ByVal Body As String)
            _MailFrom = SendFrom
            _MailFromName = SendFromName
            _MailTo = SendTo
            _MailToName = SendToName
            _MailSubject = Subject
            _MailBody = Body
        End Sub

        Public Sub SendMail()

            Dim SMTPUserAddress = New MailAddress(_SMTPUserId)

            Dim mail As New MailMessage
            Dim mailFrom As New Mail.MailAddress(_MailFrom, _MailFromName)
            Dim mailTo As New Mail.MailAddress(_MailTo, _MailToName)

            With mail
                .From = mailFrom
                .To.Add(mailTo)
                .Subject = _MailSubject
                .Body = _MailBody
            End With

            Dim smtp As New SmtpClient(_SMTPServer, _SMTPPort)
            smtp.EnableSsl = True

            smtp.Credentials = New NetworkCredential(SMTPUserAddress.Address, _SMTPPassword)
            smtp.Send(mail)
        End Sub

    End Class
End Namespace</pre>
<p>So, this class contains some pretty simple code. Instantiating the class requires a bunch of parameters that are later used by the SendMail() method. The SendMail() methid is where the mail message gets created, configured, and sent using the a SmtpClient. As you can see, some class properties are defaulted to the values that are stored in the App.Config file of the Server project (which were added earlier).</p>
<p>Next, I go back into the logical view of the solution.</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04c05_LSEmailFromClient005.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2902" title="LSEmailFromClient005" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/04c05_LSEmailFromClient005.png" alt="" width="338" height="114" /></a></p>
<p>In the logical view, a new table is created. The table name is “ProxyEmail”, and it looks like this…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/91850_LSEmailFromClient006.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2903" title="LSEmailFromClient006" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/91850_LSEmailFromClient006.png" alt="" width="498" height="326" /></a></p>
<p>Now, with this table, I have essentially created a “Model” that I can use in my workaround. Remember, my challenge is to do all this with native LightSwitch features and functionality. I don’t want to create a fancy-smancy WCF service or custom extension for this. I just want to get the job done. By creating this entity, I have, in essence, created a business object that I am going to use to do what I want to do.</p>
<p>Here is the fun part! I can’t call the Server code directly from any screens, however I know that my “entity” can access the server code via its dependencies. For example, my ProxyEmail entity has a method called ProxyEmails_Inserted(), which runs on the server when an entity as added to the table (add to the collection of ProxyEmail entities).</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/91850_LSEmailFromClient007.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2906" title="LSEmailFromClient007" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/91850_LSEmailFromClient007.png" alt="" width="491" height="281" /></a></p>
<p>So, I add some code to this method…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/4bddd_LSEmailFromClient008.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2907" title="LSEmailFromClient008" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/4bddd_LSEmailFromClient008.png" alt="" width="583" height="362" /></a></p>
<p>…and here is the code if you want…</p>
<pre class="brush:vb"> Private Sub ProxyEmails_Inserted(entity As ProxyEmail)
            ' Write your code here.
            Dim sSubject = "Test Email."
            Dim carRtn = Environment.NewLine  Environment.NewLine

            Dim sMessage = "The following email has come from a button on LightSwitch..."  carRtn
            sMessage += "Testing 1, 2, 3!!"

            ' Create the MailHelper class created in the Server project.
            Dim mailHelper As New MailHelper(entity.SenderEmailAddress, _
                                             entity.RecipientName, _
                                             entity.RecipientEmailAddress, _
                                             entity.RecipientName, _
                                             sSubject, _
                                             sMessage)

            ' Let 'er rip!
            mailHelper.SendMail()
        End Sub</pre>
<p>So, this is pretty much the same as the last post. Right, but here is how this similar stuff is used to create a feature that will allow you to send an email on demand, rather than relying only on updates to entities.</p>
<p>I create a new Screen and, using the New Data Screen template, name it “SendAnEmail”, but don’t assign any screen data to it…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/eac04_LSEmailFromClient009.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2908" title="LSEmailFromClient009" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/eac04_LSEmailFromClient009.png" alt="" width="480" height="342" /></a></p>
<p>In the screen designer for the new SendAnEmail screen, I click Add Data Item… and create a Method with a name of “SendMyEmailOnDemand”…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/ef88d_LSEmailFromClient010.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2909" title="LSEmailFromClient010" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/ef88d_LSEmailFromClient010.png" alt="" width="479" height="353" /></a></p>
<p>Back in the screen designer, I expand the Screen Command Bar, and drag and drop the SendMyEmailOnCommand method to the command bar.</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/10955_LSEmailFromClient011.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2910" title="LSEmailFromClient011" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/10955_LSEmailFromClient011.png" alt="" width="570" height="346" /></a></p>
<p>I right click the newly added button, and select to Edit Execute Code.</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/794f3_LSEmailFromClient012.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2911" title="LSEmailFromClient012" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/794f3_LSEmailFromClient012.png" alt="" width="605" height="350" /></a></p>
<p>I edit the method to this…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/eed62_LSEmailFromClient013.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2912" title="LSEmailFromClient013" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/eed62_LSEmailFromClient013.png" alt="" width="534" height="353" /></a></p>
<p>…and here is the actual code you can use…</p>
<pre class="brush:vb">        Private Sub SendEmailOnCommand_Execute()
            Dim newEmail = DataWorkspace.ApplicationData.ProxyEmails.AddNew()
            With newEmail
                .RecipientEmailAddress = "paulspatterson@hotmail.com"
                .RecipientName = "Paul Patterson"
                .SenderEmailAddress = "paul@selectsystems.ca"
                .SenderName = "Paul Patterson (Select Systems)"
            End With

            DataWorkspace.ApplicationData.SaveChanges()
            newEmail.Delete()
            DataWorkspace.ApplicationData.SaveChanges()
        End Sub</pre>
<p>What this is doing is simply creating a new ProxyEmail entity, settings it’s properties, the committing the insert to the system. The SaveChanges after the setting the properties will cause the ProxyEmails collection to fire that ProxyEmails_Inserted() method that was wired up earlier, which then sends the email from the server code. After that, the newly added entity is deleted because I don’t need it any more.</p>
<p>So, I F5 to test it…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/a288d_LSEmailFromClient014.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2913" title="LSEmailFromClient014" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/a288d_LSEmailFromClient014.png" alt="" width="529" height="250" /></a></p>
<p>… and I click the Send Email On Demand button. Then I go and check my email, and presto…</p>
<p><a href="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/a288d_LSEmailFromClient015.png" rel="slb_group[2896] slb slb_internal"><img class="aligncenter size-full wp-image-2914" title="LSEmailFromClient015" src="http://blogs.quercussolutions.com/wp-content/plugins/rss-poster/cache/a288d_LSEmailFromClient015.png" alt="" width="471" height="325" /></a></p>
<p>Yes!</p>
<p>This may not be the super cool software code monkey way of doing things, but who cares! It does the job, and I did in no time at all.</p>
<p>Hope you find it useful!</p>
<p>Cheers</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Article source: <a href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-sending-emails-from-the-client/">http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-sending-emails-from-the-client/</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/microsoft-lightswitch-sending-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using InfoPath and Workflows to Computerise the Employees Assessment Process</title>
		<link>http://blogs.quercussolutions.com/index.php/using-infopath-and-workflows-to-computerise-the-employees-assessment-process/</link>
		<comments>http://blogs.quercussolutions.com/index.php/using-infopath-and-workflows-to-computerise-the-employees-assessment-process/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 16:33:41 +0000</pubDate>
		<dc:creator>mohamedr</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Infopath Forms]]></category>
		<category><![CDATA[SharePoint 2010 Workflows]]></category>
		<category><![CDATA[SharePoint Designer]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1184</guid>
		<description><![CDATA[Part 1: The Problem Employees periodic assessment is an important and tedious repetitive process for the HR department. As a leader in Software Development, Quercus Solutions decided to computerise its employees assessment process. I was charged with implementing a simple, affordable, and extensible solution using a non code InfoPath Form and a declarative SharePoint Designer [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><strong><span style="text-decoration: underline;">Part 1: The Problem</span></strong></p>
<p>Employees periodic assessment is an important and tedious repetitive process for the HR department. As a leader in Software Development, Quercus Solutions decided to computerise its employees assessment process. I was charged with implementing a simple, affordable, and extensible solution using a non code InfoPath Form and a declarative SharePoint Designer 2010 Workflow.</p>
<p><strong>Process Description and Security Constraints</strong></p>
<p>Quercus Employees assessment process involves four parties, the employee himself, his coach, the HR department, and the company manager. One big concern is to keep the assessment data completely private and secure.</p>
<p> <span id="more-1184"></span></p>
<p>The assessment  process consists of multiple stages.  The following flowchart shows these stages.</p>
<p>&nbsp;</p>
<div id="attachment_1239" class="wp-caption aligncenter" style="width: 654px"><img class="size-full wp-image-1239" src="http://blogs.quercussolutions.com/wp-content/uploads/2012/01/Assessment.jpg" alt="Assessment Process" width="644" height="273" /><p class="wp-caption-text">Assessment Process</p></div>
<div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl>
<dt> </dt>
</dl>
</div>
</div>
<p>To start an assessment, the HR manager should create a new assessment Form. He/she, then, fills a view of the  form that includes some basic parameters such as: employee name, coach name, etc. We plan, in a future release,  to automate this step using a SharePoint employees External List and a Timer Job. When a Form is created, no body Should be given access to it, except the HR Manager.</p>
<p>The second stage starts when the HR manager decides that the process of assessment is ready to go. At this moment an alert is sent  to the coach. It should give him a link to the assessment Form that he should fill. As a part of filling the assessment form, he should decide about a meeting date with the employee to discuss the assessment.</p>
<p>At this second stage,  the coach should be the only person that have write access to the Form. The HR and the company manager should only have read access. Neither the employee himself, nor any other person should be able to access the Form at all.</p>
<p>The third stage starts when the coach signals that he is finished with the assessment. The coach can edit and modify the assessment as many times as he wishes, however, he can&#8217;t modify it once he marks it as ready for the next stage.  An alert is, then, sent to the employee to ask him to revise the assessment and to inform him of the meeting date.  The body of the alert should include a link to the assessment Form. The employee should  be able to navigate to the Form and read his coach assessment. He can enter his comments and specify his future goals for the next period.</p>
<p>While doing so, the employee should not have any write access to the part of the Form containing his coach assessment. However, he should have write access to the part of the Form including his comments and his goals. Any other involved party, even the coach, should have, only, read access to the Form. You may wonder why we don&#8217;t permit the coach to modify his assessment? This is because we don&#8217;t want him to change the Form while the employee is viewing it. Any other person except those involved in the process should not be capable of accessing the Form by any means. In particular, he or she must not have the permission to download the form to his/here computer and open it with an XML editor</p>
<p>The fourth and final stage starts after the employee completes his review. In this stage the coach and the employee meet  together  to discuss the assessment. The coach should be able to change his assessment in case he have new evidence resulting from the meeting. He, also,  should  be able to terminate the assessment process. No other party could be able to modify the Form. Non involved parties, should not, even, be able to access the Form.</p>
<p>Once the coach marks the assessment as completed, no other person except the HR manager and the company manager could  be able to access the Form. This is true even for the coach and the employee.</p>
<p><strong>Outlines of the Solution</strong></p>
<p>The solution is based upon a non code InfoPath Form published to a SharePoint InfoPath Form Library. The Form is accessed with InfoPath  client filler; i.e., the form is not web enabled. The design justification of this choice is the  need to use InfoPath User Rules combined with InfoPath  Views to control access to the different parts of the form. As User Rules are not supported in InfoPath web Forms, we  excluded it in the first implementation. The other rational is that all Quercus employees have InfoPath filler installed on their computer. At the end of this article I will devote a section on how to use InfoPath Web Forms instead of InfoPath filler.</p>
<p>The solution uses also a declarative workflow developed with SharePoint Designer 2010 to alert the involved parties and control the  process flow. It also sets SharePoint items permissions on the Form Library using a workflow Impersonation Step.</p>
<p>In Part 2 of this article I will explain the implementation in details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/using-infopath-and-workflows-to-computerise-the-employees-assessment-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIIM State of SharePoint in 2011</title>
		<link>http://blogs.quercussolutions.com/index.php/aiim-state-of-sharepoint-in-2011/</link>
		<comments>http://blogs.quercussolutions.com/index.php/aiim-state-of-sharepoint-in-2011/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 19:24:44 +0000</pubDate>
		<dc:creator>mohamedr</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Adoption]]></category>
		<category><![CDATA[SharePoint Governance]]></category>

		<guid isPermaLink="false">http://blogs.quercussolutions.com/?p=1127</guid>
		<description><![CDATA[The Association for Information and Image Management AIIM recently published  the results of their survey regarding the State of the ECM Industry in 2011. I will summarize here some of the findings concerning SharePoint. About the Survey  The survey covers 650 individual members of the AIIM community between January 28,2011, and February 14, 2011. Survey [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: x-small;"><span style="font-family: Verdana;">The Association for Information and Image Management AIIM recently published  the results of their survey regarding the State of the ECM Industry in 2011. I will summarize here some of the findings concerning SharePoint.</span></span></p>
<p><span style="font-size: x-small;"><span style="font-family: Verdana;">About the Survey</span></span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-size: x-small;"><span style="font-family: Verdana;">The survey covers 650 individual members of the AIIM community between January 28,</span></span><span style="font-size: x-small;"><span style="font-family: Verdana;">2011, and February 14, 2011. Survey Participants represent organizations of all sizes. Larger organizations over 5,000 employees represent 35%, with mid-sized organizations of 500 to 5,000 employees at 41%. Small-to-mid sized organizations with 10 to 500 employees constitute 24%. Organizations of less than 10 employees (26) are not included in the report.</span></span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-size: x-small;"><span style="font-family: Verdana;">The findings concerning SharePoint are classified in three headings;<span id="more-1127"></span> Adoption, Maturity and Governance, and Strategies.</span></span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-size: x-small;"><span style="font-family: Verdana;">Adoption</span></span></p>
<ul>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">58% of respondents are already using SharePoint, rising to 70% of the largest organizations.</span></span></li>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">SharePoint 2010 version has attracted 13% of respondents as first time SharePoint users</span></span></li>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">Only 20%  have no interest in SharePoint.<br />
</span></span></li>
</ul>
<p><span style="font-size: x-small;"><span style="font-family: Verdana;">Maturity and Governance</span></span></p>
<ul>
<li>  <span style="font-size: x-small;"><span style="font-family: Verdana;">27% admit that valuable content is being stored in SharePoint across the organization but there is no real guidance on what/how to store .</span></span></li>
<li>  1<span style="font-size: x-small;"><span style="font-family: Verdana;">8% have stable and well-governed systems.</span></span></li>
<li>  <span style="font-size: x-small;"><span style="font-family: Verdana;">only 5% of users would consider their SharePoint implementation to be fully optimized and integrated with other applications and repositories.</span></span></li>
</ul>
<p><span style="font-size: x-small;"><span style="font-family: Verdana;">Strategies</span></span></p>
<ul>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">11% of respondents have SharePoint as first document or content management suite. </span></span></li>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">49% are planning to integrate SharePoint with their existing &#8211; or new &#8211; ECM or records management suites.</span></span></li>
<li><span style="font-size: x-small;"><span style="font-family: Verdana;">24%  have not yet formulated any plans to integrate SharePoint with their existing </span>ECM/DM/RM systems</span></li>
<li><span style="font-size: x-small;"><span style="font-size: x-small;"><span style="font-family: Verdana;">4% are phasing out existing systems in favour of SharePoint</span></span></span></li>
</ul>
<p><span style="font-family: Verdana; font-size: x-small;">For a full version of the report go to </span><a href="http://www.aiim.org/"><span style="color: #0000ff; font-family: Verdana; font-size: x-small;">http://www.aiim.org/</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.quercussolutions.com/index.php/aiim-state-of-sharepoint-in-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

