<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-29384735</id><updated>2012-04-16T09:53:12.802+10:00</updated><category term='UseSynchronizationContext'/><category term='ServiceBehavior'/><category term='DataGridView'/><category term='SharePoint 2007'/><category term='WSS 3'/><category term='MOSS 2007'/><category term='WCF'/><category term='TFS install'/><category term='reporting services'/><category term='Data Binding'/><category term='SharePoint'/><category term='DataGrid'/><category term='Site Actions Menu'/><category term='Custom Actions'/><category term='rsReportServerDatabaseUnavailable'/><category term='Membership Provider'/><title type='text'>Brain Spew - Neville Mehta's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-29384735.post-6785722477869046139</id><published>2009-09-06T14:49:00.002+10:00</published><updated>2009-09-06T14:53:06.958+10:00</updated><title type='text'>Tech Ed 09</title><content type='html'>So, it has been quite a while since I have blogged last, but I am planning on starting up again.&lt;br /&gt;Im really looking forward to attending Tech Ed Australia 09 this week, being held on the Gold Coast. There are quite a few &lt;a href="http://www.readify.net"&gt;Readify&lt;/a&gt; guys presenting, so will be great to see them on stage doing what they do best!&lt;br /&gt;I look forward to giving a few reviews of the presentations I watch this year. I am particularily keen to see a few of the .NET 4 ones!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-6785722477869046139?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/6785722477869046139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=6785722477869046139' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/6785722477869046139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/6785722477869046139'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2009/09/tech-ed-09.html' title='Tech Ed 09'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-5664599369408270783</id><published>2007-06-19T22:21:00.000+10:00</published><updated>2007-06-20T22:16:50.192+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSS 3'/><category scheme='http://www.blogger.com/atom/ns#' term='Site Actions Menu'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom Actions'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSS 2007'/><title type='text'>Custom Actions in WSS 3 / MOSS 2007 - Part 1</title><content type='html'>&lt;div align="left"&gt;Something that really frustrates my about WSS 3 and MOSS 2007 is the lack of documentation on alot of the object model as well as some of the CAML. One of the areas that really wasn't very helpful at all was the section on custom actions, so I thought I would write this post.&lt;br /&gt;&lt;br /&gt;To begin with, just a quick introduction...custom actions in SharePoint simply refer to the buttons (such as in the "Site Actions" menu) and some of the menus across the site (such as in "Site Settings"). The best way to deploy these custom actions is definitley through a Feature. This post will show the simple way to display these custom actions. In the next post I will show how to use custom controls for the menu buttons.&lt;br /&gt;&lt;br /&gt;Anyways, onto the code (or XML in this case)!&lt;br /&gt;&lt;br /&gt;In the first example, I will create a custom action for the "Site Actions" menu.&lt;br /&gt;To do this (and for the sake of the rest of the examples) we will begin with creating our feature manifest. Here it is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;Feature Id="65245A4A-5D65-45ea-896F-6A6A808F3C80"&lt;br /&gt;Title="MyCustomActionFeature"&lt;br /&gt;Description="This feature adds custom actions"&lt;br /&gt;Version="1.0.0.0"&lt;br /&gt;Scope="Site"&lt;br /&gt;xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;ElementManifests&amp;gt;&lt;br /&gt;&amp;lt;ElementManifest Location="MyCustomActions.xml"/&amp;gt;&lt;br /&gt;&amp;lt;/ElementManifests&amp;gt;&lt;br /&gt;&amp;lt;/Feature&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is what the MyCustomActions.xml file looks like to add an extra item to the Site Actions menu (Note that in most of the examples below, I have just left the Url blank because these are just examples, but this would be where you put the Url of where you want to link to):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;CustomAction&lt;br /&gt;Id="PeopleAndGroupsAction"&lt;br /&gt;GroupId="SiteActions"&lt;br /&gt;Location="Microsoft.SharePoint.StandardMenu"&lt;br /&gt;Sequence="10"&lt;br /&gt;Title="People and Groups"&lt;br /&gt;ImageUrl="/_layouts/images/Actionscreate.gif"&amp;gt;&lt;br /&gt;&amp;lt;UrlAction&lt;br /&gt;Url="/_layouts/people.aspx" /&amp;gt;&lt;br /&gt;&amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_8FG6hQUpAHA/RnkRTE77ufI/AAAAAAAAAAM/G2kWfitFTCU/s1600-h/SiteActions.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5078109074277251570" style="MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_8FG6hQUpAHA/RnkRTE77ufI/AAAAAAAAAAM/G2kWfitFTCU/s320/SiteActions.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is what the MyCustomActions.xml file looks like to add another custom actions menu item to the Actions menu of a list or document library.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;CustomAction&lt;br /&gt;  Id="MyListActionsCustomAction"&lt;br /&gt;  GroupId="ActionsMenu"&lt;br /&gt;  Location="Microsoft.SharePoint.StandardMenu"&lt;br /&gt;  RegistrationType="List"&lt;br /&gt;  Sequence="10"&lt;br /&gt;  Title="My Actions Custom Action"&amp;gt;&lt;br /&gt;  &amp;lt;UrlAction&lt;br /&gt;    Url="~site" /&amp;gt;&lt;br /&gt;  &amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_8FG6hQUpAHA/RnkSmk77ugI/AAAAAAAAAAU/JI56O0FUK3k/s1600-h/ActionsMenu.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_8FG6hQUpAHA/RnkSmk77ugI/AAAAAAAAAAU/JI56O0FUK3k/s320/ActionsMenu.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5078110508796328450" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is what the MyCustomActions.xml file looks like to add another section to the Site Settings page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;CustomActionGroup&lt;br /&gt;        Id="NewSiteSettingsGroup"&lt;br /&gt;        Location="Microsoft.SharePoint.SiteSettings"&lt;br /&gt;        Title="New Site Settings Group"&lt;br /&gt;        Sequence="10"&lt;br /&gt;        Description="" /&amp;gt;&lt;br /&gt; &amp;lt;CustomAction&lt;br /&gt;  Id="NewSiteSettingsGroupItem"&lt;br /&gt;  GroupId="NewSiteSettingsGroup"&lt;br /&gt;  Location="Microsoft.SharePoint.SiteSettings"&lt;br /&gt;  Sequence="10"&lt;br /&gt;  Title="My New Site Settings Item"&amp;gt;&lt;br /&gt;  &amp;lt;UrlAction&lt;br /&gt;   Url="~site" /&amp;gt;&lt;br /&gt; &amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_8FG6hQUpAHA/RnkTZE77uhI/AAAAAAAAAAc/fNDcU-AGMqI/s1600-h/SiteSettings.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_8FG6hQUpAHA/RnkTZE77uhI/AAAAAAAAAAc/fNDcU-AGMqI/s320/SiteSettings.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5078111376379722258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is what the MyCustomActions.xml file looks like to add another section and custom action to the Central Administration page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;CustomActionGroup&lt;br /&gt;        Id="CustomCentralAdminSection"&lt;br /&gt;        Location="Microsoft.SharePoint.Administration.ApplicationManagement"&lt;br /&gt;        Title="Custom Central Admin Section"&lt;br /&gt;        Sequence="10" /&amp;gt;&lt;br /&gt; &amp;lt;CustomAction&lt;br /&gt;        Id="DoSomethingInCentralAdmin"&lt;br /&gt;        GroupId="CustomCentralAdminSection"&lt;br /&gt;        Location="Microsoft.SharePoint.Administration.ApplicationManagement"&lt;br /&gt;        Sequence="10"&lt;br /&gt;        Title="Do Something In Central Admin"&amp;gt;&lt;br /&gt;  &amp;lt;UrlAction&lt;br /&gt;            Url="" /&amp;gt;&lt;br /&gt; &amp;lt;/CustomAction&amp;gt; &lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_8FG6hQUpAHA/RnkUKU77uiI/AAAAAAAAAAk/-OJG_rEaTwQ/s1600-h/CentralAdmin.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_8FG6hQUpAHA/RnkUKU77uiI/AAAAAAAAAAk/-OJG_rEaTwQ/s320/CentralAdmin.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5078112222488279586" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see, adding these actions is very easy. If you want to add a group like in the Site Settings and Central Admin examples, all you have to do is add the CustomActionGroup element and then use that ID for the GroupID in your CustomAction element.&lt;br /&gt;&lt;br /&gt;There are also attributes such as RequiresSiteAdministrator and Rights which all some security trimming.&lt;br /&gt;&lt;br /&gt;Also, if you are trying to find the appropriate value for the Location attribute, or GroupID attribute, there are a few listed in the SDK documentation. If you want more, you can simply look/search through the "Features" directory (%Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\) for the CustomActions written by Microsoft. After all, they used the same method Ive shown above for alot of the menus and buttons you see.&lt;br /&gt;&lt;br /&gt;Anyway, I hope you have got the idea of custom actions. In one of the posts I have coming up I will show how to use custom controls (and hence use the ControlAssembly and ControlClass attributes) to render your custom actions. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-5664599369408270783?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/5664599369408270783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=5664599369408270783' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/5664599369408270783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/5664599369408270783'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2007/06/custom-actions-in-wss-3-moss-2007-part.html' title='Custom Actions in WSS 3 / MOSS 2007 - Part 1'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8FG6hQUpAHA/RnkRTE77ufI/AAAAAAAAAAM/G2kWfitFTCU/s72-c/SiteActions.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-4610647219149698555</id><published>2007-05-06T19:55:00.000+10:00</published><updated>2007-05-06T20:10:21.707+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSS 3'/><category scheme='http://www.blogger.com/atom/ns#' term='reporting services'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSS 2007'/><title type='text'>Setting up Reporting Services on MOSS 2007</title><content type='html'>Liam Cleary has an excellent series of articles(&lt;a href="http://www.sharepointblogs.com/helloitsliam/archive/2007/02/21/19801.aspx"&gt;1&lt;/a&gt;, &lt;a href="http://www.sharepointblogs.com/helloitsliam/archive/2007/03/04/20410.aspx"&gt;2&lt;/a&gt; and &lt;a href="http://www.sharepointblogs.com/helloitsliam/archive/2007/03/04/20416.aspx"&gt;3&lt;/a&gt;, ) on using the Reporting Services add on for MOSS 2007. I finally got the chance to play around with this today and was following Liam's instructions. They were excellent, but I did come accross a few things I thought I would mention quickly. &lt;br /&gt;Firstly, you wont see the "SharePoint Integration" option in the Reporting Services Configuration tool until you install SQL Server SP 2. &lt;br /&gt;Secondly, if you get an error saying "Exception of type 'Microsoft.ReportingServices.RsProxy.AccessDeniedException' was thrown." when trying to deploy your report project, make sure your ReportServer virtual directory in IIS does not allow anonymous access (not sure how mine got that way because I dont think its the default, and I definitley didnt enable anonymous access).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-4610647219149698555?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/4610647219149698555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=4610647219149698555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/4610647219149698555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/4610647219149698555'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2007/05/setting-up-reporting-services-on-moss.html' title='Setting up Reporting Services on MOSS 2007'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-6293750392027331879</id><published>2007-01-26T12:01:00.000+11:00</published><updated>2007-01-26T12:11:52.299+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSS 3'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSS 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='Membership Provider'/><title type='text'>Cannot get Membership Provider with name [MembershipProvider name] error in SharePoint 2007 / WSS 3</title><content type='html'>Ive been doing some work with MOSS 2007 lately and came across this error:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Cannot get Membership Provider with name [MembershipProvider name]. The membership provider for this process was not properly configured. You must configure the membership provider in the .config file for every SharePoint process.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Just to save someone else the time of figuring out what the problem is, I thought I would let you know that the reason this is happening is because when you use a membership provider in SharePoint 2007 (or WSS 3) you must add the details about the membership provider in the web.config of the site you have created AS WELL AS in Central Admin so you can create site collection administrators etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-6293750392027331879?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/6293750392027331879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=6293750392027331879' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/6293750392027331879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/6293750392027331879'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2007/01/cannot-get-membership-provider-with.html' title='Cannot get Membership Provider with name [MembershipProvider name] error in SharePoint 2007 / WSS 3'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-7335530363132638308</id><published>2007-01-16T10:17:00.000+11:00</published><updated>2007-01-16T10:21:18.891+11:00</updated><title type='text'>Uninstalling SQL Embedded Edition after a WSS 3 installation</title><content type='html'>If you ever try to install WS 3.0 on a single machine, an instance of SQL Server Embedded Edition is created, and this is will be your default for config and content databases. I wanted to use SQL Server 2005 Dev Edition. To do this, you must install WSS 3.0 with the farm option, not just a stand alone (single) option. But, the SQL Server Embedded databases dont uninstall. I looked around alot for info on uninstalling this, but eventually found &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/94d1385f-4872-4c29-8822-3a4ec5e45ae41033.mspx?mfr=true"&gt;this&lt;/a&gt;. Take a look at issue 33.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-7335530363132638308?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/7335530363132638308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=7335530363132638308' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/7335530363132638308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/7335530363132638308'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2007/01/uninstalling-sql-embedded-edition-after.html' title='Uninstalling SQL Embedded Edition after a WSS 3 installation'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-7919451676554824025</id><published>2006-12-31T14:17:00.000+11:00</published><updated>2006-12-31T14:31:13.163+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rsReportServerDatabaseUnavailable'/><category scheme='http://www.blogger.com/atom/ns#' term='reporting services'/><category scheme='http://www.blogger.com/atom/ns#' term='TFS install'/><title type='text'>Reporting Services "rsReportServerDatabaseUnavailable" error when installing TFS</title><content type='html'>I decided to install TFS today and after following the simple instructions on &lt;a href="http://blogs.vertigosoftware.com/teamsystem/archive/2006/04/04/2512.aspx"&gt;Cliff's notes for a team system install&lt;/a&gt; I came across a reporting services error halfway through the installation.&lt;br /&gt;The error said something like "Cannot contact Reporting Services, make sure the database is installed and reachable blah, blah, blah" (obviously not a direct quote :-) ). &lt;br /&gt;&lt;br /&gt;First thing I did was open the Reporting Services site in IE and found that there was an error saying that it couldnt access the location c:/inetpub/wwwroot/web.config "Access is Denied"...so I gave the NETWORK SERVICE account access to that location.&lt;br /&gt;Then, I tried opening the site again and got a Reporting Services error saying the usual SQL Server error message...something like..."Cannot access SQL Server, make sure the server access remote connections blah, blah, blah"...but it did have the all important word: "rsReportServerDatabaseUnavailable" on it. I decided to Google that and found &lt;a href="http://msdevelopers.blogspot.com/2005/03/rsreportserverdatabaseunavailable-on.html"&gt;this post&lt;/a&gt; that fixed it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-7919451676554824025?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/7919451676554824025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=7919451676554824025' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/7919451676554824025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/7919451676554824025'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/12/reporting-services-rsreportserverdataba.html' title='Reporting Services &quot;rsReportServerDatabaseUnavailable&quot; error when installing TFS'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116503254310128208</id><published>2006-12-02T15:08:00.000+11:00</published><updated>2007-01-26T12:13:05.846+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UseSynchronizationContext'/><category scheme='http://www.blogger.com/atom/ns#' term='ServiceBehavior'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>What is the UseSynchronizationContext property in WCF</title><content type='html'>The &lt;a href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.servicebehaviorattribute.usesynchronizationcontext.aspx"&gt;&lt;span class="code-text"&gt;UseSynchronizationContext&lt;/span&gt;&lt;/a&gt; from the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.servicebehaviorattribute.aspx"&gt;ServiceBehavior&lt;/a&gt; attribute in WCF is used to determine which thread your service will execute on.&lt;br /&gt;&lt;br /&gt;Basically, if you have something like this on your service class at the time of creating your &lt;span class="code-text"&gt;ServiceHost&lt;/span&gt;:&lt;br /&gt;&lt;span class="code-text"&gt;&lt;br /&gt;  [ServiceBehavior(UseSynchronizationContext = true)]&lt;br /&gt;  class MyServiceClass: IMyServiceContract&lt;br /&gt;  {&lt;br /&gt;    // Implementation&lt;br /&gt;  }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;then the value from the &lt;span class="code-text"&gt;System.Threading.SynchronizationContext.Current&lt;/span&gt; is read and cached so that when a request comes to the service, the host can marshal the request onto the thread that the host was created on using the cached &lt;span class="code-text"&gt;SynchronizationContext&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;If you are familiar with the concept behind methods like &lt;span class="code-text"&gt;Control.Invoke, Control.BeginInvoke()&lt;/span&gt; and &lt;span class="code-text"&gt;Control.InvokeRequired()&lt;/span&gt; then you will be familiar with what the &lt;span class="code-text"&gt;System.Threading.SynchronizationContext&lt;/span&gt; class is trying to achieve. Basically the &lt;span class="code-text"&gt;SynchronizationContext.Send()&lt;/span&gt; and &lt;span class="code-text"&gt;SynchronizationContext.Post()&lt;/span&gt; methods are similar to the &lt;span class="code-text"&gt;Control.Invoke()&lt;/span&gt; and &lt;span class="code-text"&gt;Control.BeginInvoke()&lt;/span&gt; methods.&lt;br /&gt;&lt;br /&gt;If you try to host a service in, for example, a WPF application and also call that service from the same thread in the WPF application, you will notice that you get a deadlock when the client tries to call the service. The reason for this is that the default value of the &lt;span class="code-text"&gt;UseSynchronizationContext&lt;/span&gt; is true and so when you create the &lt;span class="code-text"&gt;ServiceHost&lt;/span&gt; on the UI thread of the WPF application, then the current synchronization context is a &lt;span class="code-text"&gt;DispatcherSynchronizationContext&lt;/span&gt; which holds a reference to a &lt;span class="code-text"&gt;System.Windows.Threading.Dispatcher&lt;/span&gt; object which then holds a reference to the current thread. The &lt;span class="code-text"&gt;DispatcherSynchronizationContext&lt;/span&gt; will then be used when a request comes in to marshal requests onto the UI thread. But if you are calling the service from the UI thread then you have a deadlock when it tries to do this!!&lt;br /&gt;&lt;br /&gt;Ive types this up pretty quick while its still in my head so hopefully it makes sense :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116503254310128208?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116503254310128208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116503254310128208' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116503254310128208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116503254310128208'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/12/what-is-usesynchronizationcontext.html' title='What is the UseSynchronizationContext property in WCF'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116494339601979170</id><published>2006-12-01T14:13:00.000+11:00</published><updated>2006-12-01T14:23:16.030+11:00</updated><title type='text'>WCF Masterclass presented by Juval Lowy</title><content type='html'>&lt;a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=3&amp;tabid=5"&gt;Juval Lowy&lt;/a&gt; is coming to Sydney and Melbourne to present &lt;a href="http://www.idesign.net"&gt;IDesign&lt;/a&gt;'s WCF Masterclass course. If you are serious at all about getting up to speed and ahead of the rest in WCF then you cant miss this opportunity! &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.readify.net/Default.aspx?tabid=241"&gt;Details can be found here&lt;/a&gt; and you can &lt;a href="http://www.readify.net/book+now!.aspx"&gt;book here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116494339601979170?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116494339601979170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116494339601979170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116494339601979170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116494339601979170'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/12/wcf-masterclass-presented-by-juval.html' title='WCF Masterclass presented by Juval Lowy'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116476176371822203</id><published>2006-11-29T11:54:00.000+11:00</published><updated>2006-11-29T11:56:03.730+11:00</updated><title type='text'>Output Caching in ASP.NET 2</title><content type='html'>&lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt; has put up a &lt;a href="http://weblogs.asp.net/scottgu/archive/2006/11/28/tip-trick-implement-donut-caching-with-the-asp-net-2-0-output-cache-substitution-feature.aspx"&gt;great post&lt;/a&gt; on output caching in ASP.NET 2 and what he calls donut caching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116476176371822203?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116476176371822203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116476176371822203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116476176371822203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116476176371822203'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/output-caching-in-aspnet-2.html' title='Output Caching in ASP.NET 2'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116475857507658964</id><published>2006-11-29T10:58:00.000+11:00</published><updated>2006-11-29T11:32:43.440+11:00</updated><title type='text'>Controls.Clear() Doesnt Dispose In Win Forms!</title><content type='html'>We are currently doing memory leak testing on the project I am on that uses Windows Forms in .NET 1.1, and an interesting thing has come up. We noticed that when calling &lt;span class="code-text"&gt;Controls.Clear()&lt;/span&gt; none of the controls in the collection were being disposed and hence causing handles to be leaked.&lt;br /&gt;If you open &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; and see the &lt;span class="code-text"&gt;System.Windows.Forms.Control.ControlCollection.Clear()&lt;/span&gt; method, you will notice that it simply calls &lt;span class="code-text"&gt;RemoveAt(int index)&lt;/span&gt; on each control in the collection.&lt;br /&gt;So how do we get around this problem of controls not disposing?&lt;br /&gt;Well, do we simply have to iterate through the collection and dispose each control like below to clear the controls collection?&lt;br /&gt;&lt;span class="code-text"&gt;&lt;br /&gt;foreach (Control control in this.Controls)&lt;br /&gt;{&lt;br /&gt;   if (control != null)&lt;br /&gt;       control.Dispose();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;NO! This wont work.&lt;br /&gt;What will happen is that only about half the controls will actually be disposed.&lt;br /&gt;The reason for this is that the &lt;span class="code-text"&gt;Dispose()&lt;/span&gt; method removes the control from its collection and shifts all the controls down one index in the collection, and so when the foreach operator trys to get the next control, it goes to the next index which is really two infront of what it started on before disposing the previous control.&lt;br /&gt;So, unfortunatley what we need to do is something like:&lt;br /&gt;&lt;span class="code-text"&gt;&lt;br /&gt;for (int i = 0; i &lt; Controls.Count; i++)&lt;br /&gt;{&lt;br /&gt;   if (Controls[0] != null)&lt;br /&gt;       Controls[0].Dispose();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, I dont know if this has remained the same in .NET 2 or 3 or event ASP.NET...I will leave that to you to play around with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116475857507658964?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116475857507658964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116475857507658964' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116475857507658964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116475857507658964'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/controlsclear-doesnt-dispose-in-win.html' title='Controls.Clear() Doesnt Dispose In Win Forms!'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116442859077320397</id><published>2006-11-25T15:18:00.000+11:00</published><updated>2006-11-25T15:23:10.786+11:00</updated><title type='text'>Functional Programming Concepts and C# 3</title><content type='html'>&lt;a href="http://www.readify.net"&gt;Readify&lt;/a&gt; collegue &lt;a href="http://aabs.wordpress.com/"&gt;Andrew Matthews&lt;/a&gt; brought my attention to a &lt;a href="http://www.tomasp.net/articles/csharp3-concepts.aspx"&gt;fantastic article&lt;/a&gt; on functional programming with languages such as C-omega and F# and thier influence on some of the features found in C# 3.0. Definitley worth a read!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116442859077320397?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116442859077320397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116442859077320397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116442859077320397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116442859077320397'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/functional-programming-concepts-and-c.html' title='Functional Programming Concepts and C# 3'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116303774586715831</id><published>2006-11-09T12:42:00.000+11:00</published><updated>2006-11-09T13:15:00.746+11:00</updated><title type='text'>PathGeometry and StreamGeometry Mini-Language Syntax</title><content type='html'>I have been playing around with geometry in WPF lately and came accross the following syntax for drawing a curve:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;!-- clip --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;Path &lt;br /&gt;    Data="M10,100 C 100,0 200,200 300,100 z" &lt;br /&gt;    Fill="Blue"  &lt;br /&gt;    Stroke="Black" &lt;br /&gt;    StrokeThickness="4" /&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;!-- clip--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is confusing because the Data property of the System.Windows.Shapes.Path object takes an object dervied from System.Windows.Media.Geometry.&lt;br /&gt;&lt;br /&gt;It turns out that this is a special syntax for defining StreamGeometry objects or Figures in a PathGeometry object.&lt;br /&gt;&lt;br /&gt;in the above example the "M" is saying is saying start at the absoloute position of (10, 100) then the "C" is saying draw a cubic bezier curve starting at (100, 0) then go to (200, 200) and ending at (300, 100). The "z" simply says to end the curve here and draw a line from the starting position to the current point.&lt;br /&gt;&lt;br /&gt;For a more complete explaination, go to:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms752293.aspx"&gt;Path Marup Syntax&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116303774586715831?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116303774586715831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116303774586715831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116303774586715831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116303774586715831'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/pathgeometry-and-streamgeometry-mini.html' title='PathGeometry and StreamGeometry Mini-Language Syntax'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116279512572930569</id><published>2006-11-06T17:33:00.000+11:00</published><updated>2006-11-06T17:38:45.740+11:00</updated><title type='text'>C# 3.0</title><content type='html'>I have also recently been quite interested to see whats coming up in C# 3 and came accross &lt;a href="http://blah.winsmarts.com/"&gt;Sahil Malik's blog&lt;/a&gt; and his &lt;a href="http://blah.winsmarts.com/2006/06/02/demystifying-dlinq-part1--an-introduction-to-dlinq.aspx"&gt;excellent series of posts on C# 3.0&lt;/a&gt; which are short and to the point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116279512572930569?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116279512572930569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116279512572930569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116279512572930569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116279512572930569'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/c-30.html' title='C# 3.0'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116277044840237490</id><published>2006-11-06T10:42:00.000+11:00</published><updated>2006-11-06T10:47:28.413+11:00</updated><title type='text'>C Omega</title><content type='html'>&lt;a href="http://danielcrowleywilson.blogspot.com/2006/11/concurrent-progrmming-with-c-omega.html"&gt;Daniel Crowley-Wilson&lt;/a&gt; has recently been playing around with C Omega, which has got me a little curious to know more about it...you can have a look at what its all about &lt;a href="http://research.microsoft.com/Comega/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116277044840237490?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116277044840237490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116277044840237490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116277044840237490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116277044840237490'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/c-omega.html' title='C Omega'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116269275460267225</id><published>2006-11-05T13:03:00.000+11:00</published><updated>2006-11-07T23:37:44.393+11:00</updated><title type='text'>Sound/Midi Not Working in Adobe Flash, YouTube etc. using CMedia sound card</title><content type='html'>About two months ago, I was playing around with the codecs on my Windows XP machine...I cant exactly remember why, but I think I was trying to install a new DivX one. I installed a few differnet players and codecs until I found the one I wanted. Everything seemed to be fine...until I went to &lt;a href="http://www.youtube.com"&gt;YouTube&lt;/a&gt; and noticed that I was not getting any sound. I thought it was an Adobe Flash problem, so reinstalled it, but still no luck. I found that I could play MP3s normally but couldnt play MIDIs or any Flash sounds. It appeared to be playing as normal but no sound came out. I thought it may be a sound card problem (C Media) so I reinstalled the drivers...no luck.&lt;br /&gt;&lt;br /&gt;I noticed in Control Panel under "Sounds and Audio Devices" (Windows XP) that my "default device" for MIDI Music Playback was blank and also my "default device" was blank. Even if I selected an option from the drop down list and pressed "Apply" then "OK", the settings would not be saved and next time I go back in, it would be blank again.&lt;br /&gt;&lt;br /&gt;I also noticed that the speaker icon in the bottom right hand corner of the screen (in the task tray) had disappeared as well.&lt;br /&gt;&lt;br /&gt;I was getting really frustrated and googled the problem and found that this was a very old problem with no resolution.&lt;br /&gt;&lt;br /&gt;After playing around and tweaking alot of settings, I finally found the solution with a little help from an old friend &lt;a href="http://www.sysinternals.com/Utilities/Regmon.html"&gt;RegMon&lt;/a&gt;. I found that Windows was looking for two keys in the registry and couldnt find them. These were:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/drivers32/midimapper&lt;br /&gt;&lt;br /&gt;HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/drivers32/wavemapper&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;It seems that one of the programs I installed then uninstalled when looking for the codec/player that I wanted must have deleted these keys.&lt;br /&gt;&lt;br /&gt;Anyway, the solution is that these two registry keys should be set to the following string values:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/drivers32/midimapper&lt;/span&gt; should be set to &lt;span style="font-family:courier new;"&gt;midimap.dll&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/drivers32/wavemapper&lt;/span&gt; should be set to &lt;span style="font-family:courier new;"&gt;msacm32.drv&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;If you are still having problems, you may need to reinstall some default audio codecs the instructions found &lt;a href="http://www.free-codecs.com/guides/How_to_install_default_codecs_in_Windows_XP_2000.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Finally, everything is back to normal again! I can now select my voice playback and midi playback default device and the speaker icon is back in the system tray...and I can watch Flash videos and listen to MIDIs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116269275460267225?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116269275460267225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116269275460267225' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116269275460267225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116269275460267225'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/11/soundmidi-not-working-in-adobe-flash.html' title='Sound/Midi Not Working in Adobe Flash, YouTube etc. using CMedia sound card'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-116081795556443197</id><published>2006-10-14T19:25:00.000+10:00</published><updated>2007-01-26T12:13:58.301+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataGrid'/><category scheme='http://www.blogger.com/atom/ns#' term='DataGridView'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Binding'/><title type='text'>DataGrid / DataGridView DataBinding</title><content type='html'>I was recently playing around with binding to Windows Forms grids. I have never had to do anything really compilated with them before and have always just assumed that when I do, I will easily be able to figure it out on the spot.&lt;br /&gt;&lt;br /&gt;Anyway, I cant remember why, but I wanted to bind a simple string array to a Win Forms &lt;span style="font-family:courier new;"&gt;DataGridView&lt;/span&gt;. I had always assumed that you would simply need to do something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;string customerNames = new string[] { "Jill", "Jack", "Johnny", "Jackson", "Jim" };&lt;br /&gt;&lt;br /&gt;DataGridView dataGridView = new DataGridView();&lt;br /&gt;dataGridView.DataSource = customerNames;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But, I was wrong! All that appeared in the grid was one column with a header that says "Length" and the rows would only contain the length of the strings, not the values of them....so I thought Ill try a list of strings and see what happens...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;List&lt;string&gt; listOfStrings = new List&lt;string&gt;();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Same story...I got a column with the lengths of the string. By now I had caught onto what was happening. All the grid was doing was determining that the &lt;span style="font-family:courier new;"&gt;DataSource&lt;/span&gt; was an &lt;span style="font-family:courier new;"&gt;IList&lt;/span&gt; and so it simply got the objects from the list, reflected over the type and saw that Length was the only property and so displayed a column of length.&lt;br /&gt;So how do you display an array of strings in a grid? The answer is, you cant just set the &lt;span style="font-family:courier new;"&gt;DataSource&lt;/span&gt; to the array like I did above, you have to create an object and then expose a property of type string and use that...something like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;public class Customer&lt;br /&gt;{&lt;br /&gt;private string _customerName;&lt;br /&gt;&lt;br /&gt;public void Customer()&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void Customer(string NewCustomerName)&lt;br /&gt;{&lt;br /&gt;_customerName = NewCustomerName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public string CustomerName&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;    return customerName;&lt;br /&gt;}&lt;br /&gt;set&lt;br /&gt;{&lt;br /&gt;    _customerName = value;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Customer[] customers = new Customer[] { new Customer("Jack"), new Customer("Jill"), new Customer("Jim") };&lt;br /&gt;&lt;br /&gt;DataGridView dataGridView = new DataGridView();&lt;br /&gt;dataGridView.DataSource = customers;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;What will happen here is that the grid will look through the array, pull out the &lt;span style="font-family:courier new;"&gt;Customer&lt;/span&gt; objects, reflect over them and see that there is a &lt;span style="font-family:courier new;"&gt;CustomerName&lt;/span&gt; property and display a column of customer names.&lt;br /&gt;&lt;br /&gt;Ok, thats fine...but then out of curiosity I pulled out Reflector and decided to have a look at what happens when a &lt;span style="font-family:courier new;"&gt;DataSet&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt; is set as the &lt;span style="font-family:courier new;"&gt;DataSource&lt;/span&gt; of the grid...something like this (note that the code below is only to show you something, you should probably be using a stringly typed dataset, and always check for nulls and that there are more than zero tables in the dataset etc.):&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;DataSet myDataSet = new DataSet();&lt;br /&gt;&lt;br /&gt;/**** Populate dataset and do other stuff here ****/&lt;br /&gt;&lt;br /&gt;DataGridView dataGridView = new DataGridView();&lt;br /&gt;dataGridView.DataSource = myDataSet;&lt;br /&gt;dataGridView1.DataMember = myDataSet.Tables[0];&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Say the first table had two columns on it like "CustomerID" and "CustomerName" then what you would see in the grid are two columns named "CustomerID" and "CustomerName"...wait a second...how did the grid know that? There are no properties on the &lt;span style="font-family:courier new;"&gt;DataSet&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;DataRow&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;DataView&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; objects that have those names. So how did the grid just figure out that it had to display those columns when it couldnt figure out how to display my string array?&lt;br /&gt;&lt;br /&gt;Well, lets take a look at some of the objects involved. The &lt;span style="font-family:courier new;"&gt;DataSet&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt; both implement &lt;span style="font-family:courier new;"&gt;System.ComponentModel.IListSource&lt;/span&gt;. This interface has a property on it called &lt;span style="font-family:courier new;"&gt;ContainsListCollection&lt;/span&gt; and more importantly contains a method called &lt;span style="font-family:courier new;"&gt;GetList()&lt;/span&gt; which returns an &lt;span style="font-family:courier new;"&gt;IList&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;When &lt;span style="font-family:courier new;"&gt;GetList()&lt;/span&gt; is called for the &lt;span style="font-family:courier new;"&gt;DataSet&lt;/span&gt;, it returns a &lt;span style="font-family:courier new;"&gt;DataViewManager&lt;/span&gt;, when &lt;span style="font-family:courier new;"&gt;GetList()&lt;/span&gt; is called for the &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt;, it returns a &lt;span style="font-family:courier new;"&gt;DataView&lt;/span&gt;. Both these classes implement the &lt;span style="font-family:courier new;"&gt;System.Collections.IList&lt;/span&gt; interface. Ok, we are getting closer...The &lt;span style="font-family:courier new;"&gt;DataView&lt;/span&gt; is actually a list of &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; object among other things.&lt;br /&gt;&lt;br /&gt;Now what happens is, when the grid calls &lt;span style="font-family:courier new;"&gt;GetList()&lt;/span&gt; on the say...&lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt; which is set to the &lt;span style="font-family:courier new;"&gt;DataMember&lt;/span&gt; property of the grid, it returns a &lt;span style="font-family:courier new;"&gt;DataView&lt;/span&gt; object. Since this implements &lt;span style="font-family:courier new;"&gt;IList&lt;/span&gt;, the grid knows it can iterate through the list and get a bunch of objects, in this case &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; objects. &lt;br /&gt;&lt;br /&gt;Now, the &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; objects are whats returned, but when the grid reflects over these objects to create columns etc. there are no &lt;span style="font-family:courier new;"&gt;CustomerID&lt;/span&gt; properties or &lt;span style="font-family:courier new;"&gt;CustomerName&lt;/span&gt; properties, so how did it know to create these columns. Well, the &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; object implements an interface called &lt;span style="font-family:courier new;"&gt;System.ComponentModel.ICustomTypeDescriptor&lt;/span&gt; which has a &lt;span style="font-family:courier new;"&gt;GetProperties&lt;/span&gt; method. This is very important as the grid looks for this interface before reflecting over the type normally (using Reflection). If the object implements this interface then the grid will call its &lt;span style="font-family:courier new;"&gt;GetProperties&lt;/span&gt; method to obtain its properties and hence the columns. So, the &lt;span style="font-family:courier new;"&gt;DataRowView&lt;/span&gt; is smart enough to return the column names of the underlying &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt; to the grid so it will create those columns in the &lt;span style="font-family:courier new;"&gt;DataGridView&lt;/span&gt; instead of actually returning its properties like &lt;span style="font-family:courier new;"&gt;Row&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;RowVersion&lt;/span&gt; etc. (which can be returned using normal reflection anyway).&lt;br /&gt;&lt;br /&gt;I hope this post gives you a basic insight into the way the &lt;span style="font-family:courier new;"&gt;DataGrid&lt;/span&gt; / &lt;span style="font-family:courier new;"&gt;DataGridView&lt;/span&gt; binds to objects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-116081795556443197?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/116081795556443197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=116081795556443197' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116081795556443197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/116081795556443197'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/10/datagrid-datagridview-data_116081795556443197.html' title='DataGrid / DataGridView DataBinding'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-115710739748753322</id><published>2006-09-01T20:40:00.000+10:00</published><updated>2006-09-01T20:43:17.500+10:00</updated><title type='text'>Windows XP Shortcut Keys</title><content type='html'>&lt;a href="http://www.windowsnetworking.com/articles_tutorials/Windows-XP-Keyboard-Shortcuts.html"&gt;Here&lt;/a&gt; is a great article on shortcut keys in Windows XP. I never knew about Windows Button + U with the cool magnifying glass tool.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.windowsnetworking.com/articles_tutorials/Windows-XP-Keyboard-Shortcuts.html"&gt;Windows XP Shortcuts&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-115710739748753322?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/115710739748753322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=115710739748753322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115710739748753322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115710739748753322'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/09/windows-xp-shortcut-keys.html' title='Windows XP Shortcut Keys'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-115702756537224895</id><published>2006-08-31T22:11:00.000+10:00</published><updated>2006-08-31T22:32:45.396+10:00</updated><title type='text'>Tech Ed Gone For The Year...</title><content type='html'>This time last week, I was at Tech Ed - Sydney. I know its pretty late now, but I thought I would still write something about it...&lt;br /&gt;&lt;br /&gt;This was my first Tech Ed. I had heard about the previous years and that it was a great event, but had never got the chance to experience it. Im happy to say that it did live upto my expectations! The presentations I saw were great and were on things like TFS, WCF, Atlas, BizTalk, WF, SQL Server etc. ... I even managed to squeeze in an infrastructure presentation on Windows Vista/Longhorn Server Core (although, I have to admit that because of my lack of knowledge in this area, some of it went over my head).&lt;br /&gt;&lt;br /&gt;Something that I did not anticipate about Tech Ed was the amount of people that I would run into. I have only been working in this industry for just over one and a half years, but its amazing how many people you make friends with. It goes to show that the community around this stuff is really pretty small. Not to mention the people I met for the first time.&lt;br /&gt;I finally had the pleasure of meeting &lt;a href="http://blogs.msdn.com/frankarr/default.aspx"&gt;Frank Arrigo&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt;, both of who's blog I have been reading for a while, so it was quite strange to meet them in person because you feel like you already know them so well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-115702756537224895?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/115702756537224895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=115702756537224895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115702756537224895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115702756537224895'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/08/tech-ed-gone-for-year.html' title='Tech Ed Gone For The Year...'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-115077681887116482</id><published>2006-06-20T14:03:00.000+10:00</published><updated>2006-06-20T16:48:55.326+10:00</updated><title type='text'>Intro to System.Transactions</title><content type='html'>The .NET Framework v2 has been around for a while now. Since I only started working in the world of .NET about a year and a half ago I have spent alot of time playing catch up and getting up to speed with v1.1 before I move onto v2, so there are still quite a few things in v2 I havent had a chance to look at in as much detail as I would have liked to.&lt;br /&gt;So, recently I thought I would take a look at what the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.transactions.aspx"&gt;System.Transactions&lt;/a&gt; namespace is all about.&lt;br /&gt;Here are the three links that were pretty much all I needed to get started, they talk about System.Transactions, Resource Managers, Transaction Managers etc.:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://notgartner.com/posts/4351.aspx"&gt;System.Transactions: Let's get transactional! Mitch Denny's Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devx.com/codemag/Article/31666/0/page/1"&gt;System.Transactions and ADO.NET 2.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/introsystemtransact.asp"&gt;Introducing System.Transactions in the .NET Framework 2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After reading the stuff above, one thing that confused me a little was...how many records would you expect to be written to the database with the code below:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/5371/2516/1600/nestedtranscode.0.jpg"&gt;&lt;/a&gt;&lt;a href="http://photos1.blogger.com/blogger/5371/2516/1600/nestedtranscode.1.jpg"&gt;&lt;/a&gt;&lt;a href="http://photos1.blogger.com/blogger/5371/2516/1600/nestedtranscode.2.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/5371/2516/400/nestedtranscode.0.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, the answer is one. Only the second row (the one in the &lt;span style="font-family:courier new;"&gt;outerScope&lt;/span&gt;) will be written. Why? I hear you ask, because the &lt;span style="font-family:courier new;"&gt;innerScope&lt;/span&gt; is using the same transaction that the &lt;span style="font-family:courier new;"&gt;outerScope&lt;/span&gt; is using.&lt;br /&gt;&lt;br /&gt;What's happening is, since we havent given any arguments in the constructor of the &lt;span style="font-family:courier new;"&gt;innerScope&lt;/span&gt;, the default behaviour is to either use a current transaction or to create a new one if none exists. This is the same as passing in &lt;span style="font-family:courier new;"&gt;TransactionScopeOption.Required &lt;span style="font-family:Georgia;"&gt;to the &lt;span style="font-family:courier new;"&gt;innerScope&lt;/span&gt; constructor&lt;/span&gt;.&lt;/span&gt; The current transaction is created by the &lt;span style="font-family:courier new;"&gt;outerScope&lt;/span&gt; and so that is used. Again, this can be controlled by the constructors of the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.transactions.transactionscope.aspx"&gt;TransactionScope class&lt;/a&gt;.&lt;br /&gt;When the end of the &lt;span style="font-family:courier new;"&gt;innerScope&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;'s&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;using&lt;/span&gt; statement is reached, the status of the current transaction changes to &lt;span style="font-family:courier new;"&gt;Aborted&lt;/span&gt; and so, the second insert statement is no longer running within a transaction and so is written to the database even though &lt;span style="font-family:courier new;"&gt;outerScope.Complete()&lt;/span&gt; is not called.&lt;br /&gt;&lt;br /&gt;You can check the status of the current transaction by using the&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.transactions.transactioninformation.status.aspx"&gt;System.Transactions.Transaction.Current.TransactionInformation.Status property&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What would happen if I called &lt;span style="font-family:courier new;"&gt;outerScope.Complete()&lt;/span&gt; before the end of the &lt;span style="font-family:courier new;"&gt;outerScope&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;using&lt;/span&gt; statement? Well, you would get a &lt;span style="font-family:courier new;"&gt;TransactionAbortedException &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;and the second insert statement would still be written to the database&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-115077681887116482?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/115077681887116482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=115077681887116482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115077681887116482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115077681887116482'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/06/intro-to-systemtransactions.html' title='Intro to System.Transactions'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29384735.post-115071463309763326</id><published>2006-06-19T20:39:00.000+10:00</published><updated>2006-06-19T21:14:59.726+10:00</updated><title type='text'>First Post</title><content type='html'>This is my first post ever...not quite sure what I should write to it, so how about a little about myself to start with.&lt;br /&gt;&lt;br /&gt;Well...Ive been consulting for a pretty brilliant company called &lt;a href="http://www.readify.net"&gt;Readify&lt;/a&gt; for approximately the last 10 months. &lt;br /&gt;&lt;br /&gt;At the time of writing this post, my main reason for starting this blog is so that I can write about all things .NET, SQL Server, BizTalk...Im sure you get where Im going with this.&lt;br /&gt;&lt;br /&gt;Most of this stuff is still quite new to me so Im sure a lot of the posts you'll be seeing up here will be titled "Intro to ... ". &lt;br /&gt;My reason for this is that when I am trying to learn about something, the first thing I type into a search engine is "Intro to ...". Hopefully, Ill be able to save someone having to search for hours and hours just trying to get started with something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29384735-115071463309763326?l=nevmehta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevmehta.blogspot.com/feeds/115071463309763326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29384735&amp;postID=115071463309763326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115071463309763326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29384735/posts/default/115071463309763326'/><link rel='alternate' type='text/html' href='http://nevmehta.blogspot.com/2006/06/first-post.html' title='First Post'/><author><name>Nev</name><uri>http://www.blogger.com/profile/09901906650061552020</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
