<?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>Tallan&#039;s Technology Blog &#187; Craig Vallee</title>
	<atom:link href="http://blog.tallan.com/author/cvallee/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tallan.com</link>
	<description>Tallan&#039;s Top Technologists Share Their Thoughts on Today&#039;s Technology Challenges</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:15:46 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Modularizing .NET Training Part 1</title>
		<link>http://blog.tallan.com/2010/11/18/modularizing-net-training-part-1/</link>
		<comments>http://blog.tallan.com/2010/11/18/modularizing-net-training-part-1/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 14:21:55 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.tallan.com/2010/11/18/modularizing-net-training-part-1/</guid>
		<description><![CDATA[A challenge we have at Tallan is keeping our training up-to-date with the latest and greatest of technologies. We are constantly re-evaluating our lessons to keep up with ever changing technologies. In recent months, we have seen a shift in our client work from using traditional ASP.NET to using ASP.NET MVC 2. This has challenged [...]]]></description>
			<content:encoded><![CDATA[<p>A challenge we have at Tallan is keeping our training up-to-date with the latest and greatest of technologies. We are constantly re-evaluating our lessons to keep up with ever changing technologies. In recent months, we have seen a shift in our client work from using traditional ASP.NET to using ASP.NET MVC 2. This has challenged our .NET developers to learn and create MVC best practices and ensure high quality deliverables. As you may know, MVC to a .NET developer can take time to understand and learn.</p>
<p>As an organization, we approach training from a mentor/mentee concept. This allows our trainees to have a dedicated training partner to guide him/her through the module and it allows for the mentor to learn communication and management skills. We have begun reviewing our training process, in particular our .Net training modules. With this in mind we have started reviewing various methods for enhancement, with our focus on building off our present .NET training, which is still very effective. This current module includes basic .NET concepts, with the main focus on building a simple ASP.NET web application, teaching code-behinds, page life-cycle, and ASP controls. </p>
<p>In order to incorporate ASP.NET MVC 2 into our training, we are expanding on the base module with a new sub-module. This will allow the trainee to focus on the new technology without having to rewrite any existing business logic or data access logic. We believe this will be very effective in that it will allow the trainee to worry less about the business rules and emphasize the benefits of using the technology.</p>
<p>We also see further benefits in completing a separate component module will allow for more explicit examples to be completed since the trainee will not be merely scratching the surface of the concept in an add-on task of the original base module. Additionally, we can gear this not only towards trainees, but to seasoned .NET developers who need a solid introduction to new concepts.</p>
<p>In the following postings you will find how this methodology can be beneficial as we will go through an in depth example of completing certain components of the base module, then completing the MVC module and highlighting the differences between the two.</p>
<p>Topics to be covered in the next post: </p>
<p>ASP.NET Arch. VS MVC Architecture<a name="_GoBack"></a></p>
<p>ASP.NET Practices VS MVC Practices </p>
<p>-Craig and Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2010/11/18/modularizing-net-training-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Atalasoft DotImage to create blank Tiff image</title>
		<link>http://blog.tallan.com/2010/08/24/using-atalasoft-dotimage-to-create-blank-tiff-image-2/</link>
		<comments>http://blog.tallan.com/2010/08/24/using-atalasoft-dotimage-to-create-blank-tiff-image-2/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 13:56:34 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Atalasoft]]></category>

		<guid isPermaLink="false">http://blog.tallan.com/?p=637</guid>
		<description><![CDATA[Atalasoft DotImage is a great library for working with all kinds of images. I recently had the need for a Tiff image which met the following specification:
300 x 300 dpi
Print at regular letter size (8 1/2 x 11)
Encoded using Group 4 compression
I created this Tiff file using only the following 5 lines of code:

AtalaImage atalaImage [...]]]></description>
			<content:encoded><![CDATA[<p>Atalasoft DotImage is a great library for working with all kinds of images. I recently had the need for a Tiff image which met the following specification:</p>
<li>300 x 300 dpi</li>
<li>Print at regular letter size (8 1/2 x 11)</li>
<li>Encoded using Group 4 compression</li>
<p>I created this Tiff file using only the following 5 lines of code:</p>
<pre class="brush: csharp;">
AtalaImage atalaImage = new AtalaImage(2550, 3263, PixelFormat.Pixel1bppIndexed);
atalaImage.Resolution = new Dpi(300, 300, ResolutionUnit.DotsPerInch);
TiffDocument testDoc = new TiffDocument();
testDoc.Pages.Add(new TiffPage(atalaImage, TiffCompression.Group4FaxEncoding));
testDoc.Save(YOUR_LOCATION);
</pre>
<p>Prior to using this code I had simply scanned a blank sheet. I quickly realized this was not a good alternative due to inconsistencies with the scanner bed. Using this simple code I created a perfect Tiff.</p>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2010/08/24/using-atalasoft-dotimage-to-create-blank-tiff-image-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning WPF</title>
		<link>http://blog.tallan.com/2010/07/01/learning-wpf/</link>
		<comments>http://blog.tallan.com/2010/07/01/learning-wpf/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 01:47:30 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.tallan.com/?p=499</guid>
		<description><![CDATA[As a .net developer that has recently spent over a year helping to design and build a SCSF winforms application, I have been looking to branch out into different techniques and technologies to improve my skill set.  With Visual Studio 2010 coming out, the latest support for WPF and a push, by Microsoft, toward its [...]]]></description>
			<content:encoded><![CDATA[<p>As a .net developer that has recently spent over a year helping to design and build a SCSF winforms application, I have been looking to branch out into different techniques and technologies to improve my skill set.  With Visual Studio 2010 coming out, the latest support for WPF and a push, by Microsoft, toward its advancement in the development community, I am intrigued to say the least to check it out. I do not consider myself a UI designer, and lack the artistic skills to become one, so learning WPF seems like a daunting task.<br />
I did find the following website to help with my desire to learn WPF: <a href="http://www.wpftutorial.net/">www.wpftutorial.net</a>. There is a great Getting Started section which will get you on your way to understanding the basics.  From learning XAML and basic MVVM concepts, the tutorial is presented in an easy-to-understand format.  There is also plenty of information that advanced users may find useful.<br />
Stay tuned for additional info as I learn WPF.</p>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2010/07/01/learning-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handle asp.net MVC session expiration</title>
		<link>http://blog.tallan.com/2010/06/25/handle-asp-net-mvc-session-expiration/</link>
		<comments>http://blog.tallan.com/2010/06/25/handle-asp-net-mvc-session-expiration/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 02:26:47 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>

		<guid isPermaLink="false">http://blog.tallan.com/2010/06/25/handle-asp-net-mvc-session-expiration/</guid>
		<description><![CDATA[Here is a really simple way to handle a session expiration in asp.net MVC using a base controller.  Having all controller inherit from a basecontoller and overriding the OnActionExecuting event allows for checking the session before all actions are executed.
Here is the code

public class BaseController : Controller

{

    protected override void OnActionExecuting

  [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a really simple way to handle a session expiration in asp.net MVC using a base controller.  Having all controller inherit from a basecontoller and overriding the OnActionExecuting event allows for checking the session before all actions are executed.</p>
<p>Here is the code</p>
<pre style="border: 1px solid #cecece;width: 650px;overflow: auto;background-color: #fbfbfb;padding: 5px">
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> BaseController : Controller
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">{
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">    <span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> OnActionExecuting
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        (ActionExecutingContext filterContext)
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">    {
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        <span style="color: #008000">// If session exists</span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        <span style="color: #0000ff">if</span> (filterContext.HttpContext.Session != <span style="color: #0000ff">null</span>)
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        {
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">            <span style="color: #008000">//if new session</span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">            <span style="color: #0000ff">if</span> (filterContext.HttpContext.Session.IsNewSession)
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">            {
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                <span style="color: #0000ff">string</span> cookie =
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    filterContext.HttpContext.Request.Headers["<span style="color: #8b0000">Cookie</span>"];
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                <span style="color: #008000">//if cookie exists and sessionid index is greater than zero</span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                <span style="color: #0000ff">if</span> ((cookie !=<span style="color: #0000ff">null</span>) &amp;&amp;
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    (cookie.IndexOf("<span style="color: #8b0000">ASP.NET_SessionId</span>") &gt;= 0))
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                {
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    <span style="color: #008000">//redirect to desired session </span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    <span style="color: #008000">//expiration action and controller</span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    filterContext.Result =
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                        RedirectToAction("<span style="color: #8b0000">SessionExpired</span>", "<span style="color: #8b0000">Home</span>");
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                    <span style="color: #0000ff">return</span>;
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">                }
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">            }
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        }
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        <span style="color: #008000">//otherwise continue with action</span>
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">        <span style="color: #0000ff">base</span>.OnActionExecuting(filterContext);
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">    }
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">}
</pre>
<pre style="background-color: #fbfbfb;font-family: consolas,'Courier New',courier,monospace;font-size: 12px;width: 100%;margin: 0em">}
</pre>
</pre>
<p>This simple but effective method ensures that no actions will be executed if the session has expired forcing the user to login again</p>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2010/06/25/handle-asp-net-mvc-session-expiration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Transform System.Drawing.ContentAlignment property to System.Drawing. StringFormat Alignment property</title>
		<link>http://blog.tallan.com/2009/12/31/transform-systemdrawingcontentalignment-property-to-systemdrawing-stringformat-alignment-property/</link>
		<comments>http://blog.tallan.com/2009/12/31/transform-systemdrawingcontentalignment-property-to-systemdrawing-stringformat-alignment-property/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 20:10:19 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/2009/12/31/transform-systemdrawingcontentalignment-property-to-systemdrawing-stringformat-alignment-property/</guid>
		<description><![CDATA[
Recently we had the need to transform System.Drawing.ContentAlignment property to System.Drawing. Stringformat alignment property for creating a Graphic object with text drawn on it inside a given rectangle.  Assuming that you want the text printed from left to right, you can use the ContentAlignment Enum values to obtain the desired StringAlignment Enum value.  For example:


 [...]]]></description>
			<content:encoded><![CDATA[<div id="codeSnippetWrapper">
<div id="codeSnippet" class="csharpcode">Recently we had the need to transform System.Drawing.ContentAlignment property to System.Drawing. Stringformat alignment property for creating a Graphic object with text drawn on it inside a given rectangle.  Assuming that you want the text printed from left to right, you can use the ContentAlignment Enum values to obtain the desired StringAlignment Enum value.  For example:</div>
<div id="codeSnippetWrapper">
<div id="codeSnippet" class="csharpcode">
<pre><span class="lnum">   1:</span> <span class="kwrd">public</span> StringFormat TransformProperty(ContentAlignment alignment)
<!--CRLF-->
<span class="lnum">   2:</span>         {
<!--CRLF-->
<span class="lnum">   3:</span>             StringFormat myStringFromat  = <span class="kwrd">new</span> StringFormat();
<!--CRLF-->
<span class="lnum">   4:</span>             <span class="kwrd">switch</span>(alignment)
<!--CRLF-->
<span class="lnum">   5:</span>             {
<!--CRLF-->
<span class="lnum">   6:</span>                 <span class="kwrd">case</span> ContentAlignment.MiddleLeft:
<!--CRLF-->
<span class="lnum">   7:</span>                     myStringFromat.Alignment = StringAlignment.Near;
<!--CRLF-->
<span class="lnum">   8:</span>                     <span class="kwrd">break</span>;
<!--CRLF-->
<span class="lnum">   9:</span>                 <span class="kwrd">case</span> ContentAlignment.MiddleRight:
<!--CRLF-->
<span class="lnum">  10:</span>                     myStringFromat.Alignment = StringAlignment.Far;
<!--CRLF-->
<span class="lnum">  11:</span>                     <span class="kwrd">break</span>;
<!--CRLF-->
<span class="lnum">  12:</span>                 <span class="kwrd">default</span>:
<!--CRLF-->
<span class="lnum">  13:</span>                     myStringFromat.Alignment = StringAlignment.Center;
<!--CRLF-->
<span class="lnum">  14:</span>                     <span class="kwrd">break</span>;
<!--CRLF-->
<span class="lnum">  15:</span>             }
<!--CRLF-->
<span class="lnum">  16:</span>             <span class="kwrd">return</span> myStringFromat;
<!--CRLF-->
<span class="lnum">  17:</span>         }
</pre>
<p>Craig<br />
<!--CRLF--></div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/12/31/transform-systemdrawingcontentalignment-property-to-systemdrawing-stringformat-alignment-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding SQLite to a Windows Mobile Application</title>
		<link>http://blog.tallan.com/2009/12/31/adding-sqlite-to-a-windows-mobile-application/</link>
		<comments>http://blog.tallan.com/2009/12/31/adding-sqlite-to-a-windows-mobile-application/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:10:56 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/2009/12/31/adding-sqlite-to-a-windows-mobile-application/</guid>
		<description><![CDATA[Using SQLite in a Windows Mobile Application provides a simple way to add pre-populated data for consumption by the application.&#160; There are a couple of configuration considerations when adding the database to the project.
1. Adding reference to SQLite.dll. After installing SQLite there will be a Compact Framework folder in the following path :C:\ProgramFiles\SQLite.NET\bin.&#160; This folder [...]]]></description>
			<content:encoded><![CDATA[<p>Using SQLite in a Windows Mobile Application provides a simple way to add pre-populated data for consumption by the application.&#160; There are a couple of configuration considerations when adding the database to the project.</p>
<p>1. Adding reference to SQLite.dll. After installing SQLite there will be a Compact Framework folder in the following path :C:\ProgramFiles\SQLite.NET\bin.&#160; This folder contains the System.Data.SQLite.dll that needs to be referenced.</p>
<p>2 The same path will also contain the dll which Windows Mobile will need to invoke the methods contained in the SQLite.dll.&#160; The following file needs to be added to the project which contains the main executable,&#160; SQLite.Interop.065.DLL.</p>
<p>Once the interop dll is in the project you can start using SQLite in the Mobile Application just as you would for any other application.</p>
<p>Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/12/31/adding-sqlite-to-a-windows-mobile-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WCF Exception Shielding Error</title>
		<link>http://blog.tallan.com/2009/07/01/wcf-exception-shielding-error/</link>
		<comments>http://blog.tallan.com/2009/07/01/wcf-exception-shielding-error/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:47:14 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/2009/07/01/wcf-exception-shielding-error/</guid>
		<description><![CDATA[While using the WCF Exception Shielding policy in Enterprise Library’s Exception Handler Block to shield exceptions and return Fault Contracts I came across an error. I named the shielding policy “WCF Shielding Policy” and implemented a FaultContract for each type of desired or expected exception.
While testing the policy, we were unable to return a proper [...]]]></description>
			<content:encoded><![CDATA[<p>While using the WCF Exception Shielding policy in Enterprise Library’s Exception Handler Block to shield exceptions and return Fault Contracts I came across an error. I named the shielding policy “WCF Shielding Policy” and implemented a FaultContract for each type of desired or expected exception.</p>
<p>While testing the policy, we were unable to return a proper FaultContract from the WCF Service.  The only error that we received was the generic Communication Error:</p>
<pre>System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to (path of service).
 This could be due to the service endpoint binding not using the HTTP protocol.
This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down).
See server logs for more details. ---&gt;  System.Net.WebException: The underlying connection was closed:
An unexpected error occurred on a receive.
  System.IO.IOException: Unable to read data from the transport connection: An existing connection was
forcibly closed by the remote host.
 System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.</pre>
<p>This error is incredibly deceiving and led to many dead ends while trying to track down the root cause of the error. I re-wrote the app.config file and removed and re-added the service references, all to no avail.</p>
<p>The cause of the problem was simply in the name of the policy. If you don’t name your shielding policy “WCF Exception Shielding” verbatim then the policy will not be found and the error above will be thrown.  If you do name your policy something different or you implement different policies for different types of exceptions then you have to explicitly state in the ExceptionShielding attribute the name of the policy as follows:</p>
<pre>C#:[ExceptionShielding("MyPolicy")]
VB: &lt;ExceptionShielding ("MyPolicy")&gt;</pre>
<p>I renamed the policy to the default name and started receiving the Fault Contracts as expected.</p>
<p>Hope this helps eliminate some headaches for someone.</p>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/07/01/wcf-exception-shielding-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spring and Functional Tests</title>
		<link>http://blog.tallan.com/2009/06/22/spring-and-functional-tests/</link>
		<comments>http://blog.tallan.com/2009/06/22/spring-and-functional-tests/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:44:54 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/2009/06/22/spring-and-functional-tests/</guid>
		<description><![CDATA[Recently on our project we created a “functional” unit test for some services. The test was designed to check the entire call stack from the service layer to the DAO and return some expected results. We are using Spring for dependency injection through our entire application. This functional test initially only referenced the service DLL’s [...]]]></description>
			<content:encoded><![CDATA[<p>Recently on our project we created a “functional” unit test for some services. The test was designed to check the entire call stack from the service layer to the DAO and return some expected results. We are using Spring for dependency injection through our entire application. This functional test initially only referenced the service DLL’s as this is all we thought that had to be referenced.&#160; Upon execution, the test was failing due to “null or empty Context”. We knew that we had referenced the context in the configuration file correctly, but were perplexed at how the spring context were not loading.</p>
<p>We finally realized that it was an issue with Resharper and how the tests were executed differently then when run is Visual Studio using default run (ctrl + r, t)</p>
<p>Once this was solved, we were getting reference exceptions.</p>
<p>To solve this error, it is necessary to reference in your test project all of the DLL’s that are referenced in your Spring xml file. It will not work unless you do so.</p>
<p>-Craig </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/06/22/spring-and-functional-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Multi-page image to Collection of Bitmaps</title>
		<link>http://blog.tallan.com/2009/06/13/convert-multi-page-image-to-collection-of-bitmaps/</link>
		<comments>http://blog.tallan.com/2009/06/13/convert-multi-page-image-to-collection-of-bitmaps/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 13:05:39 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/2009/06/13/convert-multi-page-image-to-collection-of-bitmaps/</guid>
		<description><![CDATA[Recently on a project, we had the need to convert a saved multi-page tiff to a collection of bitmaps for viewing in a UI using standard GDI+ methods. These bitmaps also needed to be printed in a high quality way for submission to a government agency.&#160; This method ensures that no quality will be lost [...]]]></description>
			<content:encoded><![CDATA[<p>Recently on a project, we had the need to convert a saved multi-page tiff to a collection of bitmaps for viewing in a UI using standard GDI+ methods. These bitmaps also needed to be printed in a high quality way for submission to a government agency.&#160; This method ensures that no quality will be lost from the creation of the new bitmap objects.</p>
<pre><span class="rem">/////////////////////////////////////////</span>
<span class="rem">// by Craig Vallee</span>
<span class="rem">// Consultant</span>
<span class="rem">// Tallan, Inc.</span>
<span class="rem">/////////////////////////////////////////</span>

<span class="kwrd">private</span> <span class="kwrd">static</span> List&lt;Bitmap&gt; ImageToBitmap()
{
    <span class="rem">//Create and Image object from file path and name</span>
    Image originalImage = Image.FromFile(<span class="str">@&quot;C:\Temp\Your_File.tif&quot;</span>);

    <span class="rem">//Create a collection of Bitmap objects </span>
    List&lt;Bitmap&gt; bitmapList = <span class="kwrd">new</span> List&lt;Bitmap&gt;();

    <span class="rem">//Place holders for setting resolution of new Bitmap objects</span>
    var xResolution = originalImage.HorizontalResolution;
    var yResolution = originalImage.VerticalResolution;

    <span class="rem">//Create FrameDimesion for iteration through file frames</span>
    FrameDimension frameDimension = <span class="kwrd">new</span> FrameDimension(originalImage.FrameDimensionsList[0]);

    <span class="rem">//Framecount of image for iteration through file frames</span>
    <span class="kwrd">int</span> frameCount = originalImage.GetFrameCount(FrameDimension.Page);

    <span class="rem">//Simple iteration through file frames</span>
    <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; frameCount; ++i)
    {
        <span class="rem">//Create bitmap to hold individual frame</span>
        Bitmap bmp;

        <span class="rem">//Moves active frame pointer to next frame in iteration</span>
        originalImage.SelectActiveFrame(frameDimension, i);

        <span class="rem">//Cast image frame to Bitamp holder</span>
        bmp = (Bitmap)originalImage;

        <span class="rem">//Create new Bitmap from placeholder</span>
        Bitmap temp = <span class="kwrd">new</span> Bitmap(bmp);

        <span class="rem">//Set bitmap resolution based on original resolution</span>
        temp.SetResolution(xResolution, yResolution);

        <span class="rem">//Add Bitmap to Bitmap collection</span>
        bitmapList.Add(temp);
    }
    <span class="kwrd">return</span> bitmapList;

}</pre>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/06/13/convert-multi-page-image-to-collection-of-bitmaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitmap Default resolution</title>
		<link>http://blog.tallan.com/2009/06/07/bitmap-default-resolution/</link>
		<comments>http://blog.tallan.com/2009/06/07/bitmap-default-resolution/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 12:24:08 +0000</pubDate>
		<dc:creator>Craig Vallee</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/?p=155</guid>
		<description><![CDATA[Recently I encountered a problem regarding default resolution for Images. An image that had been stored in a database as a multi-page tiff needed to be split into individual bitmaps for display and print on a winform using standard GDI+. While spliting the tiffs and creating the new bitmaps, the resolution was lost and was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I encountered a problem regarding default resolution for Images. An image that had been stored in a database as a multi-page tiff needed to be split into individual bitmaps for display and print on a winform using standard GDI+. While spliting the tiffs and creating the new bitmaps, the resolution was lost and was set to the default value of Bitmaps. While the display on the winform was not a problem as the viewer handled the image sizing, the printing of the image resulted in a very distorted printed image.</p>
<p>Upon examination of the image, the resolution was 300 x 300. Upon creation of the bitmap it defaulted to 72 x 72.</p>
<p>This problem was quickly resolved by setting the resolution of all of the new  bitmaps  to the original resolution contained in the image object.</p>
<p>Seems like a simple fix, but it created a huge problem on the project.</p>
<p>-Craig</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/06/07/bitmap-default-resolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

