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

<channel>
	<title>Leo Wang's Blog</title>
	<atom:link href="http://lwang00.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lwang00.wordpress.com</link>
	<description>work smarter not harder</description>
	<lastBuildDate>Sun, 24 Apr 2011 03:55:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lwang00.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Leo Wang's Blog</title>
		<link>http://lwang00.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lwang00.wordpress.com/osd.xml" title="Leo Wang&#039;s Blog" />
	<atom:link rel='hub' href='http://lwang00.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Debug BizTalk Orchestration in Production Server</title>
		<link>http://lwang00.wordpress.com/2008/04/14/debug-biztalk-orchestration-in-production-server/</link>
		<comments>http://lwang00.wordpress.com/2008/04/14/debug-biztalk-orchestration-in-production-server/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 03:55:28 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2008/04/14/debug-biztalk-orchestration-in-production-server/</guid>
		<description><![CDATA[Murphy&#8217;s Law: if anything can go wrong, it will. If BizTalk orchestration instance in a production server does not behavior as you expect it, how do you diagnose the problem? Remember, attaching debugger to an orchestration instance is usually impossible in this case. DebugView is one of my favorite tools for troubleshooting issues in production [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=242&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Murphy&#8217;s Law: if anything can go wrong, it will.  If BizTalk orchestration instance in a production server does not behavior as you expect it, how do you diagnose the problem?  Remember, attaching debugger to an orchestration instance is usually impossible in this case.
</p>
<p>DebugView is  one of my favorite tools for troubleshooting issues in production environment. For many years, I have used it to debug Visual C++, Visual Basic, C#,  ASP and ASP.Net web applications.  No exceptions, I use it for BizTalk orchestration debug too. The System.Diagnostics.Trace.WriteLine method can be used to output string. Under the hood,  it will call Win 32 OutputDebugString method.  If DebugView is not enabled, there is no performance penalty.  However,   this method will hurt performance if you launch DebugView.  In case you don&#8217;t have this tool,  you can download free one <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx">here</a>.
</p>
<p>Alternatively, the System.Diagnostics.EventLog.WriteEntry method is extremely useful to log trace information.  For example,  you can insert an Expression shape  into your orchestration, then specify Expression.
</p>
<p><img src="http://lwang00.files.wordpress.com/2008/04/041408-0354-debugbiztal1.png?w=500">
	</p>
<p><em>System.Diagnostics.EventLog.WriteEntry(&#8220;My BizTalk Application&#8221;, &#8220;Call Orchestration&#8221;, System.Diagnostics.EventLogEntryType.Warning, 9900);<br />
</em></p>
<p>Some business applications might require precisely control what should be logged at certain level and where to store log data. Instead of reinventing wheel, the Enterprise Library could be used to provide some extra features.    <strong><br />
		</strong></p>
<p>Above two methods are valid and useful but they require you plan ahead by writing trace code. What if you didn&#8217;t do that in your BizTalk orchestration, can you still collect trace data?  Absolutely, In this case, you can try to enable process and message tracking using BizTalk Administration Console by checking Track Events/Message Bodies/Message Properties. However this is not a best practice recommended by Microsoft due to the performance consideration. Under the hood, BizTalk will copy the content of message to the BizTalk Tracking database during the orchestration execution even if you only need to exam one element.  In the next BizTalk release, the BizTalk tracking feature is very likely replaced by BAM.  If your organization plans to implement BAM,  BAM could provide data for process tracking too.  Although BAM is a powerful tracking engine since it&#8217;s fast and highly scalable, the drawback of BAM is BAM tools are awkward to use.
</p>
<p>As a general rule, I try to avoid any solutions which have performance impact. For instance, some developers add a Send shape in Orchestration to write XML message to a send port just for diagnosis purpose. This is inacceptable because each Send shape in Orchestration will cause an orchestration instance to be persisted to database,  which will noticeably slow down orchestration execution.
</p>
<p>Personally, I think writing information to system Event Log is a better approach. It allows you easily diagnose execution sequence and information through Event Viewer. The performance impact is negligible. If you develop custom pipeline, custom functoid or .Net class library, you can use the same mechanism to log information.   If you have multiple BizTalk servers, you can also takes advantage of  MOM ( Microsoft Operations Manager ) or other system management tools such as <a href="http://argent.com/index.html">Argent Guardian</a> to monitor multiple servers.  Often, combining two or more tracing methods will provide enough trace information and make it easier and quicker to resolve production issues.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/242/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/242/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=242&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2008/04/14/debug-biztalk-orchestration-in-production-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2008/04/041408-0354-debugbiztal1.png" medium="image" />
	</item>
		<item>
		<title>Deploy  BizTalk policy using command line tool</title>
		<link>http://lwang00.wordpress.com/2008/02/14/deploy-biztalk-policy-using-command-line-tool/</link>
		<comments>http://lwang00.wordpress.com/2008/02/14/deploy-biztalk-policy-using-command-line-tool/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 03:12:19 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2008/02/14/deploy-biztalk-policy-using-command-line-tool/</guid>
		<description><![CDATA[ As I discussed in my previous blog, manually deploying BizTalk application is error-prone. For every BizTalk application, developing a script to automate deployment process is absolutely necessary. One of recent projects I&#8217;m working on requires to import and deploy policies with multiple rulesets and vocabularies. BTSTask , a command line tool from Microsoft, can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=240&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:navy;"> </span>As I discussed in my <a href="http://www.blogbiztalk.com/?p=68">previous blog</a>, manually deploying BizTalk application is error-prone.  For every BizTalk application, developing a script to automate deployment process is absolutely necessary.   One of recent projects I&#8217;m working on requires to import and deploy policies with multiple rulesets and vocabularies.  BTSTask ,  a command line tool from Microsoft, can be used to accomplish this task.  For example
</p>
<p><strong>BTSTask ImportApp /Package:&#8221;C:\MSI Files\MyApplication.msi&#8221; /Environment:Test /ApplicationName:MyApplication /Overwrite</strong>
	</p>
<p> <br />
 </p>
<p>For detail steps about how to use BTSTask to import policy, click <a href="http://msdn2.microsoft.com/en-us/library/aa577374.aspx">here</a>.
</p>
<p> <br />
 </p>
<p>Although BTSTask works, it demands policies are stored in an MSI file. This is not desirable because it&#8217;s not easy to compare different versions in binary format. Ideally, I would like to import an XML file.  Luckily Microsoft provides a sample console application, which almost can fulfill my requirement.  You can download the<a href="http://msdn2.microsoft.com/en-us/biztalk/bb608378.aspx"> tool ( ImportExportRuleStore.exe )</a>. Please note, you need to compile it using Visual Studio.Net 2005.
</p>
<p> <br />
 </p>
<p>With this tool I can import XML policy file. Here is detail usage information by entering &#8220;ImportExportRuleStore.exe /?&#8221;
</p>
<p> <br />
 </p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>Usage:<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     -import &lt;filename&gt;<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     -export &lt;filename&gt; [ -rulesets &lt;rulesets&gt; | -vocabulary &lt;vocabularies&gt; ]<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>Additional options:<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     -server &lt;server&gt;<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     -database &lt;database&gt;<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     -addreferencedvocabularies<br />
</em></span></p>
<p> <br />
 </p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>&lt;rulesets&gt; are specified as &lt;policyname&gt;:&lt;majorversion&gt;.&lt;minorversion&gt;<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>&lt;vocabularies&gt; are specified as &lt;vocabularyname&gt;:&lt;majorversion&gt;.&lt;minorversion&gt;<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>If version is not specified, all versions of the policy/vocabulary are exported<br />
</em></span></p>
<p> <br />
 </p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>Only the first letter of each option is necessary.<br />
</em></span></p>
<p> <br />
 </p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>Examples:<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     ImportExportRuleStore -import sample.xml<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     ImportExportRuleStore -i sample.xml -s (local) -d BizTalkRuleEngineDb<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     ImportExportRuleStore -export sample.xml -rulesets Policy1 Policy2:1.0<br />
</em></span></p>
<p><span style="font-family:Verdana;font-size:10pt;"><em>     ImportExportRuleStore -e sample.xml -r Policy1:3.5 -v MyVocabulary:1.0<br />
</em></span></p>
<p> <br />
 </p>
<p>Unfortunately, there is  a minor glitch<strong>.  </strong>It doesn&#8217;t publish policy so I can not add policy into my BizTalk application using script.  If I need to manually change the policy status from &#8220;Not Published&#8221; to &#8220;Published&#8221;, then obviously it is not acceptable.  The good news is I have source code.  By changing line 261 of program.cs file from
</p>
<p>databaseStore.Save(rulesetsToImport) to databaseStore.Save(rulesetsToImport,<span style="color:blue;">true</span>), I can publish policies successfully.
</p>
<p>        <span style="color:blue;">if</span> (VerifyImport(databaseStore, rulesetsToImport, vocabulariesToImport, vocabulariesToImportAndPublish))
</p>
<p>            {
</p>
<p>                <span style="color:green;">// no conflicts, so load them in</span>
	</p>
<p>                <span style="color:blue;">try</span>
	</p>
<p>                {
</p>
<p>                    DisplayVersions(<span style="color:#a31515;">&#8220;Importing &#8220;</span>, vocabulariesToImportAndPublish);
</p>
<p>                    databaseStore.Save(vocabulariesToImportAndPublish, <span style="color:blue;">true</span>);
</p>
<p>                    DisplayVersions(<span style="color:#a31515;">&#8220;Importing &#8220;</span>, vocabulariesToImport);
</p>
<p>                    databaseStore.Save(vocabulariesToImport, <span style="color:blue;">true</span>);
</p>
<p>                    DisplayVersions(<span style="color:#a31515;">&#8220;Importing &#8220;</span>, rulesetsToImport);
</p>
<p><strong>(line 261)                    databaseStore.Save(rulesetsToImport,<span style="color:blue;">true</span>);<br />
</strong></p>
<p>                }
</p>
<p>            }
</p>
<p> <br />
 </p>
<p>Once the last issue is resolved, I can simple wrap the  tool using MSBuild EXEC task to import BizTalk policies  automatically.
</p>
<p> <br />
 </p>
<p><span style="color:blue;">&lt;!&#8211;</span><span style="color:green;"> Import policy file </span><span style="color:blue;">&#8211;&gt;</span>
	</p>
<p><span style="color:blue;">&lt;</span><span style="color:#a31515;">Target</span><span style="color:blue;"><br />
		</span><span style="color:red;">Name</span><span style="color:blue;">=</span>&#8220;<span style="color:blue;">ImportPolicy</span>&#8220;<span style="color:blue;"> &gt;</span>
	</p>
<p><span style="color:blue;"> &lt;</span><span style="color:#a31515;">Exec</span><span style="color:blue;"><br />
		</span><span style="color:red;">Command</span><span style="color:blue;"> =</span>&#8216;<span style="color:blue;">&#8220;$(BTSTools)\ImportExportRuleStore&#8221; -$(BindingFilePath)\$(PolicyFileName)</span>&#8216;<span style="color:blue;">/&gt;</span>
	</p>
<p><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Target</span><span style="color:blue;">&gt;</span>
	</p>
<p> <br />
 </p>
<p><span style="color:blue;">&lt;!&#8211;</span><span style="color:green;"> Add Policy to BizTalk application </span><span style="color:blue;">&#8211;&gt;</span>
	</p>
<p><span style="color:blue;">&lt;</span><span style="color:#a31515;">Target</span><span style="color:blue;"><br />
		</span><span style="color:red;">Name</span><span style="color:blue;">=</span>&#8220;<span style="color:blue;">AddPolicy</span>&#8220;<span style="color:blue;">&gt;</span>
	</p>
<p><span style="color:blue;"> &lt;</span><span style="color:#a31515;">Exec</span><span style="color:blue;"><br />
		</span><span style="color:red;">Command</span><span style="color:blue;"> =</span>&#8216;<span style="color:blue;">&#8220;$(BTSPath)\BTSTask&#8221; AddResource /ApplicationName:$(BTAppName) /Type:System.BizTalk:Rules /Name:$(PolicyName) /Version:$(PolicyVersion)</span>&#8216;<span style="color:blue;">/&gt;</span>
	</p>
<p><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Target</span><span style="color:blue;">&gt;</span>
	</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/240/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/240/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/240/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=240&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2008/02/14/deploy-biztalk-policy-using-command-line-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>
	</item>
		<item>
		<title>Deploy BizTalk application using MsBuild</title>
		<link>http://lwang00.wordpress.com/2008/01/29/deploy-biztalk-application-using-msbuild/</link>
		<comments>http://lwang00.wordpress.com/2008/01/29/deploy-biztalk-application-using-msbuild/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 18:52:37 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2008/01/29/deploy-biztalk-application-using-msbuild/</guid>
		<description><![CDATA[    I need to automate The BizTalk deployment process for my current client. Surprisely, the BizTalk project file created by VS.net 2005 and 2008 doesn&#8217;t work with MsBuild. Although Scott Colestock developed a framework to deploy BizTalk using Nant, I really like a solution to MsBuild BizTalk projects.     There are a few [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=239&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> <br />
 </p>
<p>I need  to automate The BizTalk deployment  process for my current client. Surprisely,  the BizTalk project file created by  VS.net 2005 and  2008 doesn&#8217;t work with MsBuild.  Although <a href="http://www.traceofthought.net/">Scott Colestock</a> developed a framework to deploy BizTalk using Nant, I really like a solution to MsBuild BizTalk projects.
</p>
<p> <br />
 </p>
<p>There are a few solutions discussed and developed by a few folks. The  <a href="http://www.codeplex.com/sdctasks"><span style="font-family:Segoe UI;font-size:10pt;"><strong>SDC Tasks Library</strong></span></a><span style="font-family:Segoe UI;font-size:10pt;"><strong><br />
			</strong>is very close to what I need as long as it works as it claims. One of great examples comes from <a></span>Stephen Thomas&#8217;s blog. He used this task library ( Please not the original library is not available from GotDotNet web site ) to demonstrate that it possible to stop and remove a BizTalk application, create receive and send ports,  start BizTalk application etc. using MsBuild customized tasks.   One thing that doesn&#8217;t work in his example is to import a binding file although he can create send/receive ports. I got a workaround solution using BTSTask.  I replaced the ImportBinding target with the following XML and successfully imported the binding file.<span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<p> <br />
 </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">Target</span><span style="color:blue;"><br />
			</span><span style="color:red;">Name</span><span style="color:blue;">=</span>&#8220;<span style="color:blue;">ImportBinding</span>&#8220;<span style="color:blue;"> &gt;</span><br />
		</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">            &lt;</span><span style="color:#a31515;">Exec</span><span style="color:blue;"><br />
			</span><span style="color:red;">Command</span><span style="color:blue;"> =</span>&#8216;<span style="color:blue;">&#8220;$(BTSInstallLocation)\BTSTask&#8221; ImportBindings /ApplicationName:$(BTApplicationName) /Source:c:\SampleDeployment\Binding\Binding.xml</span>&#8216;<span style="color:blue;">/&gt;</span><br />
		</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Target</span><span style="color:blue;">&gt;   </span><br />
		</span></p>
<p> <br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/239/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/239/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=239&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2008/01/29/deploy-biztalk-application-using-msbuild/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>
	</item>
		<item>
		<title>Common BizTalk Deployment Issues &amp; Solutions</title>
		<link>http://lwang00.wordpress.com/2008/01/21/common-biztalk-deployment-issues-solutions/</link>
		<comments>http://lwang00.wordpress.com/2008/01/21/common-biztalk-deployment-issues-solutions/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 07:16:18 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2008/01/21/common-biztalk-deployment-issues-solutions/</guid>
		<description><![CDATA[Deploying BizTalk application is a challenging task, which requires some special knowledge beyond desktop or web application deployment. In this blog, I will discuss some very common deployment issues and their solutions. I usually choose manually deploy BizTalk application to other computers due to the time constraint to write automation script. A typical deployment cycle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=237&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-left:1pt;">Deploying BizTalk application is a challenging task, which requires some special knowledge beyond desktop or web application deployment. In this blog, I will discuss some very common deployment issues and their solutions.</p>
<p style="margin-left:1pt;">I usually choose manually deploy BizTalk application to other computers due to the time constraint to write automation script. A typical deployment cycle consists of three steps. First, <strong>prepare BizTalk application for deployment</strong>. I usually deploy BizTalk application to my local BizTalk server, then test it to ensure it works properly. I will check the value of Application Name of the project property pages to ensure it is specified properly. If the application name is not defined, it will be deployed to the default BizTalk application, BizTalk Application 1. Once it&#8217;s up and running, I will<span style="text-decoration:underline;"> add some resource files</span> to the application such as binding file for a target environment. Second, <strong>export BizTalk application</strong>. BizTalk Deployment Wizard is an excellent tool to export BizTalk application to an MSI file. Finally, <strong>import BizTalk application</strong>. I use BizTalk Administration Console to import the BizTalk application. If the previous version of the same application is deployment, I will uninstall and delete the previous BizTalk application before importing.</p>
<p style="margin-left:1pt;">Above procedure seems to be simple. Especially, in the second step the BizTalk Deployment Wizard tool greatly simplifies the deployment process by creating an MSI file in matter of a few minutes. For any real world BizTalk application, however, we still need to pay attention to some common &#8220;minor&#8221; things to save us hours to troubleshoot deployment problems.</p>
<p style="margin-left:1pt;"><strong>#1 Forgot to register artifacts</strong></p>
<p style="margin-left:1pt;">One of unique characteristics of BizTalk application development is that BizTalk artifacts including .Net assembly need to be registered in the BizTalk management database in the deployment time. This is why simply copying assembly dlls into GAC wouldn&#8217;t guarantee the application will run. In the runtime, BizTalk server will read the metadata from the database instead of using reflection in order to improve performance.</p>
<p style="margin-left:1pt;">
 </p>
<p style="margin-left:1pt;"><strong>#2 MSI didn&#8217;t install assemblies into GAC</strong></p>
<p style="margin-left:1pt;">Did you ever wonder why MSI didn&#8217;t install your assembly into GAC? In order to install assemblies into GAC, the assemblies must be marked for a specific action such as file import, file install or add resource before exporting BizTalk application to an MSI.</p>
<p style="margin-left:1pt;">
 </p>
<p style="margin-left:1pt;"><img src="http://lwang00.files.wordpress.com/2008/01/012108-0703-commonbizta12.png?w=500" /><span style="font-size:12pt;font-family:Times New Roman;"><br />
</span></p>
<p style="margin-left:1pt;"> <strong>#3 Do not use binding file effectively </strong></p>
<p style="margin-left:1pt;">Manually creating settings such as send/receive ports is tedious and error-prone. Binding file provides a mechanism to simplify this process. We can export settings from our development environment, then modify it and import it to another machine. If the BizTalk application exists in the target machine, we can export a binding file from the target machine, for example, change the database connection string and/or assembly versions , then add it into the local BizTalk application before exporting. Alternatively, we can store all binding files into the source control system.</p>
<p style="margin-left:1pt;">
 </p>
<p style="margin-left:1pt;"><strong>#4 Forgot to configure the security data</strong></p>
<p style="margin-left:1pt;">The exported binding file usually doesn&#8217;t include some sensitive data due to security concerns. For example, database connection password, POP3 password etc. When testing our BizTalk application, we can find the SQL adapter throw an exception, which indicates the database connection failure. In this case, we can either manually to specify the password or modify the binding file.</p>
<p><strong>#5 Do not understand the difference between Import or install MSI</strong></p>
<p style="margin-left:1pt;">Although exported MSI could be installed just like any MSI files, it&#8217;s not common practice for BizTalk server in that installation doesn&#8217;t register artifact into BizTalk management database. Instead, we should import BizTalk MSI using BizTalk Server Administration console tool. <span style="text-decoration:underline;">The import process will add metadata into the database and copy files</span>.</p>
<p><strong>#6 Forgot to start host</strong></p>
<p style="margin-left:1pt;">Orchestration assemblies need to be loaded at runtime. Once we redeploy them, we need to stop and start BizTalk host.</p>
<p style="margin-left:1pt;">Many applications could have their own deployment requirement. For instance, deploy policy and/or modify rules. It&#8217;s always a good idea to document the BizTalk deployment process for a particular application. Ultimately, we would like to see our BizTalk application deployment is a repeatable and quick process. Automation would be the answer only if we have time to create scripts or we have a deployment framework to allow us to create such scripts quickly.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/237/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/237/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=237&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2008/01/21/common-biztalk-deployment-issues-solutions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2008/01/012108-0703-commonbizta12.png" medium="image" />
	</item>
		<item>
		<title>Deploy versioned class library assembly in BizTalk</title>
		<link>http://lwang00.wordpress.com/2007/12/11/deploy-versioned-class-library-assembly-in-biztalk/</link>
		<comments>http://lwang00.wordpress.com/2007/12/11/deploy-versioned-class-library-assembly-in-biztalk/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 01:32:36 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/12/11/deploy-versioned-class-library-assembly-in-biztalk/</guid>
		<description><![CDATA[Deploying versioned class library assembly in BizTalk is not straightforward process. The major problem is the BizTalk loads assemblies based upon the data stored in BizTalk management database instead of the manifest in assembly. Even if you sign the class library assembly and register it in the GAC, the end point such as orchestration or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=233&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Deploying versioned class library assembly in BizTalk is not straightforward process. The major problem is the BizTalk loads assemblies based upon the data stored in BizTalk management database instead of the manifest in assembly. Even if you sign the class library assembly and register it in the GAC, the end point such as orchestration or rule engine still could fail to locate it. Here is a typical error message you could see in the Event Log:<br />
 </p>
<p><span style="font-size:10pt;font-family:Arial;"><em>Could not load file or assembly &#8216;YourAssemblyName, Version=1.1.0.0, Culture=neutral, PublicKeyToken=64aa36518e843890&#8242; or one of its dependencies. The system cannot find the file specified.<br />
</em></span><br />
 </p>
<p>One of approach I used to solve this problem is to modify <span style="font-size:10pt;font-family:Arial;">BTSNTSvc.exe.config in the C:\Program Files\Microsoft BizTalk Server 2006\, then add a couple of lines xml content to redirect assembly from old version to new version. Let&#8217;s see if you have a class library assembly called &#8220;YouClassLibraryAssemblyName&#8221;, the old version is 1.1.0.0, the new version is 1.1.1.0, you can specify the bindingRedirect like this.</span><span style="font-size:12pt;font-family:Times New Roman;"><br />
</span><br />
 </p>
<p>&lt;?xml version=&#8221;1.0&#8243; ?&gt;</p>
<p>&lt;configuration&gt;</p>
<p>&lt;runtime&gt;</p>
<p>&lt;assemblyBinding xmlns=&#8221;urn:schemas-microsoft-com:asm.v1&#8243;&gt;</p>
<p>&lt;probing privatePath=&#8221;BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop&#8221; /&gt;</p>
<p><span style="background-color:yellow;">&lt;dependentAssembly&gt;</span></p>
<p><span style="background-color:yellow;">&lt;assemblyIdentity name=&#8221;YourClassLibraryAssemblyName&#8221; </span></p>
<p><span style="background-color:yellow;">publicKeyToken=&#8221;64aa36518e843890&#8243; </span></p>
<p><span style="background-color:yellow;">culture=&#8221;neutral&#8221; /&gt;</span></p>
<p><span style="background-color:yellow;">&lt;bindingRedirect oldVersion=&#8221;1.1.0.0&#8243; </span></p>
<p><span style="background-color:yellow;">newVersion=&#8221;1.1.1.0&#8243;/&gt;</span></p>
<p><span style="background-color:yellow;">&lt;/dependentAssembly&gt;</span></p>
<p>&lt;/assemblyBinding&gt;</p>
<p>&lt;/runtime&gt;</p>
<p>&lt;/configuration&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/233/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/233/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/233/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=233&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/12/11/deploy-versioned-class-library-assembly-in-biztalk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>
	</item>
		<item>
		<title>Configure BizTalk failed message routing</title>
		<link>http://lwang00.wordpress.com/2007/12/03/configure-biztalk-failed-message-routing/</link>
		<comments>http://lwang00.wordpress.com/2007/12/03/configure-biztalk-failed-message-routing/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 05:17:05 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/12/03/configure-biztalk-failed-message-routing/</guid>
		<description><![CDATA[In BizTalk 2004, failed messages are placed into the message box and suspended, therefore your BizTalk application cannot subscribe these failed messages and use these messages easily for some interesting things such as failure troubleshooting and message repairing. BizTalk 2006 provides a new feature, failed message routing, which allows you to enable routing for the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=232&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-left:1pt;">In BizTalk 2004, failed messages are placed into the message box and suspended, therefore your BizTalk application cannot subscribe  these failed messages and use these messages easily for some interesting things such as failure troubleshooting and message repairing. BizTalk 2006 provides a new feature, failed message routing,  which allows you to enable routing for the failed messages.  For instance, you can rout the message to a send port.  Here is a simple and quick way to configure failed message routing.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;">First, you create a receive port ( MyReceivePort )  and ensure you check the &#8220;<span style="background-color:yellow;">Enable routing for failed message</span>&#8216;. This is important because the default behavior of BizTalk 2006 is the same as that of BizTalk 2004.
</p>
<p style="margin-left:1pt;">
 </p>
<p style="margin-left:1pt;"><img src="http://lwang00.files.wordpress.com/2007/12/120307-0516-configurebi1.png?w=500"><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;">When this property is checked, A set of properties will be promoted. Such as,<br />
</span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.ErrorType<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.Description<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.FailureCode<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.MessageType<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.ReceivePortName<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.SendPortName<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.InboundTransportLocation<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.OutboundTransportLocation<br />
</strong></span></p>
<p style="margin-left:1pt;"><span style="font-family:Arial;font-size:10pt;"><strong>ErrorReport.RoutingFailureReportID<br />
</strong></span></p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;">You leverage these context properties in your application by subscribing them at send/receive port and/or orchestration.
</p>
<p style="margin-left:1pt;">
 </p>
<p style="margin-left:1pt;">Next,  you create a send port with file type and set<span style="background-color:yellow;"><strong> ErrorReport.ReceivePortName</strong></span> == MyReceivePort. That&#8217;s it! If you pass a bad message, you should see it&#8217;s saved as a file in the FailedMsgsPort port.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><img src="http://lwang00.files.wordpress.com/2007/12/120307-0516-configurebi2.png?w=500"><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;">If you want to build a robust BizTalk application to intelligently repair some bad messages, you can subscribe the failed message in the orchestration. <span style="font-family:Arial;font-size:10pt;">Please note<strong> BTS.MessageType</strong> and <strong>ErrorReport.MessageType</strong> are different. BTS.MessageType will only be prompted when a message successfully passes a pipeline.</span><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/232/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/232/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=232&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/12/03/configure-biztalk-failed-message-routing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2007/12/120307-0516-configurebi1.png" medium="image" />

		<media:content url="http://lwang00.files.wordpress.com/2007/12/120307-0516-configurebi2.png" medium="image" />
	</item>
		<item>
		<title>Telerik Ajax  Post I:  Telerik Ajax Concepts</title>
		<link>http://lwang00.wordpress.com/2007/12/01/telerik-ajax-post-i-telerik-ajax-concepts/</link>
		<comments>http://lwang00.wordpress.com/2007/12/01/telerik-ajax-post-i-telerik-ajax-concepts/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 04:52:25 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/12/01/telerik-ajax-post-i-telerik-ajax-concepts/</guid>
		<description><![CDATA[After working with ASP.Net Ajax and Telerik RadAjax, I think RadAjax is a good tool for rapid ASP.Net programming. If you need to get things done quickly with decent UI, you should consider RadAjax and Telerik web controls. Telerik&#8217;s RadAjax framework allows you to take a regular ASP.Net application and AJAX-enable it with no coding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=229&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-left:1pt;">After working with ASP.Net Ajax and Telerik RadAjax, I think RadAjax is a good tool for rapid ASP.Net programming. If you need to get things done quickly with decent UI, you should consider RadAjax and Telerik web controls.</p>
<p style="margin-left:1pt;"><span style="font-size:9pt;"><em>Telerik&#8217;s RadAjax framework allows you to take a regular ASP.Net application and AJAX-enable it with no coding or changes to your page life cycle. No client side javascript, no server side coding &#8211; just drop a component on your form and configure it with the smart tag editor and you are good to go! The framework automatically replaces Postbacks with AJAX callbacks. It preservers changes to viewstate, preserves the normal page life cycle, persists form values, reruns client side javascript as needed, and supports standard client side validation. In other words, it works well out of the box with most ASP.Net 1.1 or 2.0 applications, and many third party components</em></span></p>
<p style="margin-left:1pt;">Although &#8220;no coding&#8221; seems to be a good slogan, you still need to understand some basic Ajax concept and how Telerik works to get your job done if you&#8217;re programming daily.</p>
<p style="margin-left:1pt;">You can use RadAjaxPanel and/or RadAjaxManager to build Ajax enabled page. RadAjaxPanel is quicker to get things done if the requirement is not complicated. RadAjaxManager is a little bit complicated, however it has lower level APIs which you can leverage.</p>
<p style="margin-left:1pt;"><span style="text-decoration:underline;"><strong>Understanding RadAjaxPanel<br />
</strong></span></p>
<p style="margin-left:1pt;">Let&#8217;s imaging we put the AP.Net calendar control on the form and label on the bottom of the form. When we click the date, the label will be changed and <span style="text-decoration:underline;">you will see the page flickers due to the page refresh. </span></p>
<p style="margin-left:1pt;"><img src="http://lwang00.files.wordpress.com/2007/12/120107-0452-telerikajax1.png?w=500" /><span style="font-size:12pt;font-family:Times New Roman;"><br />
</span></p>
<p style="margin-left:1pt;">Here is the content in the aspx page</p>
<p style="margin-left:1pt;">&lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;</p>
<p style="margin-left:28pt;">&lt;div&gt;</p>
<p style="margin-left:55pt;"><span style="background-color:yellow;">&lt;radA:RadAjaxPanel ID=&#8221;RadAjaxPanel1&#8243; runat=&#8221;server&#8221; Height=&#8221;200px&#8221; Width=&#8221;300px&#8221;&gt;</span></p>
<p style="margin-left:55pt;">&lt;asp:Calendar id=&#8221;Calendar1&#8243; runat=&#8221;server&#8221; __designer:wfdid=&#8221;w1&#8243;</p>
<p style="margin-left:55pt;">OnSelectionChanged=&#8221;Calendar1_SelectionChanged&#8221;&gt;</p>
<p style="margin-left:55pt;">&lt;/asp:Calendar&gt;</p>
<p style="margin-left:28pt;">&lt;BR /&gt;</p>
<p style="margin-left:55pt;">&lt;asp:Label id=&#8221;lblDateSelected&#8221; runat=&#8221;server&#8221;</p>
<p style="margin-left:55pt;">__designer:wfdid=&#8221;w2&#8243; Width=&#8221;258px&#8221;&gt;&lt;/asp:Label&gt;</p>
<p style="margin-left:55pt;"><span style="background-color:yellow;">&lt;/radA:RadAjaxPanel&gt;</span></p>
<p style="margin-left:1pt;">&lt;/div&gt;</p>
<p style="margin-left:1pt;">&lt;/form&gt;</p>
<p style="margin-left:1pt;">After surrounding the calendar and label control, you won&#8217;t see the screen refresh. It sounds simple however it has a major flaw, <span style="text-decoration:underline;">everything that is inside the panel is re-rendered for every AJAX callback, whether it changed or not</span>.</p>
<p style="margin-left:1pt;"><span style="text-decoration:underline;"><strong>Understanding RadAjaxManager<br />
</strong></span></p>
<p style="margin-left:1pt;">When the page is complicated with some complicated controls such as GridView or TreeView, the performance of RadAjaxPanel. In this case, a better approach is to choose RadAjaxManager which could be used more precisely control the initiator ( trigger ) controls and target controls.</p>
<p style="margin-left:1pt;">The <strong>Initiator</strong> is the control that causes a Postback that you wish to convert to an AJAX callback, for</p>
<p style="margin-left:1pt;">instance a Button, or some control that has it&#8217;s AutoPostback property set.</p>
<p style="margin-left:1pt;">The <strong>Targets</strong> are the controls that are to be re-rendered after the callback (presumably because the</p>
<p style="margin-left:1pt;">callback changes them). The target can be a list of individual controls, or containers, like ASP Panels,</p>
<p style="margin-left:1pt;">RadAjaxManager maintains a list of <strong>AjaxSetting</strong> with one control as an Initiator, and one or more controls as Targets. A requirement for this to work is that <span style="background-color:yellow;">the controls that are specified in the AjaxSettings are rendered with an ID attribute in the client side HTML</span>. As you know, when you set the visibility of asp.net to false, then there is no HTML content will be rendered, which could cause Javascript error when using RadAjaxManager because it expects an ID. To resolve this issue, you can use a DIV element to surround your ASP.net controls.</p>
<p style="margin-left:1pt;"><span style="background-color:yellow;">&lt;div id=&#8221;divEnd&#8221; runat=server&gt;</span></p>
<p style="margin-left:1pt;">&lt;radCln:RadDatePicker ID=&#8221;dpEnd&#8221; runat=&#8221;server&#8221; Width=&#8221;100px&#8221;&gt;</p>
<p style="margin-left:1pt;">&lt;DateInput Title=&#8221;" PromptChar=&#8221; &#8221; TitleIconImageUrl=&#8221;"</p>
<p style="margin-left:1pt;">DisplayPromptChar=&#8221;_&#8221; CatalogIconImageUrl=&#8221;"</p>
<p style="margin-left:1pt;">TitleUrl=&#8221;" Description=&#8221;"&gt;&lt;/DateInput&gt;</p>
<p style="margin-left:1pt;">&lt;/radCln:RadDatePicker&gt;</p>
<p style="margin-left:1pt;"><span style="background-color:yellow;">&lt;/div&gt;</span></p>
<p style="margin-left:1pt;">You can only have one RadAjaxManager per page. You can not mix RadAjaxManagers and RadAjaxPanels in the same page according to the current version of Telerik Ajax.</p>
<p style="margin-left:1pt;">Rewirte the above example using RadAjaxManager:</p>
<p style="margin-left:1pt;">&lt;radA:RadAjaxManager ID=&#8221;RadAjaxManager1&#8243; runat=&#8221;server&#8221;&gt;</p>
<p style="margin-left:28pt;">&lt;AjaxSettings&gt;</p>
<p style="margin-left:55pt;">&lt;!&#8211; AjaxControlID: Initiator &#8211;&gt;</p>
<p style="margin-left:55pt;">&lt;<strong>radA:AjaxSetting</strong><br />
<span style="background-color:yellow;">AjaxControlID=&#8221;ddlDateRange&#8221;</span>&gt;</p>
<p style="margin-left:82pt;">&lt;UpdatedControls&gt;</p>
<p style="margin-left:82pt;">&lt;!&#8211; one or more target controls &#8211;&gt;</p>
<p style="margin-left:109pt;">&lt;<span style="background-color:yellow;">radA:AjaxUpdatedControl</span> ControlID=&#8221;dpStart&#8221;</p>
<p style="margin-left:136pt;">LoadingPanelID=&#8221;AjaxLoadingPanel1&#8243; /&gt;</p>
<p style="margin-left:109pt;">&lt;radA:AjaxUpdatedControl ControlID=&#8221;divEnd&#8221;</p>
<p style="margin-left:163pt;">LoadingPanelID=&#8221;AjaxLoadingPanel1&#8243; /&gt;</p>
<p style="margin-left:82pt;">&lt;/UpdatedControls&gt;</p>
<p style="margin-left:55pt;">&lt;/radA:AjaxSetting&gt;</p>
<p style="margin-left:28pt;">&lt;/AjaxSettings&gt;</p>
<p style="margin-left:1pt;">&lt;/radA:RadAjaxManager&gt;</p>
<p style="margin-left:1pt;"><span style="text-decoration:underline;">Initiator in the User Control<br />
</span></p>
<p style="margin-left:1pt;">There are some limitations in the RadAjaxManager. For instance you can&#8217;t add it into the Web User Control because the RadAjaxManager needs to go on the page that hosts this control. In order to get RajAjaxManager to work with user control, you need to create a method to allow the host page to inject the RajAjaxManager into the user control. For instance:</p>
<p style="margin-left:1pt;">public void ConfigureAjax( RadAjaxManager ajm )</p>
<p style="margin-left:1pt;">{</p>
<p style="margin-left:28pt;">ajm.AjaxSettings.AddAjaxSetting( ddlDateRange, dpStart, AjaxLoadingPanel1 );</p>
<p style="margin-left:28pt;">ajm.AjaxSettings.AddAjaxSetting( ddlDateRange, divEnd, AjaxLoadingPanel1 );</p>
<p style="margin-left:1pt;">}</p>
<p style="margin-left:1pt;"><span style="text-decoration:underline;">Using RadAjaxManager in Master Page<br />
</span></p>
<p style="margin-left:1pt;">If you want to use the RadAjaxManager in a Master Page context, it is most likely that you will have the RadAjaxManager in the Master Page, and the Ajax Initiators and Targets could be in any combination of the Master Page or the Content Forms. Either way, you will need to set up your AjaxSettings programmatically, as the RadAjaxManager Property Builder will not be able to see into the Content Pages.</p>
<p style="margin-left:1pt;"><strong>Sample code in the content page<br />
</strong></p>
<p style="margin-left:1pt;">protected void pbContent_Click(object sender, EventArgs e)</p>
<p style="margin-left:1pt;">{</p>
<p style="margin-left:28pt;">Label lbl = (Label)this.Master.FindControl(&#8220;lblMaster&#8221;);</p>
<p style="margin-left:28pt;">lbl.Text = &#8220;Changed from Content &#8221; + DateTime.Now.ToString();</p>
<p style="margin-left:1pt;">}</p>
<p style="margin-left:1pt;"><strong>Sample code in the master page<br />
</strong></p>
<p style="margin-left:1pt;">protected void pbMaster_Click(object sender, EventArgs e)</p>
<p style="margin-left:1pt;">{</p>
<p style="margin-left:1pt;">Label lbl = (Label) this.cphMain.FindControl(&#8220;lblContent&#8221;);</p>
<p style="margin-left:1pt;">lbl.Text = &#8220;Changed from Master &#8221; + DateTime.Now.ToString();</p>
<p style="margin-left:1pt;">}</p>
<p style="margin-left:1pt;">So where we should hook up Ajax? The answer is anywhere. The Ajaxsetting could be set in the master page, content page or both. You need to determine where to put it to get page functional and maintainable in your project although you&#8217;re most likely will put the code in the content page.</p>
<p style="margin-left:1pt;">protected void Page_Load(object sender, EventArgs e)</p>
<p style="margin-left:1pt;">{</p>
<p style="margin-left:28pt;">RadAjaxManager ajm = (RadAjaxManager)this.Master.FindControl(&#8220;ajmMaster&#8221;);</p>
<p style="margin-left:28pt;">Button btn = (Button)this.Master.FindControl(&#8220;pbMaster&#8221;);</p>
<p style="margin-left:28pt;">ajm.AjaxSettings.AddAjaxSetting(btn, this.lblContent);</p>
<p style="margin-left:28pt;">Label lbl = (Label)this.Master.FindControl(&#8220;lblMaster&#8221;);</p>
<p style="margin-left:28pt;">ajm.AjaxSettings.AddAjaxSetting(pbContent, lbl);</p>
<p style="margin-left:1pt;">}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/229/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/229/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=229&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/12/01/telerik-ajax-post-i-telerik-ajax-concepts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2007/12/120107-0452-telerikajax1.png" medium="image" />
	</item>
		<item>
		<title>Entity Framework High Level Architecture</title>
		<link>http://lwang00.wordpress.com/2007/11/06/entity-framework-high-level-architecture/</link>
		<comments>http://lwang00.wordpress.com/2007/11/06/entity-framework-high-level-architecture/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 04:39:03 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/11/06/entity-framework-high-level-architecture/</guid>
		<description><![CDATA[With Entity Framework, you can build some sophisticated applications elegantly. What&#8217;s the magic under the hood? Below is the Entity Framework Architecture         Data Provider The lowest layer in the Entity Framework is data provider. It translates the common SQL languages such as LINQ via command tree to the native SQL expression, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=227&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-left:1pt;">With Entity Framework, you can build some sophisticated applications elegantly. What&#8217;s the magic under the hood?  Below is the Entity Framework Architecture
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><img src="http://lwang00.files.wordpress.com/2007/11/110607-0438-entityframe1.png?w=500"><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><strong>Data Provider</strong>
	</p>
<p style="margin-left:1pt;">The lowest layer in the Entity Framework is data provider.  It translates the common SQL languages such as LINQ via command tree to the native SQL expression, then execute it against the specific DBMS system. Currently only SQL Server Provider is available.  The rumor said the Oracle provider is under development.  In the future version, Microsoft will develop more data providers to support other data sources such as web services.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><strong> EntityClient Provider</strong>.
</p>
<p style="margin-left:1pt;">The EntityClient provider exposes the entity layer to the upper layer.  It allows you to write code to query data base using Entity SQL,  an entity ware language.  The entity model is mapped to the database table via the mapping specification language (MSL ) and mapping engine.
</p>
<p style="margin-left:1pt;">The query pipeline of EntityClient provider compiles the entity sql text to the command tree, then pass it to the data provider.
</p>
<p style="margin-left:1pt;">EntityClient doesn&#8217;t materialize object from the data set.  Some data intensive application such as Reporting application can leverage the performance benefit of EntityClient layer.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><strong>Object Services</strong>.
</p>
<p style="margin-left:1pt;">Object Service is ORM layer of Entity Framework. It materializes the data result to the object instances of entities. Object Service provides rich ORM features such as change tracking, lazy loading and primary key mapping. Both LINQ and Entity SQL could be used to write query.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><strong>Metadata Service<br />
</strong></p>
<p style="margin-left:1pt;">Metadata Service provides centralized API to access the metadata stored in the CSDL, MSL, SSDL and assembly files. Metadata  such as entities, associations, entityset is essential for building highly flexible and powerful runtime applications and design-time tools.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<p style="margin-left:1pt;"><strong>Design  Tools</strong>.
</p>
<p style="margin-left:1pt;">The Entity Framework provides many tools integrated with visual studio 2008 to improve productivity.
</p>
<p style="margin-left:1pt;"> <br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/227/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/227/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=227&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/11/06/entity-framework-high-level-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2007/11/110607-0438-entityframe1.png" medium="image" />
	</item>
		<item>
		<title>Entity Framework Tools</title>
		<link>http://lwang00.wordpress.com/2007/11/05/entity-framework-tools/</link>
		<comments>http://lwang00.wordpress.com/2007/11/05/entity-framework-tools/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 01:41:57 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/11/05/entity-framework-tools/</guid>
		<description><![CDATA[Creating entity data model, entity class and mapping the entity layer ( CSDL ) to the source layer (SSDL) could be a labor intensive work for a large enterprise application. ADO.Net 3.5 provides several tools to make you more productive while working with the Entity Framework in the design time. Entity Data Model Wizard Generate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=225&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:black;">Creating entity data model, entity class and mapping the entity layer ( CSDL ) to the source layer (SSDL) could be a labor intensive work for a large enterprise application. ADO.Net 3.5 provides several tools to make you more productive while working with the Entity Framework in the design time.<span style="font-size:12pt;"><br />
</span></span><span style="color:black;"><strong>Entity Data Model Wizard <span style="font-size:12pt;"><br />
</span></strong></span>Generate edmx file which is used by Entity Data Model Designer to display the model graphically. Generate entity classes; <span style="color:black;">You start the wizard by adding an ADO.Net Entity Data Model to your project. <span style="font-size:12pt;"><br />
</span></span><span style="color:black;"><strong>Entity Data Model Designer <span style="font-size:12pt;"><br />
</span></strong></span>Add/Delete/Modify Entities; Properties; Association of the conceptual model. Validate model and mapping; Report Error;</p>
<p><span style="color:black;"><strong>Entity Mapping Details<span style="font-size:12pt;"><br />
</span></strong></span><span style="color:black;">Map entity types or associations to database tables and columns.<br />
</span><span style="color:black;">Add a condition. It&#8217;s important to create table-per-hierarchy ( TPH ) inheritance mapping.<br />
</span><span style="color:black;"><strong>Entity Model Browser</strong><br />
</span><span style="color:black;">View the Entity Data Model in tree view style.<br />
</span><span style="color:black;"><strong>EdmGen.exe</strong><br />
</span><span style="color:black;">A command-line used for working with the Entity Data Model (EDM).<br />
</span><span style="font-size:8pt;color:black;font-family:Verdana;"><strong>C:\WINDOWS\Microsoft.NET\Framework\v3.5\edmgen.exe<br />
</strong></span>Microsoft (R) EdmGen version 3.5.0.0</p>
<p>Copyright (C) Microsoft Corporation 2007. All rights reserved.</p>
<p>EdmGen Options</p>
<p>/mode:EntityClassGeneration Generate objects from a csdl file</p>
<p>/mode:FromSsdlGeneration Generate msl, csdl, and objects from an ssdl file</p>
<p>/mode:ValidateArtifacts Validate the ssdl, msl, and csdl files</p>
<p>/mode:ViewGeneration Generate mapping views from ssdl, msl,and csdl files</p>
<p>/mode:FullGeneration Generate ssdl, msl, csdl, and objects from the database</p>
<p>/project:&lt;string&gt; The base name to be used for all the artifact files (short form: /p)</p>
<p>/provider:&lt;string&gt; The name of the Ado.Net data provider to be used for ssdl generation. (short form: /prov)</p>
<p>/connectionstring:&lt;connection string&gt; The connection string to the database that you would like to connect to (short form: /c)</p>
<p>/incsdl:&lt;file&gt; The file to read the conceptual mode from</p>
<p>/refcsdl:&lt;file&gt; A csdl file that contains types that the /incsdl file is dependent upon</p>
<p>/inmsl:&lt;file&gt; The file to read the mapping from</p>
<p>/inssdl:&lt;file&gt; The file to read the storage model from</p>
<p>/outcsdl:&lt;file&gt; The file to write the generated conceptual model to</p>
<p>/outmsl:&lt;file&gt; The file to write the generated mapping to</p>
<p>/outssdl:&lt;file&gt; The file to write the generated storage model to</p>
<p>/outobjectlayer:&lt;file&gt; The file to write the generated object layer to</p>
<p>/outviews:&lt;file&gt; The file to write the pre generated view objects to</p>
<p>/language:CSharp Generate code using the C# language</p>
<p>/language:VB Generate code using the VB language</p>
<p>/namespace:&lt;string&gt; The namespace name to use for the conceptual model types</p>
<p>/entitycontainer:&lt;string&gt; The name to use for the EntityContainer in the conceptual model</p>
<p>/help Display the usage message (short form:</p>
<p>/?)</p>
<p>/nologo Suppress copyright message</p>
<p>Examples</p>
<p><strong>To generate a full Entity Model from the Northwind sample database.<br />
</strong></p>
<p>EdmGen /mode:FullGeneration /project:Northwind /provider:System.Data.SqlClient /connectionstring:&#8221;server=.\sqlexpress;integrated security=true;</p>
<p>database=northwind&#8221;<br />
<strong>To generate an Entity Model starting from an ssdl file.<br />
</strong>EdmGen /mode:FromSSDLGeneration /inssdl:Northwind.ssdl /project:Northwind</p>
<p><strong>To validate an Entity Model.<br />
</strong>EdmGen /mode:ValidateArtifacts /inssdl:Northwind.ssdl /inmsl:Northwind.msl</p>
<p>/incsdl:Northwind.csdl</p>
<p><span style="color:black;"><span style="font-size:12pt;"><br />
</span></span> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/225/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/225/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=225&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/11/05/entity-framework-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>
	</item>
		<item>
		<title>Entity Mapping: Table-per-type and Table-per-hierarchy</title>
		<link>http://lwang00.wordpress.com/2007/11/04/entity-mapping-table-per-type-and-table-per-hierarchy/</link>
		<comments>http://lwang00.wordpress.com/2007/11/04/entity-mapping-table-per-type-and-table-per-hierarchy/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 05:19:11 +0000</pubDate>
		<dc:creator>Leo Wang</dc:creator>
				<category><![CDATA[Ado.NET]]></category>
		<category><![CDATA[VS.Net 2008]]></category>

		<guid isPermaLink="false">http://lwang00.wordpress.com/2007/11/04/entity-mapping-table-per-type-and-table-per-hierarchy/</guid>
		<description><![CDATA[In the object world, Inheritance is natural thing. However the flat data model cannot be easily mapped to the hierarchy object model. Entity Framework provide TPT and TPH to solve this problem.   Below is a diagram I draw based on the MSDN Table-per-type sample. The right side is a list of entity types in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=224&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="font-size:11pt;font-family:Calibri;margin:0;">In the object world, Inheritance is natural thing. However the flat data model cannot be easily mapped to the hierarchy object model. Entity Framework provide TPT and TPH to solve this problem.  </p>
<p>Below is a diagram I draw based on the MSDN <a href="http://msdn2.microsoft.com/en-us/library/bb738685(VS.90).aspx">Table-per-type sample</a>. The right side is a list of entity types in the source layer while the left side is a list of entity types in the entity layer ( or conceptual layer). In the conceptual layer, the DeptMusic, DeptEnginerring and DeptBussiness are derived from base type Department. That is, four tables have corresponding entity types. Therefore this inheritance solution is called Table-per-type ( TPT ). Although the Department and DeptBusiness tables have no relationship with each other, the primary keys of these tables are mapped to the same DepartmentID of the Department base type.</p>
<p><img src="http://lwang00.files.wordpress.com/2007/11/110407-0518-entitymappi1.png?w=500" /><span style="font-size:12pt;font-family:Times New Roman;"><br />
</span><br />
 </p>
<p><a href="http://msdn2.microsoft.com/en-us/library/bb738443(VS.90).aspx">Table-per-hierarchy ( TPH )</a> is another way to create inheritance entity model in the EDM. The MSDN sample uses one person to hold the persisted data from the Student, Administrator, instructor and Person entities. As you might notice, Person is the base type in the hierarchy while Student, Administrator and Instructor are derived types. The PersonCategory column of the Person table is called <strong>discriminator column</strong>. If the value of PersonCategory is 0 in the database, when the data is materialized to object via Entity Framework, a person object will be created. A value of 1,2,3 indicate the Student, Instructor and Administrator types respectively. You can use Entity Mapping Detail window to specify discriminator columns and values.</p>
<p><img src="http://lwang00.files.wordpress.com/2007/11/110407-0518-entitymappi2.png?w=500" /><span style="font-size:12pt;font-family:Times New Roman;"><br />
</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lwang00.wordpress.com/224/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lwang00.wordpress.com/224/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lwang00.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lwang00.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lwang00.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lwang00.wordpress.com&amp;blog=1767950&amp;post=224&amp;subd=lwang00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lwang00.wordpress.com/2007/11/04/entity-mapping-table-per-type-and-table-per-hierarchy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9bc36b6918ee83c61dad5d7eef267e2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo Wang</media:title>
		</media:content>

		<media:content url="http://lwang00.files.wordpress.com/2007/11/110407-0518-entitymappi1.png" medium="image" />

		<media:content url="http://lwang00.files.wordpress.com/2007/11/110407-0518-entitymappi2.png" medium="image" />
	</item>
	</channel>
</rss>
