<?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-23322135</id><updated>2012-02-03T15:00:39.191+10:00</updated><title type='text'>djeeg blog</title><subtitle type='html'>looks like a blog 
smells like a blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>djeeg</name><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>72</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-23322135.post-3761993026248421673</id><published>2011-03-30T16:57:00.002+10:00</published><updated>2011-03-30T17:01:54.334+10:00</updated><title type='text'>No snap-ins have been registered for Windows PowerShell version 2</title><content type='html'>I was getting this message in SPPower (http://sppower.codeplex.com/), an application I am building to run powershell commands from WPF.&lt;br /&gt;&lt;br /&gt;“No snap-ins have been registered for Windows PowerShell version 2.”&lt;br /&gt;&lt;br /&gt;The code was basically this:&lt;br /&gt;&lt;br /&gt;using (PowerShell ps = PowerShell.Create()) {&lt;br /&gt;PSSnapInException ex = null&lt;br /&gt;ps.Runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out ex);&lt;br /&gt;&lt;br /&gt;Doing a search returned this helpful link:&lt;br /&gt;&lt;br /&gt;http://blogs.msdn.com/b/pareshj/archive/2010/07/30/error-msg-no-snap-ins-have-been-registered-for-windows-powershell-version-2.aspx&lt;br /&gt;&lt;br /&gt;This suggested it was something to do with the different OS architectures.&lt;br /&gt;&lt;br /&gt;Then it hit me, i was developing on Vista x86, but needed it to run on Windows 2008 x64. So I went to the visual studio project, and found it was targeted to x86 platform. All i needed to do was change it to "Any CPU", so it works on both the development and target environments&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-3761993026248421673?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/3761993026248421673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=3761993026248421673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/3761993026248421673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/3761993026248421673'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2011/03/no-snap-ins-have-been-registered-for.html' title='No snap-ins have been registered for Windows PowerShell version 2'/><author><name>djeeg</name><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-23322135.post-1660247897631573364</id><published>2011-03-05T14:53:00.005+10:00</published><updated>2011-03-05T15:07:39.027+10:00</updated><title type='text'>WD My Passport Essential SE 1TB</title><content type='html'>Well, i got a dick smith gift card for christmas, so i needed to use it up, but there is not really much at DSE that i would buy. I decided to get an external hdd for backing up stuff on my laptop while traveling.&lt;br /&gt;&lt;br /&gt;Though i have had a little trouble with WD Green drives lately in my NAS, i decided to stick with WD.&lt;br /&gt;&lt;br /&gt;I wanted the portable small drive, with as much storage as i could get, 1TB, and preferably with a USB 3 interface. The My Passport Essential SE 1TB &lt;a href="http://www.wdc.com/en/products/products.aspx?id=430"&gt;http://www.wdc.com/en/products/products.aspx?id=430&lt;/a&gt; gave me all of those. I would have liked to have a 7200 rpm drive, but no it didn't have one of those. I suppose it doesn't really matter as i have no usb 3 ports ... yet.&lt;br /&gt;&lt;br /&gt;I had a look at some reviews, and people seemed to think there was a lot of bloat ware. Not a good sign. And there was a virtual cd that could not be removed. Some more searching, and i found a tool to nuke the bloat &lt;a href="http://www.dedoimedo.com/computers/passport-vcd.html"&gt;http://www.dedoimedo.com/computers/passport-vcd.html&lt;/a&gt;, so i was pretty much set to buy.&lt;br /&gt;&lt;br /&gt;When i got to the shop they had 500GB Essentials and 1TB Essential SEs. I couldn't remember if the "SE" was good or bad... I took a risk and bought the SE. Luckily it turns out that the "SE" probably means second edition, and it is the evolution of the product &lt;a href="http://www.wdc.com/en/products/external/portable/"&gt;http://www.wdc.com/en/products/external/portable/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I opened the box, and to my dismay, i saw that the cable had some port on it i had never seen. Oh no, i thought, i have got suckered into getting a non-standard proprietary piece of hardware. Turns out though, that the port is really the micro usb 3.0 standard. &lt;a href="http://www.wdc.com/en/products/resources/drivecompatibility/"&gt;http://www.wdc.com/en/products/resources/drivecompatibility/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally when i plugged the drive in, the bloat was there, but without the virtual cd drive. A quick format, and i had a perfect drive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-1660247897631573364?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/1660247897631573364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=1660247897631573364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/1660247897631573364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/1660247897631573364'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2011/03/wd-my-passport-essential-se-1tb.html' title='WD My Passport Essential SE 1TB'/><author><name>djeeg</name><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-23322135.post-4671960689484281461</id><published>2011-01-31T19:37:00.003+10:00</published><updated>2011-01-31T19:41:44.597+10:00</updated><title type='text'>SharePoint 2010 List View Ribbon Missing</title><content type='html'>One thing that i find annoying with list views, is when you add any other web parts to the same page, they become an application page. This means you lose the breadcrumb view selector, and also the ribbon menu.&lt;br /&gt;&lt;br /&gt;After playing around with this &lt;a href="http://stackoverflow.com/questions/4848892/sp2010-list-tools-tab-is-no-longer-available-after-adding-webpart-to-the-page"&gt;question&lt;/a&gt; i managed to find a solution.&lt;br /&gt;&lt;br /&gt;Basically you trick the list view into thinking it is selected. So first, add a content editor web part to the page, then have a timer, that calls the WpClick() method, triggering the web part to be selected. Then the ribbon shows.&lt;br /&gt;&lt;br /&gt;Perfect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-4671960689484281461?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/4671960689484281461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=4671960689484281461' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/4671960689484281461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/4671960689484281461'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2011/01/sharepoint-2010-list-view-ribbon.html' title='SharePoint 2010 List View Ribbon Missing'/><author><name>djeeg</name><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-23322135.post-6261424014847981531</id><published>2011-01-05T19:36:00.002+10:00</published><updated>2011-01-05T19:41:56.796+10:00</updated><title type='text'>Ribbon CustomAction On All Lists</title><content type='html'>For a new component I am building, I wanted to allow users to perform an action on all lists. I thought about putting it in list settings, but hey this is 2011, lets put it in the ribbon. As i knew nothing about the ribbon it was a good opportunity to study for certification.&lt;br /&gt;&lt;br /&gt;First i had to get a basic understanding of how it all worked, these pages helped a lot. (but you have to be careful of pages relating to the beta)&lt;br /&gt;&lt;br /&gt;http://www.sharepointnutsandbolts.com/2010/01/customizing-ribbon-part-1-creating-tabs.html&lt;br /&gt;http://makarandrkulkarni.blogspot.com/2010/01/sharepoint-2010-ribbon-customization_09.html&lt;br /&gt;http://msmvps.com/blogs/cobrien/archive/2010/01/25/adding-ribbon-items-into-existing-tabs-groups-ribbon-customization-part-2.aspx&lt;br /&gt;&lt;br /&gt;Adding a few simple buttons, i found out that adding a global button was not very straight forward. For starters most of the examples bind to lists, but i wanted to bind to all lists. Easy enough to change the RegistrationType to ContentType, just like you do with workflows and then the RegistrationId would be 0x01, the root content type of everything.&lt;br /&gt;&lt;br /&gt;I tried to apply what i had learnt from the examples, to this global button, but it ended up in a mess. &lt;br /&gt;Why?&lt;br /&gt;Take these two list types as examples:&lt;br /&gt;100 (GenericList) has a ContextualGroup "List Tools" with Tab "Items" and "List"&lt;br /&gt;but&lt;br /&gt;101 (DocumentLibrary) has a ContextualGroup "Library Tools" with Tabs "Documents" and "Library"&lt;br /&gt;Each list type has different and unique Location paths, so you need to have a CommandUIDefinition for each location. Sure, i could duplicate the CommandUIDefinition definitions, but eventually someone would add a new list definition, with a different ribbon, and my button would not display. And duplicating xml definitions bugs me. It must be pointed out though that some people would not want an extra tab cluttering up their ribbon.&lt;br /&gt;&lt;br /&gt;Then it hit me, i didn't have to add this button to an existing tab, i could create my own and that way the Location would be the same, globally. First i tried to create it as a ContextualGroup. Why would i do that? Well it would be cool to have a ContextualGroup called say Custom and then developers could add their custom actions to it. Unfortunately i couldn't get it to work without code. ContextualGroups need to be showed from code, which kind of makes sense (because they are contextual). So i just ended up with a simple Tab instead.&lt;br /&gt;&lt;br /&gt;I ended up with something like this&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;CustomAction&lt;br /&gt;      Id=&amp;quot;{CC1A996C-A50C-430f-8666-70747F7C8D9D}&amp;quot;&lt;br /&gt;      Location=&amp;quot;CommandUI.Ribbon&amp;quot;&lt;br /&gt;      RegistrationType=&amp;quot;ContentType&amp;quot;&lt;br /&gt;      Rights=&amp;quot;ManageLists&amp;quot;&lt;br /&gt;      RegistrationId=&amp;quot;0x01&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;CommandUIExtension&amp;gt;&lt;br /&gt;      &amp;lt;CommandUIDefinitions&amp;gt;&lt;br /&gt;        &amp;lt;CommandUIDefinition Location=&amp;quot;Ribbon.Tabs._children&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;Tab&lt;br /&gt;                Id=&amp;quot;Ribbon.Extended&amp;quot;&lt;br /&gt;                Title=&amp;quot;Extended&amp;quot;&lt;br /&gt;                Description=&amp;quot;Extended Settings&amp;quot;&lt;br /&gt;                Sequence=&amp;quot;600&amp;quot;&amp;gt;&lt;br /&gt;              &amp;lt;Scaling&lt;br /&gt;                  Id=&amp;quot;Ribbon.Extended.Scaling&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;MaxSize&lt;br /&gt;                    Id=&amp;quot;Ribbon.Extended.Scaling.SPC3.MaxSize&amp;quot;&lt;br /&gt;                    Sequence=&amp;quot;10&amp;quot;&lt;br /&gt;                    GroupId=&amp;quot;Ribbon.Extended.SPC3&amp;quot;&lt;br /&gt;                    Size=&amp;quot;Large&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;Scale&lt;br /&gt;                    Id=&amp;quot;Ribbon.Extended.Scaling.SPC3.Scale&amp;quot;&lt;br /&gt;                    Sequence=&amp;quot;20&amp;quot;&lt;br /&gt;                    GroupId=&amp;quot;Ribbon.Extended.SPC3&amp;quot;&lt;br /&gt;                    Size=&amp;quot;Large&amp;quot; /&amp;gt;&lt;br /&gt;              &amp;lt;/Scaling&amp;gt;&lt;br /&gt;              &amp;lt;Groups Id=&amp;quot;Ribbon.Extended.Groups&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;Group&lt;br /&gt;                   Id=&amp;quot;Ribbon.Extended.SPC3&amp;quot;&lt;br /&gt;                   Sequence=&amp;quot;10&amp;quot;&lt;br /&gt;                   Description=&amp;quot;SPC3 Settings&amp;quot;&lt;br /&gt;                   Title=&amp;quot;SPC3&amp;quot;&lt;br /&gt;                   Template=&amp;quot;Ribbon.Templates.ExtendedLarge&amp;quot;&amp;gt;&lt;br /&gt;                  &amp;lt;Controls Id=&amp;quot;Ribbon.Extended.SPC3.Controls&amp;quot;&amp;gt;&lt;br /&gt;                    &amp;lt;Button&lt;br /&gt;                      Id=&amp;quot;Ribbon.Extended.SPC3.ShowIn&amp;quot;&lt;br /&gt;                      Sequence=&amp;quot;10&amp;quot;&lt;br /&gt;                      Command=&amp;quot;Ribbon.Extended.SPC3.ShowIn&amp;quot;&lt;br /&gt;                      Image16by16=&amp;quot;/_layouts/Com.CodePlex.SPC3/showhide16x16.png&amp;quot;&lt;br /&gt;                      Image32by32=&amp;quot;/_layouts/Com.CodePlex.SPC3/showhide32x32.png&amp;quot;&lt;br /&gt;                      LabelText=&amp;quot;Show In&amp;quot;&lt;br /&gt;                      ToolTipTitle=&amp;quot;Show In&amp;quot;&lt;br /&gt;                      ToolTipDescription=&amp;quot;Opens Show In configuration&amp;quot;&lt;br /&gt;                      TemplateAlias=&amp;quot;button1&amp;quot;&lt;br /&gt;                      Alt=&amp;quot;Show In&amp;quot; /&amp;gt;&lt;br /&gt;                  &amp;lt;/Controls&amp;gt;&lt;br /&gt;                &amp;lt;/Group&amp;gt;&lt;br /&gt;              &amp;lt;/Groups&amp;gt;&lt;br /&gt;            &amp;lt;/Tab&amp;gt;&lt;br /&gt;        &amp;lt;/CommandUIDefinition&amp;gt;&lt;br /&gt;        &amp;lt;CommandUIDefinition Location=&amp;quot;Ribbon.Templates._children&amp;quot;&amp;gt;&lt;br /&gt;          &amp;lt;GroupTemplate Id=&amp;quot;Ribbon.Templates.ExtendedLarge&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;Layout Title=&amp;quot;Large&amp;quot; LayoutTitle=&amp;quot;Large&amp;quot;&amp;gt;&lt;br /&gt;              &amp;lt;Section Alignment=&amp;quot;Top&amp;quot; Type=&amp;quot;OneRow&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;Row&amp;gt;&lt;br /&gt;                  &amp;lt;ControlRef DisplayMode=&amp;quot;Large&amp;quot; TemplateAlias=&amp;quot;button1&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;/Row&amp;gt;&lt;br /&gt;              &amp;lt;/Section&amp;gt;&lt;br /&gt;            &amp;lt;/Layout&amp;gt;&lt;br /&gt;          &amp;lt;/GroupTemplate&amp;gt;&lt;br /&gt;        &amp;lt;/CommandUIDefinition&amp;gt;&lt;br /&gt;      &amp;lt;/CommandUIDefinitions&amp;gt;&lt;br /&gt;      &amp;lt;CommandUIHandlers&amp;gt;&lt;br /&gt;        &amp;lt;CommandUIHandler&lt;br /&gt;          Command=&amp;quot;Ribbon.Extended.SPC3.ShowIn&amp;quot;&lt;br /&gt;          CommandAction=&amp;quot;~site/_layouts/Com.CodePlex.SPC3/ShowIn.aspx?List={ListId}&amp;quot;&lt;br /&gt;          /&amp;gt;&lt;br /&gt;      &amp;lt;/CommandUIHandlers&amp;gt;&lt;br /&gt;    &amp;lt;/CommandUIExtension&amp;gt;&lt;br /&gt;  &amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-6261424014847981531?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/6261424014847981531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=6261424014847981531' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6261424014847981531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6261424014847981531'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2011/01/ribbon-customaction-on-all-lists.html' title='Ribbon CustomAction On All Lists'/><author><name>djeeg</name><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-23322135.post-6881421083496901544</id><published>2010-12-10T08:42:00.001+10:00</published><updated>2010-12-10T08:42:50.993+10:00</updated><title type='text'>ViewState problems with Sandbox Web Parts in SharePoint 2010</title><content type='html'>I have been playing around with developing sandbox web parts for SharePoint 2010 Foundation. With one particular web part, i had a form that was pretty large, over 300 fields. Initially i had no problems with the form loading and submitting. Gradually i started to convert some of the fields to dropdownlists, and databinding not insignificant datasets. At some point the form started to still display, but would not submit. I kept getting the generic error.&lt;br /&gt;&lt;br /&gt;Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.  &lt;br /&gt;&lt;br /&gt;My first attempt to solve this, was to locate the error. I try/catched all of the UI events. Strangely the exception was not being caught. Odd. Next i tried disabling sections of logic in web part and found that if i disabled the databind logic, i got no error. I figured it must have been one of the datasets causing an issue (but really that was a wrong assumption now that i know the true cause). So I continued on. I had to spend a while finding which dropdown sets were causing the problem, but i did narrow it down to one dataset, which also happened to be the largest. Hmm the largest, i had a feeling it might have something to do with a httppost max size at this point. So i reduced the dataset to only 50 records. Sure enough the error went away. With a few tests and page view sources, i found that the error would happen when the form size went over 128KB no matter what dataset had the largest amount of records.&lt;br /&gt;&lt;br /&gt;I then decided to look at the ULS logs (which i probably should have done first) and had this error trace&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;SPUCWorkerProcess.exe (0x165C)           0x1744 SharePoint Foundation          Sandboxed Code Service         fe8s Medium    -  - Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. - userCodeWrapperType = "Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper", userAssemblyGroupId = "E8C0D7A9294B4BCCB63757BF4AB4BC47-UCftMMyPOXDR6ibqgsTcXIE7gh71nqlnnuite7AdBB8=", siteCollectionId = "c02189c4-1dea-4969-b2b8-8240dfe4ef65" - Inner Exception: Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---&gt; Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: Value cannot be null.  Parameter name: path1     at System.IO.Path.Combine(String path1, String path2)     at System.Web.HttpRawUploadedContent.TempFile..ctor()     at System.Web.HttpR...  &lt;br /&gt;SPUCWorkerProcess.exe (0x165C)           0x1744 SharePoint Foundation          Sandboxed Code Service         fe8s Medium   ...awUploadedContent.AddBytes(Byte[] data, Int32 offset, Int32 length)     at System.Web.HttpRequest.GetEntireRawContent()     at System.Web.HttpRequest.FillInFormCollection()     at System.Web.HttpRequest.get_Form()     at System.Web.HttpRequest.get_HasForm()     at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)     at System.Web.UI.Page.DeterminePostBackMode()     at Microsoft.SharePoint.UserCode.SPUserCodePage.DeterminePostBackMode()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     --- End of inner exception stack trace ---    Server stack trace:      at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean inc...  &lt;br /&gt;SPUCWorkerProcess.exe (0x165C)           0x1744 SharePoint Foundation          Sandboxed Code Service         fe8s Medium   ...ludeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.ExecuteHttpRequest(SPUserCodeWebPartHttpRequestContext webPartExecutionContext, SPUserCodeWebPartHttpResponse httpRequestResponse)     at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContext executionContext)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.ExecuteWrapper(SPUserCodeWrapper wrapper, SPUserCodeExecutionContext executionContext)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage...  &lt;br /&gt;SPUCWorkerProcess.exe (0x165C)           0x1744 SharePoint Foundation          Sandboxed Code Service         fe8s Medium   ...(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)     at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)     at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData&amp; msgData)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.CodeToExecuteWrapper.EndInvoke(IAsyncResult result)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyO...  &lt;br /&gt;SPUCWorkerProcess.exe (0x165C)           0x1744 SharePoint Foundation          Sandboxed Code Service         fe8s Medium   ...perationToken, SPUserCodeExecutionContext executionContext)  &lt;br /&gt;SPUCHostService.exe (0x12E4)             0x14CC SharePoint Foundation          Sandboxed Code Service         fe3r Medium    -  - Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. - Monitored process "ipc://f28fa0e5-d648-4c74-a67f-4ae8dc6f1856:7000" has encountered an unhandled exception while executing user code. - Inner Exception: Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---&gt; Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: Value cannot be null.  Parameter name: path1     at System.IO.Path.Combine(String path1, String path2)     at System.Web.HttpRawUploadedContent.TempFile..ctor()     at System.Web.HttpRawUploadedContent.AddBytes(Byte[] data, Int32 offset, Int32 length)     at System.Web.HttpRequest.GetEntire...  &lt;br /&gt;SPUCHostService.exe (0x12E4)             0x14CC SharePoint Foundation          Sandboxed Code Service         fe3r Medium   ...RawContent()     at System.Web.HttpRequest.FillInFormCollection()     at System.Web.HttpRequest.get_Form()     at System.Web.HttpRequest.get_HasForm()     at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)     at System.Web.UI.Page.DeterminePostBackMode()     at Microsoft.SharePoint.UserCode.SPUserCodePage.DeterminePostBackMode()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     --- End of inner exception stack trace ---    Server stack trace:      at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, ...  &lt;br /&gt;SPUCHostService.exe (0x12E4)             0x14CC SharePoint Foundation          Sandboxed Code Service         fe3r Medium   ...Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.ExecuteHttpRequest(SPUserCodeWebPartHttpRequestContext webPartExecutionContext, SPUserCodeWebPartHttpResponse httpRequestResponse)     at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContext executionContext)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.ExecuteWrapper(SPUserCodeWrapper wrapper, SPUserCodeExecutionContext executionContext)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)   ...  &lt;br /&gt;SPUCHostService.exe (0x12E4)             0x14CC SharePoint Foundation          Sandboxed Code Service         fe3r Medium   ...  at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)     at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData&amp; msgData)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.CodeToExecuteWrapper.EndInvoke(IAsyncResult result)     at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext)  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The key text being&lt;br /&gt;&lt;br /&gt;Value cannot be null.  &lt;br /&gt;Parameter name: path1     &lt;br /&gt;at System.IO.Path.Combine(String path1, String path2)     &lt;br /&gt;at System.Web.HttpRawUploadedContent.TempFile..ctor()&lt;br /&gt;&lt;br /&gt;I have seen something like this before, when trying to use file uploads in a sandbox web part. Basically the HTTP object in the SPUCWorkerProcess is not fully functional. You can see how the process works from here http://msdn.microsoft.com/en-us/library/ff798382.aspx. So what was this error telling me, and how did it relate to the 128KB limit i was seeing? I had a guess that at this limit, the http object stopped buffering the request in memory and started writing it to a temporary file on disk. Took a few google searchs to find the appropriate key to set to increase this limit http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestlengthdiskthreshold.aspx. I set this on the sharepoint vss web.config. But this didnt fix the problem.&lt;br /&gt;&lt;br /&gt;Both of the sandbox processes are well ... processes. SPUCHostService.exe/SPUCHostService.exe. I doubted that they would have httpRuntime settings i could change. But i went to the folder to see. Inside the folder i found an extra web.config (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\UserCode\web.config), maybe i could use that. I added &lt;httpRuntime maxRequestLength="51200" requestLengthDiskThreshold="500000" /&gt; and tried again. To my surprise it fixed the problem.&lt;br /&gt;&lt;br /&gt;Well it fixed the problem for my local machine, too bad that solution would not work on a hosting provider. There would be little chance they would change their UserCode settings for me. My next question was, why was so much data being sent the to sandbox process in the first place. Remember this only happens when the form is submitted. I took a guess that it was related to the viewstate, so tried disabling that, and bingo the problem went away. It does mean though that i'm going to have to manually deal with the postback binds, but at least the form is not crashing now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-6881421083496901544?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/6881421083496901544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=6881421083496901544' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6881421083496901544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6881421083496901544'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/12/viewstate-problems-with-sandbox-web.html' title='ViewState problems with Sandbox Web Parts in SharePoint 2010'/><author><name>djeeg</name><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-23322135.post-6949315935984520934</id><published>2010-11-19T18:51:00.000+10:00</published><updated>2010-11-19T18:52:23.615+10:00</updated><title type='text'>SharePoint Client Model from Powershell</title><content type='html'>I have seen a few people attempt to use the client access model from powershell, but they have mostly failed. The reason being, powershell does not allow extension methods. You can get most of the way, but when you try to call Load() or ExecuteQuery() it fails. I really like being able to do things in powershell scripts, as they are super easy to edit/change when you need. Surely i could get the client model to work from scripts.&lt;br /&gt;&lt;br /&gt;I knew that powershell allows you compile and execute c# inline, hopefully i could use that feature. It was pretty easy to throw together a test, as it was just c# i was using.&lt;br /&gt;&lt;br /&gt;The next problem i encountered; was powershell not loading the client access assemblies. No matter what i tried, i could only get powershell to load them IF the dlls were in the same directory as the powershell executable. Well for me that is not an ideal solution, i like to be able to copy a directory somewhere, and it just works.&lt;br /&gt;&lt;br /&gt;What i found was a way you can override the powershell assembly loading &lt;br /&gt;http://stackoverflow.com/questions/2664028/how-can-i-get-powershell-added-types-to-use-added-types&lt;br /&gt;&lt;br /&gt;Then it was just a matter of intergrating it with the rest of the script.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;Add-Type -Language CSharpVersion3 -TypeDefinition @' &lt;br /&gt;using System; &lt;br /&gt;using System.Collections.Generic; &lt;br /&gt;using System.IO; &lt;br /&gt;using System.Reflection; &lt;br /&gt;namespace Internal.Powershell { &lt;br /&gt;    public static class AssemblyResolver { &lt;br /&gt;        private static Dictionary&amp;lt;string, string&amp;gt; _assemblies = new Dictionary&amp;lt;string,string&amp;gt;(StringComparer.CurrentCultureIgnoreCase);&lt;br /&gt;        static AssemblyResolver() { &lt;br /&gt;            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(delegate(object sender,  ResolveEventArgs args) {&lt;br /&gt;                var assemblyName = new AssemblyName(args.Name); &lt;br /&gt;                if (_assemblies.ContainsKey(assemblyName.Name)) { &lt;br /&gt;                    return Assembly.LoadFrom(_assemblies[assemblyName.Name]); &lt;br /&gt;                } &lt;br /&gt;                return null; &lt;br /&gt;            }); &lt;br /&gt;        } &lt;br /&gt;        public static void AddAssemblyLocation(string path) { &lt;br /&gt;            _assemblies.Add(Path.GetFileNameWithoutExtension(path), path); &lt;br /&gt;        } &lt;br /&gt;    } &lt;br /&gt;} &lt;br /&gt;'@ &lt;br /&gt;[Internal.Powershell.AssemblyResolver]::AddAssemblyLocation(&amp;quot;..\..\lib\Microsoft.SharePoint.Client.Runtime.dll&amp;quot;) &lt;br /&gt;[Internal.Powershell.AssemblyResolver]::AddAssemblyLocation(&amp;quot;..\..\lib\Microsoft.SharePoint.Client.dll&amp;quot;) &lt;br /&gt;&lt;br /&gt;$ReferencedAssemblies = @( &lt;br /&gt;    &amp;quot;Microsoft.SharePoint.Client.Runtime&amp;quot;,&lt;br /&gt;    &amp;quot;Microsoft.SharePoint.Client&amp;quot;&lt;br /&gt;) &lt;br /&gt;$TypeDefinition = @&amp;quot; &lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Net;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Text;&lt;br /&gt;using Microsoft.SharePoint.Client;&lt;br /&gt;namespace Internal.Powershell {&lt;br /&gt;    public static class SharePointClient {&lt;br /&gt;        public static void Main() {&lt;br /&gt;            using (ClientContext client = new ClientContext(&amp;quot;http://url&amp;quot;)) {&lt;br /&gt;                client.AuthenticationMode = ClientAuthenticationMode.Default;&lt;br /&gt;                client.Credentials = new NetworkCredential(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, &amp;quot;domain&amp;quot;);            &lt;br /&gt;                var web = client.Web;&lt;br /&gt;                client.Load(web,&lt;br /&gt;                        item =&amp;gt; item.Title,&lt;br /&gt;                        item =&amp;gt; item.Description);&lt;br /&gt;                client.ExecuteQuery();&lt;br /&gt;                Console.WriteLine(web.Title);&lt;br /&gt;                Console.WriteLine(web.Description);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;} &lt;br /&gt;&amp;quot;@ &lt;br /&gt;Add-Type -ReferencedAssemblies $ReferencedAssemblies -TypeDefinition $TypeDefinition -Language CSharpVersion3&lt;br /&gt;[Internal.Powershell.SharePointClient]::Main()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-6949315935984520934?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/6949315935984520934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=6949315935984520934' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6949315935984520934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6949315935984520934'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/11/sharepoint-client-model-from-powershell.html' title='SharePoint Client Model from Powershell'/><author><name>djeeg</name><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-23322135.post-6062620746317818824</id><published>2010-11-18T21:05:00.002+10:00</published><updated>2010-11-18T21:07:37.956+10:00</updated><title type='text'>SharePoint 2010 Team Site All Features</title><content type='html'>I needed to duplicate a Team Site definition, including all the feature staplings, posting it here in case anyone needs it&lt;br /&gt;&lt;br /&gt;Team Site (STS#0) Features&lt;br /&gt;&lt;br /&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates\sts\xml\ONET.XML&lt;br /&gt;&lt;br /&gt;BasicWebParts&lt;br /&gt;Three-state Workflow Feature&lt;br /&gt;TeamCollab&lt;br /&gt;MobilityRedirect&lt;br /&gt;WikiPageHomePage&lt;br /&gt;&lt;br /&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\BaseSiteStapling\basesitestapling.xml&lt;br /&gt;&lt;br /&gt;BaseSite&lt;br /&gt;-LocalSiteDirectoryControl&lt;br /&gt;-PortalsLayouts&lt;br /&gt;-WebPartAdderGroups&lt;br /&gt;    ReceiverAssembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"&lt;br /&gt;    ReceiverClass="Microsoft.SharePoint.Portal.SPSWebPartAdderFeatureReceiver"&lt;br /&gt;-DocumentRoutingResources&lt;br /&gt;-RecordResources&lt;br /&gt;BaseWeb&lt;br /&gt;-RelatedLinksScopeSettingsLink&lt;br /&gt;-SlideLibrary&lt;br /&gt;AssetLibrary&lt;br /&gt;EnchancedTheming&lt;br /&gt;Reporting&lt;br /&gt;LocationBasedPolicy&lt;br /&gt;MetaDataNav&lt;br /&gt;Rating&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-6062620746317818824?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/6062620746317818824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=6062620746317818824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6062620746317818824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6062620746317818824'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/11/sharepoint-2010-team-site-all-features.html' title='SharePoint 2010 Team Site All Features'/><author><name>djeeg</name><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-23322135.post-7361374862153721326</id><published>2010-11-18T20:59:00.004+10:00</published><updated>2010-11-18T21:04:39.964+10:00</updated><title type='text'>Page.ParseControl with SharePoint Sandbox</title><content type='html'>There are many posts explaining that you cannot use visual web parts with the sharepoint sandbox. So this means you have to build your controls by hand, which is not that fun. Thinking I was smart, I tried to use the Page.LoadControl method to parse a string of controls. This way i could author the html easily.&lt;br /&gt;&lt;br /&gt;Turns out though, that doesn't work. You get this error message in your webpart.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_QZosR4Y5h9Y/TOUHpaeNLQI/AAAAAAAAAIo/g0yf9_77LHo/s1600/error1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 249px;" src="http://2.bp.blogspot.com/_QZosR4Y5h9Y/TOUHpaeNLQI/AAAAAAAAAIo/g0yf9_77LHo/s400/error1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5540843324611308802" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;System.ArguementNullException: Value cannot be null. Parameter name: virtualPath at System.Web.VirtualPath.Create()&lt;br /&gt;&lt;br /&gt;Which basically means that the process that executes the sandbox code is not a full ASP.NET pipeline, or doesn't have all the context/access object it needs. This is probably as security feature too.&lt;br /&gt;&lt;br /&gt;Oh well, back to coding the control tree by hand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-7361374862153721326?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/7361374862153721326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=7361374862153721326' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7361374862153721326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7361374862153721326'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/11/pageparsecontrol-with-sharepoint.html' title='Page.ParseControl with SharePoint Sandbox'/><author><name>djeeg</name><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://2.bp.blogspot.com/_QZosR4Y5h9Y/TOUHpaeNLQI/AAAAAAAAAIo/g0yf9_77LHo/s72-c/error1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-3976851838452369027</id><published>2010-11-18T20:45:00.008+10:00</published><updated>2010-11-18T20:58:56.266+10:00</updated><title type='text'>Package SharePoint Project without SharePoint</title><content type='html'>For my current project, i was required to develop a sandbox web part. Normally i would just develop it in visual studio in my sharepoint vm. Working in the sharepoint vm though is not that fun, it can't use your local computer's full resources. Visual studio seems to lag when IIS takes all the memory.&lt;br /&gt;&lt;br /&gt;The process I was using was:&lt;br /&gt;1. Compile in VS&lt;br /&gt;2. Package in VS&lt;br /&gt;3. De-activate in Browser&lt;br /&gt;4. Upload in Browser&lt;br /&gt;5. Activate in Browser&lt;br /&gt;6. Test in Browser&lt;br /&gt;&lt;br /&gt;It would work a whole lot better if I could do that locally. If it was possible. With MOSS 2007 you could not open the sharepoint project on a machine without sharepoint, basically because vseex would not install. But now you can, as you can deploy the sharepoint components to a machine that does not have sharepoint installed.&lt;br /&gt;&lt;br /&gt;When i tried to package initially though, it failed with a generic package failed error&lt;br /&gt;&lt;br /&gt;By chance i figured out that if you delete the csproject.user file, visual studio 2010 will package the sharepoint wsp. When you dont have a csproject.user opening the project will show this error, which is what you want.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QZosR4Y5h9Y/TOUGFKHxVzI/AAAAAAAAAIg/X3HuN5M_v7w/s1600/error.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 62px;" src="http://1.bp.blogspot.com/_QZosR4Y5h9Y/TOUGFKHxVzI/AAAAAAAAAIg/X3HuN5M_v7w/s400/error.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5540841602235324210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Site URL property of the project has not been set. In the Properties window, enter the URL for the local SharePoint server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-3976851838452369027?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/3976851838452369027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=3976851838452369027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/3976851838452369027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/3976851838452369027'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/11/package-sharepoint-project-without.html' title='Package SharePoint Project without SharePoint'/><author><name>djeeg</name><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://1.bp.blogspot.com/_QZosR4Y5h9Y/TOUGFKHxVzI/AAAAAAAAAIg/X3HuN5M_v7w/s72-c/error.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-6847166553943731066</id><published>2010-11-07T13:32:00.001+10:00</published><updated>2010-11-07T13:34:29.046+10:00</updated><title type='text'>SharePoint Designer Custom Action in Dialog</title><content type='html'>SharePoint designer has a great way to create custom actions. There are many help posts out there on how to do that.&lt;br /&gt;http://blog.furuknap.net/adding-custom-actions-in-sharepoint-designer-2010&lt;br /&gt;You have three options to select "Navigate to form", "Initiate workflow" and "Navigate to URL"&lt;br /&gt;The trouble with these actions and options (well the ones on the View Ribbon) is that they do not open in the dialog box&lt;br /&gt;&lt;br /&gt;There a heaps more posts on creating custom actions that open in dialogs&lt;br /&gt;http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx&lt;br /&gt;http://www.vinodunny.com/blog/post/Application-Page-Ribbon-Dialogs-on-SharePoint-2010.aspx&lt;br /&gt;http://jomit.blogspot.com/2009/12/dialog-platform-in-sharepoint-2010-how.html&lt;br /&gt;&lt;br /&gt;The problem with those though, is that the action must be defined before hand.&lt;br /&gt;I really like how sharepoint designer allows you to configure the url on the fly.&lt;br /&gt;There must be a way to combine the two ways.&lt;br /&gt;&lt;br /&gt;I was hoping that the "Navigate to URL" option would be a href.&lt;br /&gt;So i tried a simple javascript:alert("hi") for an action.&lt;br /&gt;Sure enough i got an alert box.&lt;br /&gt;From there it was just a matter of figuring out the showModalDialog command, and putting it on one line.&lt;br /&gt;&lt;br /&gt;This action is great to use with the StartWorkflow component http://spc3.codeplex.com/&lt;br /&gt;&lt;br /&gt;For View Ribbon actions&lt;br /&gt;javascript:SP.UI.ModalDialog.showModalDialog({url:"{SiteUrl}/_layouts/Com.CodePlex.SPC3/StartWorkflow.aspx?List={ListId}&amp;ItemID={SelectedItemId}&amp;Workflow=WorkflowName",dialogReturnValueCallback: function(dialogResult, returnValue) { SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK) }})&lt;br /&gt;&lt;br /&gt;And for Display Form Ribbon actions&lt;br /&gt;{SiteUrl}/_layouts/Com.CodePlex.SPC3/StartWorkflow.aspx?List={ListId}&amp;ItemID={ItemId}&amp;Workflow=WorkflowName&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-6847166553943731066?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/6847166553943731066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=6847166553943731066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6847166553943731066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/6847166553943731066'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/11/sharepoint-designer-custom-action-in.html' title='SharePoint Designer Custom Action in Dialog'/><author><name>djeeg</name><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-23322135.post-4230735311666033280</id><published>2010-10-27T19:11:00.002+10:00</published><updated>2010-10-27T19:13:54.615+10:00</updated><title type='text'>DateTime filter in SharePoint 2010 List View</title><content type='html'>The way i got around this, was to pipe the result from the DateTimeControl to a HiddenField using inline code.&lt;br /&gt;&lt;br /&gt;Added these controls&lt;br /&gt;&lt; SharePoint:DateTimeControl runat="server" id="FilterFrom" DateOnly="True" LocaleId="3081" SelectedDate="2010-10-01"/&gt;&lt;br /&gt;&lt; asp:HiddenField runat="server" id="FilterFromFixed" /&gt;&lt;br /&gt;&lt;br /&gt;Had this query&lt;br /&gt;&lt; Where&gt;&lt;br /&gt;                &lt; Geq&gt;&lt;br /&gt;                                &lt; FieldRef Name="FirstDay"/&gt;&lt;br /&gt;                                &lt; Value Type="DateTime"&gt;{FilterFromFixed}&lt; /Value&gt;&lt;br /&gt;                &lt; /Geq&gt;&lt;br /&gt;&lt; /Where&gt;&lt;br /&gt;&lt;br /&gt;Added this to web.config&lt;br /&gt;&lt; PageParserPath VirtualPath="/Lists/YourList/YourView.aspx" CompilationMode="Always" AllowServerSideScript="true" /&gt;&lt;br /&gt;&lt;br /&gt;Then had this inline code in the view&lt;br /&gt;&lt; script runat="server"&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e) { &lt;br /&gt;                FilterFromFixed.Value = FilterFrom.SelectedDate.ToString("yyyy-MM-dd");&lt;br /&gt;}&lt;br /&gt;&lt; /script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-4230735311666033280?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/4230735311666033280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=4230735311666033280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/4230735311666033280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/4230735311666033280'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/10/datetime-filter-in-sharepoint-2010-list.html' title='DateTime filter in SharePoint 2010 List View'/><author><name>djeeg</name><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-23322135.post-7563754780446960186</id><published>2010-07-29T19:54:00.007+10:00</published><updated>2010-07-30T00:46:47.421+10:00</updated><title type='text'>Projected Fields with User Profile Properties in Sharepoint 2010</title><content type='html'>In SharePoint 2007, there was one list customization I had to do more than any other. A stakeholder would have a custom list, with a user field, and they would more often then not, want some profile fields to display in the list. So that they could filter the items by those profile fields. Things like State, or Office Location.&lt;br /&gt;&lt;br /&gt;What i eventually had to do in SharePoint 2007, was kind of hacky, and really annoying to implement. Say if the user wanted the Office to be displayed in each row, i would create the Office field in the list definition as a Person field. Then make an event receiver, that on ItemAdding, would update the Office field to be the same user in the normal Person field, but instead of displaying the Name, i would display the user profile field that the stakeholder wanted.&lt;br /&gt;&lt;br /&gt;So with multiple columns, i would end up with something like this:&lt;br /&gt;&lt;br /&gt;[image]&lt;br /&gt;&lt;br /&gt;But with SharePoint 2010 this problem goes away. Enter list joins and projected fields. What this allows is having one list, and showing value from a joined list. Things did not go as smoothly as i hoped though.&lt;br /&gt;&lt;br /&gt;So i went into the column create screens and cycled through the different field types. I was disappointed that the person field did not have what i wanted. Only the lookup field type had the projected fields. Well i could live with that, but it would not be the ideal solution. Because you would not be able to make use of the people picker, it would just be a very large dropdown.&lt;br /&gt;&lt;br /&gt;But when i went to assign the lookup table to the hidden "User Information List", well, it was hidden. This list if you dont know, holds a copy of the user profile fields marked as replicatable. Sharepoint takes care of keeping it in sync with the values in the SSP or Application Service.&lt;br /&gt;&lt;br /&gt;I suspected that while it was hidden, i could still make the join, just not through the interface. So i went hunting from some scripts, preferably powershell to create this projected fields. I found them on msdn, and it looked pretty straight forward. It got me thinking.&lt;br /&gt;&lt;br /&gt;Hang on though, a person field is just a lookup field, so i could go back to my orignial plan of joining the custom list to the "User Information List", but using a Person field instead of a lookup.&lt;br /&gt;&lt;br /&gt;To my shock, everything work out as i had hoped for since the start. Effectively i have reduced a days work of hassle and deployment, to a few lines of powershell.&lt;br /&gt;&lt;br /&gt;Scripts and screen shots to come later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-7563754780446960186?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/7563754780446960186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=7563754780446960186' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7563754780446960186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7563754780446960186'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2010/07/projected-fields-with-user-profile.html' title='Projected Fields with User Profile Properties in Sharepoint 2010'/><author><name>djeeg</name><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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-7462427770994927986</id><published>2007-09-13T12:36:00.000+10:00</published><updated>2007-09-13T15:21:11.115+10:00</updated><title type='text'>Enabled / Disable Network Adapter with Powershell</title><content type='html'>&lt;div&gt;All i wanted to do was enable a network connection using powershell.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;But unfortunately the easy way only works on Vista, and i needed it in  Windows Server 2003. &lt;a href="http://blogs.msdn.com/daiken/archive/2007/02/09/enable-disable-network-connection.aspx"&gt;http://blogs.msdn.com/daiken/archive/2007/02/09/enable-disable-network-connection.aspx&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br /&gt;I had to go digging around for how you used to have to enable the  connection with wsf. &lt;a href="http://mcpmag.com/columns/article.asp?EditorialsID=619"&gt;http://mcpmag.com/columns/article.asp?EditorialsID=619&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br /&gt;And then converted it into something i could use in powershell.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;$shell = New-Object -comObject Shell.Application&lt;br /&gt;((($shell.NameSpace(3).Items() | where {$_.Name -eq "Network  Connections"}).GetFolder.Items() | where {$_.Name -eq "Local Area  Connection"}).Verbs() | where {$_.Name -eq "En&amp;able"}).DoIt()&lt;/div&gt; &lt;div&gt;&lt;br /&gt;And to disable.&lt;br /&gt;&lt;br /&gt;$shell = New-Object -comObject Shell.Application&lt;br /&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;((($shell.NameSpace(3).Items() | where {$_.Name -eq "Network  Connections"}).GetFolder.Items() | where {$_.Name -eq "Local Area  Connection"}).Verbs() | where {$_.Name -eq "Disa&amp;amp;ble"}).DoIt()&lt;/div&gt; &lt;div&gt;&lt;br /&gt;At must have had at least 30 tabs open in my browser by the time i got  this to work.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-7462427770994927986?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/7462427770994927986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=7462427770994927986' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7462427770994927986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/7462427770994927986'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2007/09/enabled-disable-network-adapter-with.html' title='Enabled / Disable Network Adapter with Powershell'/><author><name>djeeg</name><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>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-116653147172308588</id><published>2006-12-19T22:30:00.000+10:00</published><updated>2006-12-19T22:31:11.886+10:00</updated><title type='text'>Users Changing ASP.NET Theme</title><content type='html'>Man i really like codeproject, its articles are awesome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653147172308588?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.codeproject.com/useritems/dynamicThemes.asp' title='Users Changing ASP.NET Theme'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653147172308588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653147172308588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653147172308588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653147172308588'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/users-changing-aspnet-theme.html' title='Users Changing ASP.NET Theme'/><author><name>djeeg</name><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-23322135.post-116653138132854595</id><published>2006-12-19T22:27:00.000+10:00</published><updated>2006-12-19T22:29:41.866+10:00</updated><title type='text'>Is DTS dead?</title><content type='html'>I was writting some scripts to move/copy databases for my releasing program for mssql 2000, but then couldnt find that many up-to-date resources. It seems there is a new tool for 2005 called SSIS.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms141026.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms141026.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But i did find some links about how to create a basic DTS file, possibly that could be run from the command line.&lt;br /&gt;&lt;a href="http://www.15seconds.com/Issue/030909.htm"&gt;http://www.15seconds.com/Issue/030909.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And then what files i would need on the running server&lt;br /&gt;&lt;a href="http://www.sqldts.com/default.aspx?225"&gt;http://www.sqldts.com/default.aspx?225&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653138132854595?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653138132854595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653138132854595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653138132854595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653138132854595'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/is-dts-dead.html' title='Is DTS dead?'/><author><name>djeeg</name><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-23322135.post-116653122841005715</id><published>2006-12-19T22:25:00.000+10:00</published><updated>2006-12-19T22:27:08.530+10:00</updated><title type='text'>Webservice Envelope Validation</title><content type='html'>How do you do that, this article explains.&lt;br /&gt;&lt;br /&gt;I have got a extension that just logs soap packets, so its not too hard to plug the validator into that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653122841005715?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn.microsoft.com/msdnmag/issues/03/07/xmlschemavalidation/default.aspx' title='Webservice Envelope Validation'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653122841005715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653122841005715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653122841005715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653122841005715'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/webservice-envelope-validation.html' title='Webservice Envelope Validation'/><author><name>djeeg</name><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-23322135.post-116653078542610613</id><published>2006-12-19T22:18:00.000+10:00</published><updated>2006-12-19T22:19:45.560+10:00</updated><title type='text'>ASP.NET 1.1 and 2.0 Working Together</title><content type='html'>Is this possible on a shared provider, i dont think so, but its good for self managed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653078542610613?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://codebetter.com/blogs/peter.van.ooijen/archive/2006/06/23/146738.aspx' title='ASP.NET 1.1 and 2.0 Working Together'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653078542610613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653078542610613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653078542610613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653078542610613'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/aspnet-11-and-20-working-together.html' title='ASP.NET 1.1 and 2.0 Working Together'/><author><name>djeeg</name><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-23322135.post-116653062431717058</id><published>2006-12-19T22:12:00.000+10:00</published><updated>2006-12-19T22:17:05.630+10:00</updated><title type='text'>SVN Externals No Good</title><content type='html'>After much work using svn externals for internal class libraries i have come to the realisation that they should not be used for this.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.brunningonline.net/simon/blog/archives/002031.html"&gt;http://www.brunningonline.net/simon/blog/archives/002031.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://svn.haxx.se/dev/archive-2003-07/1617.shtml"&gt;http://svn.haxx.se/dev/archive-2003-07/1617.shtml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A few other people tend to agree, or have found the smae problems that i have.&lt;br /&gt;Its just a nightmare to try and manage them.&lt;br /&gt;I'm actually starting to think that no software configuration information should be stored in the svn repository and that should be maintain by an outside program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653062431717058?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653062431717058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653062431717058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653062431717058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653062431717058'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/svn-externals-no-good.html' title='SVN Externals No Good'/><author><name>djeeg</name><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-23322135.post-116653027084905638</id><published>2006-12-19T22:10:00.000+10:00</published><updated>2006-12-19T22:11:10.983+10:00</updated><title type='text'>More Automated Software Process</title><content type='html'>I have been using cc.net for a while and its great, but then when i want to do more things, like scripted releases / packages / branching, i dont have a complete tool.&lt;br /&gt;There is maven and lunt build, but both are written in java. And i think they are more similar to cc.net then the linked tool.&lt;br /&gt;If i can't find one written in .net, i might have to build one. A little bit of effort here saves both time and hassel in the future thats for sure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653027084905638?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://open.controltier.com/index.html' title='More Automated Software Process'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653027084905638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653027084905638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653027084905638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653027084905638'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/more-automated-software-process.html' title='More Automated Software Process'/><author><name>djeeg</name><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-23322135.post-116653004038380588</id><published>2006-12-19T22:06:00.000+10:00</published><updated>2006-12-19T22:07:21.150+10:00</updated><title type='text'>Server backgrounds</title><content type='html'>You know how you can have the windows build number and OS version appear on your desktop with a reg setting, what do you do if you want more details. You use this tool, it is awesome on servers where you can then just look at the desktop to see what machine you have connected to. Especially when you are connected to more than one at a time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116653004038380588?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.kewlit.com/whoami/' title='Server backgrounds'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116653004038380588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116653004038380588' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653004038380588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116653004038380588'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/server-backgrounds.html' title='Server backgrounds'/><author><name>djeeg</name><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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-116652985211252678</id><published>2006-12-19T22:00:00.000+10:00</published><updated>2006-12-19T22:04:47.323+10:00</updated><title type='text'>SQL XML Not Required</title><content type='html'>I was under the impression that you had to have the sqlxml component installed to use the feature where xml is returned from a t-sql query. I was using the connection string like this:&lt;br /&gt;&lt;br /&gt;var objConn = new ActiveXObject("ADODB.Connection");&lt;br /&gt;//Provider=SQLXMLOLEDB.3.0;Data Provider=SQLOLEDB&lt;br /&gt;var objComm = new ActiveXObject("ADODB.Command")&lt;br /&gt;objComm.ActiveConnection = objConn&lt;br /&gt;objComm.CommandText = tSQL&lt;br /&gt;var objStream = new ActiveXObject("ADODB.Stream")&lt;br /&gt;objStream.Open()&lt;br /&gt;objComm.Properties("Output Stream") = objStream&lt;br /&gt;objComm.Execute(null, null, 0x400)&lt;br /&gt;objStream.Position = 0&lt;br /&gt;&lt;br /&gt;This turns out not to be the case, you can use this as the connection string:&lt;br /&gt;//Provider=SQLOLEDB;Data Provider=SQLOLEDB&lt;br /&gt;And then you dont need to install the extra component, good for shared hosting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116652985211252678?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn2.microsoft.com/en-gb/library/ms171948.aspx' title='SQL XML Not Required'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116652985211252678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116652985211252678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116652985211252678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116652985211252678'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/sql-xml-not-required.html' title='SQL XML Not Required'/><author><name>djeeg</name><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-23322135.post-116652961917350905</id><published>2006-12-19T21:52:00.000+10:00</published><updated>2006-12-19T22:00:21.446+10:00</updated><title type='text'>Handling Nulls in Webservices</title><content type='html'>I think i will start using this blog to remember what i have learn and so i can always come back to it if i forget about it.&lt;br /&gt;&lt;br /&gt;So this was where if nulls are passed into a .net 2.0 webservice, then the elements are removed from the soap envelope that is sent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116652961917350905?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://geekswithblogs.net/gaijin42/articles/57335.aspx' title='Handling Nulls in Webservices'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116652961917350905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116652961917350905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116652961917350905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116652961917350905'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/12/handling-nulls-in-webservices.html' title='Handling Nulls in Webservices'/><author><name>djeeg</name><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-23322135.post-116030280112528343</id><published>2006-10-08T20:16:00.000+10:00</published><updated>2006-10-08T20:20:03.363+10:00</updated><title type='text'>Accessing Session in HttpApplication</title><content type='html'>&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;This is an interesting thing, when trying to access the Session object in your global class like this:&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:teal;"&gt;global&lt;/span&gt; : System.Web.&lt;span style="color:teal;"&gt;HttpApplication&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;br /&gt; &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;void&lt;/span&gt; Application_PreRequestHandlerExecute(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, &lt;span style="color:teal;"&gt;EventArgs&lt;/span&gt; e) {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;if&lt;/span&gt;(User.Identity.IsAuthenticated) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt;(Session != &lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt;(Context.Session != &lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;The first access to the Session throws this exception:&lt;/p&gt;&lt;p&gt;Session state is not available in this context.&lt;/p&gt;&lt;p&gt;But the second one succeeds, i assume that they would both be accessing the same underlying object. Weird.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-116030280112528343?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/116030280112528343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=116030280112528343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116030280112528343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/116030280112528343'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/10/accessing-session-in-httpapplication.html' title='Accessing Session in HttpApplication'/><author><name>djeeg</name><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-23322135.post-115935464026407491</id><published>2006-09-27T20:55:00.000+10:00</published><updated>2006-10-26T02:10:58.610+10:00</updated><title type='text'>Spring.Net Schema</title><content type='html'>Its easy to get intellisense for your spring object files, as resources, by copying the spring-objects.xsd file into %ProgramFiles%\Microsoft Visual Studio 8\XML\Schemas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115935464026407491?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/astebner/archive/2005/12/07/501466.aspx' title='Spring.Net Schema'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115935464026407491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115935464026407491' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115935464026407491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115935464026407491'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/springnet-schema.html' title='Spring.Net Schema'/><author><name>djeeg</name><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-23322135.post-115917847077952883</id><published>2006-09-25T19:53:00.000+10:00</published><updated>2006-09-25T20:01:10.906+10:00</updated><title type='text'>Mem Usage vs VM Size</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/7417/2386/1600/untitled.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/7417/2386/320/untitled.jpg" border="0" /&gt;&lt;/a&gt; When viewing my task manager, I always make sure that the VM Size column is turned on. This shows the actual memory footprint that the process has, rather than what is currently taken. For instance, if you minimise an application, usually the Mem Usage column will drop, but the VM Size doesnt. Though it didnt matter with my memory leak program, both the numbers filled all my available ram.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115917847077952883?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115917847077952883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115917847077952883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917847077952883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917847077952883'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/mem-usage-vs-vm-size.html' title='Mem Usage vs VM Size'/><author><name>djeeg</name><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-23322135.post-115917798689277590</id><published>2006-09-25T19:50:00.000+10:00</published><updated>2006-09-25T19:53:06.996+10:00</updated><title type='text'>Design Time Master Page</title><content type='html'>Robin provides a neat solution to design time masterpage pattern. Although Server.Transfer and Server.Redirect wont work, but that should be fixed in IIS 7.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115917798689277590?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.robincurry.org/blog/ASPNET20FixingProblemsWithNestedMasterPagesAndConfigDeclaredMasterPagesAtDesignTime.aspx' title='Design Time Master Page'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115917798689277590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115917798689277590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917798689277590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917798689277590'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/design-time-master-page.html' title='Design Time Master Page'/><author><name>djeeg</name><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-23322135.post-115917770113296573</id><published>2006-09-25T19:42:00.000+10:00</published><updated>2006-09-25T19:48:21.390+10:00</updated><title type='text'>GC.Collect not the solution</title><content type='html'>&lt;p&gt;Many times i have come to situations where the memory usage in my program spirals out of control. Always i think it is a problem with anything but my program. I test the cleanups of the 3rd party libraries, and every other little thing. Then i resort to put GC.Collect statements around, thinky that it will magically free memory.&lt;br /&gt;GC.Collect();&lt;br /&gt;GC.WaitForPendingFinalizers();&lt;br /&gt;GC.Collect(); &lt;/p&gt;&lt;p&gt;Then i go searching for how to debug these things:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/09/06/742568.aspx"&gt;http://blogs.msdn.com/tess/archive/2006/09/06/742568.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/08/11/695268.aspx"&gt;http://blogs.msdn.com/tess/archive/2006/08/11/695268.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Finally i get stuck into reviewing my code with a fine tooth comb, and find one thing that was causing the leak, static array on a singleton, used in temporary processing, that didnt get cleared.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115917770113296573?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115917770113296573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115917770113296573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917770113296573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115917770113296573'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/gccollect-not-solution.html' title='GC.Collect not the solution'/><author><name>djeeg</name><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-23322135.post-115897394765368119</id><published>2006-09-23T11:07:00.000+10:00</published><updated>2006-09-25T20:05:25.663+10:00</updated><title type='text'>HttpContext Items Strongly Typed</title><content type='html'>I have just refactored my nHibernate session store in HttpContext.Items to use this as the base class. This fits perfectly with the spring wiring and means that i can also use it in other projects, for other items that i want strongly typed access to the object. I forgot the dispose method so i was having bad memory leaks. See also the default(T) keyword, interesting.&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;abstract&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:teal;"&gt;AbstractObjectCacher&lt;/span&gt;&amp;lt;T&amp;gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #region&lt;/span&gt; IoC&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:teal;"&gt;IObjectCache&lt;/span&gt;&amp;lt;T&amp;gt; cache;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:teal;"&gt;IObjectCache&lt;/span&gt;&amp;lt;T&amp;gt; Cache {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;set&lt;/span&gt; { cache = &lt;span style="color:blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;get&lt;/span&gt; { &lt;span style="color:blue;"&gt;return&lt;/span&gt; cache; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #endregion&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; T Get() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;return&lt;/span&gt; cache.Get();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Set(T obj) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            cache.Set(obj);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Dispose() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            T obj = Get();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt;(obj != &lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                Set(&lt;span style="color:blue;"&gt;default&lt;/span&gt;(T));&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;if&lt;/span&gt;(obj &lt;span style="color:blue;"&gt;is&lt;/span&gt; &lt;span style="color:teal;"&gt;IDisposable&lt;/span&gt;) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                    ((&lt;span style="color:teal;"&gt;IDisposable&lt;/span&gt;)obj).Dispose();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                obj = &lt;span style="color:blue;"&gt;default&lt;/span&gt;(T);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            cache.Clear();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;So for instance, the thread store i use for unit testing will look like this:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:teal;"&gt;ThreadObjectCache&lt;/span&gt;&amp;lt;T&amp;gt; : &lt;span style="color:teal;"&gt;IObjectCache&lt;/span&gt;&amp;lt;T&amp;gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #region&lt;/span&gt; IoC&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; key;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Key {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;set&lt;/span&gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                key = &lt;span style="color:blue;"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:teal;"&gt;ThreadStore&lt;/span&gt;.Initialise(key);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;get&lt;/span&gt; { &lt;span style="color:blue;"&gt;return&lt;/span&gt; key; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #endregion&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; T Get() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;return&lt;/span&gt; (T)&lt;span style="color:teal;"&gt;ThreadStore&lt;/span&gt;.Get(key);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Set(T obj) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;ThreadStore&lt;/span&gt;.Set(key, obj);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Clear() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;ThreadStore&lt;/span&gt;.Set(key, &lt;span style="color:blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Dispose() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;ThreadStore&lt;/span&gt;.Dispose(key);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;And the HttpContext store will look like this:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:teal;"&gt;HttpContextCache&lt;/span&gt;&amp;lt;T&amp;gt; : &lt;span style="color:teal;"&gt;IObjectCache&lt;/span&gt;&amp;lt;T&amp;gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #region&lt;/span&gt; IoC&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; key;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Key {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;set&lt;/span&gt; { key = &lt;span style="color:blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;get&lt;/span&gt; { &lt;span style="color:blue;"&gt;return&lt;/span&gt; key; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        #endregion&lt;/span&gt;&lt;br /&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; T Get() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;return&lt;/span&gt; (T)&lt;span style="color:teal;"&gt;HttpContext&lt;/span&gt;.Current.Items[key];&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Set(T obj) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;HttpContext&lt;/span&gt;.Current.Items[key] = obj;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Clear() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;HttpContext&lt;/span&gt;.Current.Items[key] = &lt;span style="color:blue;"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Dispose() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;HttpContext&lt;/span&gt;.Current.Items.Remove(key);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115897394765368119?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115897394765368119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115897394765368119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115897394765368119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115897394765368119'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/httpcontext-items-strongly-typed.html' title='HttpContext Items Strongly Typed'/><author><name>djeeg</name><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-23322135.post-115874297969735604</id><published>2006-09-20T18:54:00.000+10:00</published><updated>2006-09-20T19:02:59.696+10:00</updated><title type='text'>Changes are not allowed while code is running</title><content type='html'>How often have you got this message when you try to edit your source while debugging? "Changes are not allowed while code is running"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7417/2386/1600/message.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/7417/2386/320/message.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Notice the lock icon next to the filename, showing its read only.&lt;br /&gt;&lt;br /&gt;This is a feature of VS that allows you to change the code and continue running with the modified code.&lt;br /&gt;It seems to be only useful for desktop applications, not web apps that we develop.&lt;br /&gt;We know that if we change code in the binary then we will need to recompile anyway, so how do we turn off this annoying message.&lt;br /&gt;To remove the message, turn off Edit and Continue by:&lt;br /&gt;Going to options&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7417/2386/1600/options.0.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/7417/2386/320/options.0.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Go to Debugging, Edit and Continue and uncheck the top box&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7417/2386/1600/uncheck.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/7417/2386/320/uncheck.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By turning off Edit and Continue, you still can create and remove debug points why the process is paused.&lt;br /&gt;And you can still edit aspx’s, ascx’s, and their code besides (in the web application) without problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115874297969735604?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115874297969735604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115874297969735604' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115874297969735604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115874297969735604'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/changes-are-not-allowed-while-code-is.html' title='Changes are not allowed while code is running'/><author><name>djeeg</name><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-23322135.post-115874231638563411</id><published>2006-09-20T18:49:00.000+10:00</published><updated>2006-09-20T18:51:56.406+10:00</updated><title type='text'>db4o 5.7</title><content type='html'>A new developement release of db4o has been released, which is supposed to be much faster than the previous versions. 5.7 is a couple of releases ahead of my current version 5.4.8 and the object browser has been updated too. This weekend if i get a chance i will work on intergrating this into the repository wrapper.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115874231638563411?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://developer.db4o.com/files/folders/db4o_57/default.aspx' title='db4o 5.7'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115874231638563411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115874231638563411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115874231638563411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115874231638563411'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/db4o-57.html' title='db4o 5.7'/><author><name>djeeg</name><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-23322135.post-115866706902238414</id><published>2006-09-19T21:52:00.000+10:00</published><updated>2006-09-19T21:59:46.566+10:00</updated><title type='text'>Updating Atlas</title><content type='html'>After updating the AtlasControlToolkit to the latest version 1.0.60914.0, i ran into a bunch of problems. The first was the removal of the third AtlasControlExtenderer binary, whichwas easy to fix, just had to update references to the AtlasControlToolkit and namespaces.&lt;br /&gt;The other issue i had was i was gettting a debugger alert client side about&lt;br /&gt;PageRequestManagerID not being an attribute on draggablelistitem. This is a custom drag item i have implemented, so i just went digging through AtlasControlToolkit and found something similar to what i wanted to do DragPanelProperties and it has go this code:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        [&lt;span style="color:teal;"&gt;EditorBrowsable&lt;/span&gt;(&lt;span style="color:teal;"&gt;EditorBrowsableState&lt;/span&gt;.Never), &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:teal;"&gt;Browsable&lt;/span&gt;(&lt;span style="color:blue;"&gt;false&lt;/span&gt;), &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:teal;"&gt;DesignerSerializationVisibility&lt;/span&gt;(&lt;span style="color:teal;"&gt;DesignerSerializationVisibility&lt;/span&gt;.Hidden)]&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; PageRequestManagerID {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;get&lt;/span&gt; { &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:blue;"&gt;null&lt;/span&gt;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;set&lt;/span&gt; { &lt;span style="color:blue;"&gt;throw&lt;/span&gt; &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;NotImplementedException&lt;/span&gt;(); }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So i just copied that into mine, and things worked. Its weird that there is no need to have the "new" keyword on this method. And why didnt it work in the first place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115866706902238414?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115866706902238414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115866706902238414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115866706902238414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115866706902238414'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/updating-atlas.html' title='Updating Atlas'/><author><name>djeeg</name><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-23322135.post-115865844583794237</id><published>2006-09-19T19:30:00.000+10:00</published><updated>2006-09-19T19:35:03.243+10:00</updated><title type='text'>ASX Partition Table</title><content type='html'>Once upon a time, i had a application that graphed asx data (australian stock exchange). It got imported from some csv files in sql server. For performance reasons i had each code as a seperate table. But that was before i knew about indexes.&lt;br /&gt;Now there may be a better way, by using Partitioning. I will be able to have the same tables, and then a view on top of them that i can query. The partitioning will happen on the stock code. With sql server 2005 this will happen automatically. Nice.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.sqlteam.com/dmauri/archive/2005/07/18/7147.aspx"&gt;http://weblogs.sqlteam.com/dmauri/archive/2005/07/18/7147.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://searchtechtarget.techtarget.com/originalContent/0,289142,sid91_gci1207038,00.html"&gt;http://searchtechtarget.techtarget.com/originalContent/0,289142,sid91_gci1207038,00.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.google.com/search?hl=en&amp;lr=&amp;amp;q=partition+mssql+2005"&gt;http://www.google.com/search?hl=en&amp;lr=&amp;amp;q=partition+mssql+2005&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115865844583794237?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115865844583794237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115865844583794237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865844583794237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865844583794237'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/asx-partition-table.html' title='ASX Partition Table'/><author><name>djeeg</name><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-23322135.post-115865725267430896</id><published>2006-09-19T19:12:00.000+10:00</published><updated>2006-09-19T19:14:12.676+10:00</updated><title type='text'>Unicode Kanji Characters</title><content type='html'>This table is awesome, if i need to match a character i do a copy on the page, then find on this one. Then get the number and convert it to &amp;amp;#123&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115865725267430896?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml' title='Unicode Kanji Characters'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115865725267430896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115865725267430896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865725267430896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865725267430896'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/unicode-kanji-characters.html' title='Unicode Kanji Characters'/><author><name>djeeg</name><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-23322135.post-115865712558995889</id><published>2006-09-19T19:08:00.000+10:00</published><updated>2006-09-19T19:12:05.590+10:00</updated><title type='text'>Javascript Triple Equals (===)</title><content type='html'>I download Script# today, and had a browse through the script files, and in the first couple of lines was this triple equal operation (===). Now i have been writing javascript for nearly 5 years and hadn't ever seen this.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flashinsider.com/2005/07/25/null-equals-undefined-but-null-doesn-t-strictly-equal-undefined/"&gt;http://www.flashinsider.com/2005/07/25/null-equals-undefined-but-null-doesn-t-strictly-equal-undefined/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/ericlippert/archive/2004/07/26/197302.aspx"&gt;http://blogs.msdn.com/ericlippert/archive/2004/07/26/197302.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ejball.com/EdAtWork/PermaLink.aspx?guid=1a946f91-d37d-4104-a1d3-63e633afafba"&gt;http://www.ejball.com/EdAtWork/PermaLink.aspx?guid=1a946f91-d37d-4104-a1d3-63e633afafba&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So it does a comparison of the value, including the datatype. I don't know if i will ever use i, considering i have never used it, but it might come in handy later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115865712558995889?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115865712558995889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115865712558995889' title='34 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865712558995889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865712558995889'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/javascript-triple-equals.html' title='Javascript Triple Equals (===)'/><author><name>djeeg</name><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>34</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115865690452673449</id><published>2006-09-19T19:01:00.000+10:00</published><updated>2006-09-19T19:08:24.543+10:00</updated><title type='text'>Output Stream Filtering</title><content type='html'>I was debating today whether to use an output filter to replace special macros in the my site templates at runtime. Apart from the issues outlined in this article, where the filters dont run if End() is called and in some transfer and redirect methods, the process wouldn't work if i was using the visual studio design editor. Say for example that i was replacing the application root path with a macro like [[AppRoot]].&lt;br /&gt;My prefered method would be to have a helper static class that references HttpContext.Current in runtime and something else a design time. Then use &lt;%= HtmlHelper.AppRoot %&gt; in templates instead.&lt;br /&gt;Remember to wrapper the script tags in an asp:PlaceHolder if you get the can't add to controls collection error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115865690452673449?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.ondotnet.com/pub/a/dotnet/2003/10/20/httpfilter.html' title='Output Stream Filtering'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115865690452673449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115865690452673449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865690452673449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115865690452673449'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/output-stream-filtering.html' title='Output Stream Filtering'/><author><name>djeeg</name><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-23322135.post-115857614536440559</id><published>2006-09-18T20:41:00.000+10:00</published><updated>2006-09-18T20:42:25.380+10:00</updated><title type='text'>Programming Index</title><content type='html'>So how does your programming language rank in terms of this index...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115857614536440559?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.tiobe.com/index.htm?tiobe_index' title='Programming Index'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115857614536440559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115857614536440559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115857614536440559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115857614536440559'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/programming-index.html' title='Programming Index'/><author><name>djeeg</name><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-23322135.post-115857502199122552</id><published>2006-09-18T20:20:00.000+10:00</published><updated>2006-09-18T20:23:42.003+10:00</updated><title type='text'>Delete All Rows</title><content type='html'>&lt;p&gt;Many a time i have wanted to delete all the rows from all the tables in the database. It usually involves a script getting all the names of the tables and deleting one at a time. This script is awesome where you can do it in one line:&lt;/p&gt;&lt;p&gt;EXEC sp_MSforeachtable @command1 = "TRUNCATE TABLE ?"&lt;/p&gt;&lt;p&gt;How many other things will this make easier.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115857502199122552?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=729351&amp;SiteID=1' title='Delete All Rows'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115857502199122552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115857502199122552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115857502199122552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115857502199122552'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/delete-all-rows.html' title='Delete All Rows'/><author><name>djeeg</name><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-23322135.post-115822622233713372</id><published>2006-09-14T19:29:00.000+10:00</published><updated>2006-09-14T19:30:22.346+10:00</updated><title type='text'>Random Selects</title><content type='html'>The simple things are often the best. Like this way of selecting a random row from a table.&lt;br /&gt;&lt;br /&gt;SELECT *&lt;br /&gt;FROM MyTable&lt;br /&gt;ORDER BY NEWID()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115822622233713372?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.sqlteam.com/item.asp?ItemID=8747' title='Random Selects'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115822622233713372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115822622233713372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115822622233713372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115822622233713372'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/random-selects.html' title='Random Selects'/><author><name>djeeg</name><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-23322135.post-115796898312391595</id><published>2006-09-11T19:55:00.000+10:00</published><updated>2006-09-11T20:04:11.963+10:00</updated><title type='text'>.Net 2.0 RSA Encryption</title><content type='html'>Even though the new framework makes some tasks much easily, like openning a file in one line, other tasks, like encrypting data still require helper functions.&lt;br /&gt;The classes all exist in the System.Security.Cryptography namespace:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.cryptography.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.security.cryptography.aspx&lt;/a&gt;&lt;br /&gt;I have choosen to use RSA asymmetric encryption:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Many examples helped over the basic msdn documentation:&lt;br /&gt;&lt;a href="http://www.codeproject.com/dotnet/RSACryptoPad.asp"&gt;http://www.codeproject.com/dotnet/RSACryptoPad.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/dotnet/SimpleEncryption.asp"&gt;http://www.codeproject.com/dotnet/SimpleEncryption.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.eggheadcafe.com/articles/20020630.asp"&gt;http://www.eggheadcafe.com/articles/20020630.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/dotnet/ComboEncryption.asp"&gt;http://www.codeproject.com/dotnet/ComboEncryption.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lcris/archive/2006/05/08/592868.aspx"&gt;http://blogs.msdn.com/lcris/archive/2006/05/08/592868.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One of the annoying things to remember is that on a shared hosting server, you will most likely not have access to the underlying COM object directories. I thought this would be a show stopper, but this only restricts you from decrypting the values, you can still encrypt items fine. So if your requirement is to collect data and store it securely with a public key, then download it remotely and process it with the private key, this should work.&lt;br /&gt;&lt;br /&gt;Some issues that may arise:&lt;br /&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q322/3/71.asp&amp;NoWebContent=1"&gt;http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q322/3/71.asp&amp;amp;NoWebContent=1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115796898312391595?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115796898312391595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115796898312391595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115796898312391595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115796898312391595'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/net-20-rsa-encryption.html' title='.Net 2.0 RSA Encryption'/><author><name>djeeg</name><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-23322135.post-115796814644323985</id><published>2006-09-11T19:44:00.000+10:00</published><updated>2006-09-11T19:52:33.253+10:00</updated><title type='text'>.Net Serializers</title><content type='html'>I had originally implemented a serialization using BinaryFormatter because i needed the result as a byte array. It all work well when running in nUnit, but when i moved it to my medium trust web application it failed. This was due to apparently, the use of reflection in the BinaryFormatter when it serializes all of the object graph properties, including private fields. The easy way to make it work was to change to using the XmlSerializer.&lt;br /&gt;&lt;br /&gt;Interestingly though, the XmlSerializer does not implement the same interface as the BinaryFormatter, so i can't just sub in the constructor. The serialise method has the same parameters which is strange.&lt;br /&gt;&lt;br /&gt;Heres the msdn doc on the XmlSerializer:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And this explains the trust issue:&lt;br /&gt;&lt;a href="http://haacked.com/archive/2006/07/09/ConfiguringLog4NetWithASP.NET2.0InMediumTrust.aspx"&gt;http://haacked.com/archive/2006/07/09/ConfiguringLog4NetWithASP.NET2.0InMediumTrust.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I really thought there might be a way to set the properties that get serialized, but it looks like a LinkDemand and Security assert is performed right at the start of the internal serialization class, so theres no hope of ever getting this to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115796814644323985?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115796814644323985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115796814644323985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115796814644323985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115796814644323985'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/net-serializers.html' title='.Net Serializers'/><author><name>djeeg</name><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-23322135.post-115754527781630935</id><published>2006-09-06T22:14:00.000+10:00</published><updated>2006-09-06T22:21:17.840+10:00</updated><title type='text'>Inline Server Script in Header</title><content type='html'>Have you ever wanted to have inline script tags in your header control and add controls programatically. You will propably be getting an error about not being able to do this. This is especially true when you have a control that writes scripts into the header and then you also wish to have inline style sheets with the proper application path. The simple way to get around this problem is to wrap the inline scripts in an asp:PlaceHolder.&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;html&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;head&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;server&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;asp:PlaceHolder&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;server&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;link&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;href&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;"&lt;span style="color:blue;"&gt;%= SomeVariable %&amp;gt;/style.css&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;rel&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;stylesheet&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;text/css&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;asp:PlaceHolder&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;head&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;html&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This way you can still add controls to the header by doing:&lt;br /&gt;Page.Header.Controls.Add();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115754527781630935?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115754527781630935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115754527781630935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115754527781630935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115754527781630935'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/09/inline-server-script-in-header.html' title='Inline Server Script in Header'/><author><name>djeeg</name><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-23322135.post-115702670514038199</id><published>2006-08-31T22:16:00.000+10:00</published><updated>2006-08-31T22:18:25.140+10:00</updated><title type='text'>c# Anonymous Method Syntax</title><content type='html'>I always keep forgetting the sytnax for these whenever i start a new project and have nothing to copy and paste from. These two links are the most helpful i have found. They provide examples over and above the documentation in msdn2.&lt;br /&gt;&lt;a href="http://www.theserverside.net/tt/articles/showarticle.tss?id=AnonymousMethods"&gt;http://www.theserverside.net/tt/articles/showarticle.tss?id=AnonymousMethods&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/00/C20/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/06/00/C20/default.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115702670514038199?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115702670514038199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115702670514038199' title='113 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115702670514038199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115702670514038199'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/c-anonymous-method-syntax.html' title='c# Anonymous Method Syntax'/><author><name>djeeg</name><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>113</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115702644215223345</id><published>2006-08-31T22:08:00.000+10:00</published><updated>2006-08-31T22:14:02.173+10:00</updated><title type='text'>Working Days in T-SQL</title><content type='html'>These two posts helped greatly in getting a function to work out the working days between two working days:&lt;br /&gt;&lt;a href="http://aaronjohals.blogspot.com/2005/10/number-of-working-days-between-2-dates.html"&gt;http://aaronjohals.blogspot.com/2005/10/number-of-working-days-between-2-dates.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://classicasp.aspfaq.com/date-time-routines-manipulation/how-do-i-count-the-number-of-business-days-between-two-dates.html"&gt;http://classicasp.aspfaq.com/date-time-routines-manipulation/how-do-i-count-the-number-of-business-days-between-two-dates.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;drop &lt;/span&gt;function dbo.GetWorkingDaysDiff&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;go&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;create &lt;/span&gt;function dbo.GetWorkingDaysDiff(@start &lt;span style="color:blue;"&gt;datetime&lt;/span&gt;, @end &lt;span style="color:blue;"&gt;datetime&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    returns &lt;span style="color:blue;"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;as &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;declare &lt;/span&gt;@countdays &lt;span style="color:blue;"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;set &lt;/span&gt;@countdays = 0&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;while &lt;/span&gt;@start &amp;lt; @end&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;if &lt;/span&gt;(&lt;span style="color:blue;"&gt;select datepart&lt;/span&gt;(dw, @start)) &amp;lt; 6&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;set &lt;/span&gt;@countdays = @countdays + 1&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;set &lt;/span&gt;@start = &lt;span style="color:blue;"&gt;dateadd&lt;/span&gt;(d,1,@start)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;return &lt;/span&gt;@countdays&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;end &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;GO&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;print&lt;/span&gt;(dbo.GetWorkingDaysDiff(&lt;span style="color:maroon;"&gt;'2006/08/21'&lt;/span&gt;, &lt;span style="color:maroon;"&gt;'2006/08/27'&lt;/span&gt;))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;go&lt;/pre&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/23322135-115702644215223345?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115702644215223345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115702644215223345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115702644215223345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115702644215223345'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/working-days-in-t-sql.html' title='Working Days in T-SQL'/><author><name>djeeg</name><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-23322135.post-115694641723344286</id><published>2006-08-30T23:52:00.000+10:00</published><updated>2006-08-31T00:00:17.246+10:00</updated><title type='text'>NHibernate 1.2.0.Alpha1</title><content type='html'>I finally got around to implementing this into my code base, but as you would expect not everything worked first up. The saving worked fine, i could see the rows in the database. It was just the loading. At initial start NHibernate complains about virtuals on all you proxys for lazy loading, but i fixed them. A gut feeling i had was that this was to do with all to do with lazy loading.&lt;br /&gt;&lt;br /&gt;As it turns out all collections and associations are lazy loaded in this new version:&lt;br /&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?t=960004&amp;start=15&amp;amp;sid=ba44698acc40eaae77d6d73d7561ba83"&gt;http://forum.hibernate.org/viewtopic.php?t=960004&amp;start=15&amp;amp;sid=ba44698acc40eaae77d6d73d7561ba83&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dotnet.org.za/kuate/archive/2006/05/29/52751.aspx"&gt;http://dotnet.org.za/kuate/archive/2006/05/29/52751.aspx&lt;/a&gt;&lt;br /&gt;So just put that attribute into my mapping file and everything went back to normal.&lt;br /&gt;&lt;br /&gt;The real underlying cause of all this is that when things get lazy loaded they are a proxy type, not the actual type in the domain model. So when i debugged it like this:&lt;br /&gt;Console.WriteLine(n.GetType());&lt;br /&gt;I was getting a type name like this with these names all joined together with under scores&lt;br /&gt;ProxyInterfaceSystemObject&lt;br /&gt;INHibernateProxy&lt;br /&gt;ISerializable&lt;br /&gt;My tests for type (x is MyType)  all fail silently, they really should be converted to proxy interfaces, but i don't need to atm, and i get 20% extra speed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115694641723344286?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115694641723344286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115694641723344286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115694641723344286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115694641723344286'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/nhibernate-120alpha1.html' title='NHibernate 1.2.0.Alpha1'/><author><name>djeeg</name><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-23322135.post-115685281657178021</id><published>2006-08-29T21:58:00.000+10:00</published><updated>2006-08-29T22:07:06.830+10:00</updated><title type='text'>ASP.NET 2.0 Medium Trust</title><content type='html'>Here are some links for configuring some library binaries:&lt;br /&gt;&lt;br /&gt;nHibernate&lt;br /&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?t=963084&amp;view=previous"&gt;http://forum.hibernate.org/viewtopic.php?t=963084&amp;amp;view=previous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;IMPORTENT: Turn off the relection optimizer as you guessed it you dont have ReflectionPermission on shared hosting in medium trust.&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;configuration&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;configSections&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;section&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;nhibernate&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;System.Configuration.NameValueSectionHandler&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;requirePermission&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;false&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;configSections&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;nhibernate&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;add&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;hibernate.use_reflection_optimizer&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;false&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;nhibernate&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;configuration&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;&lt;br /&gt;&lt;br /&gt;log4net:&lt;br /&gt;&lt;a href="http://www.topxml.com/XML/re-37980_Configuring-Log4Net-with-ASP-NET-2-0-in-Medium-Trust.aspx"&gt;http://www.topxml.com/XML/re-37980_Configuring-Log4Net-with-ASP-NET-2-0-in-Medium-Trust.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and just some medium trust explanations:&lt;br /&gt;&lt;a href="http://nayyeri.net/archive/2006/06/02/Medium-trust-issue-in-ASP.NET-2.0.aspx"&gt;http://nayyeri.net/archive/2006/06/02/Medium-trust-issue-in-ASP.NET-2.0.aspx&lt;/a&gt; &lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt; &lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;I found also that the .NET 2.0 namespace declaration in the app.config/web.config caused exceptions, so just remove it, the application will still run in 2.0 no worries.&lt;/div&gt;&lt;div style="BACKGROUND: white" face="Courier New" size="10pt" color="black"&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;configuration&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;xmlns&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;http://schemas.microsoft.com/.NetConfiguration/v2.0&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&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/23322135-115685281657178021?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115685281657178021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115685281657178021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115685281657178021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115685281657178021'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/aspnet-20-medium-trust.html' title='ASP.NET 2.0 Medium Trust'/><author><name>djeeg</name><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-23322135.post-115685163791933077</id><published>2006-08-29T21:34:00.000+10:00</published><updated>2006-08-29T21:42:23.186+10:00</updated><title type='text'>Working Around Shared Hosting</title><content type='html'>I have been investigating the shared hosting issues with Spring and found that it is not as bad as it initially seems. There are a few steps that must be taken, very similar to those taken from other java ported libraries (eg nhibernate).&lt;br /&gt;Firstly, all calls to GetCompiledPageInstance MUST be replaced with CreateInstanceFromVirtualPath. I have provided the fix for this in a previous thread (&lt;a href="http://forum.springframework.net/showthread.php?t=407"&gt;http://forum.springframework.net/showthread.php?t=407&lt;/a&gt;). This is a must because the GetCompiledPageInstance method has an attribute on it, pretty much killing calls to it unless you are running in full trust mode. On shared servers this will be highly unlikely.&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;[SecurityPermission(SecurityAction.Demand, Unrestricted = &lt;span style="color:blue;"&gt;true&lt;/span&gt;)]&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Now i had thought this had been commited into the main branch of SPring.Web, but the nightly build and the cvs repository on sourceforge both do not have the fix&lt;br /&gt;&lt;br /&gt;The second step to take modifing the spring source, is to find the file src\Spring\Spring.Core\Core\IO\FileSystemResource.cs. This file has two calls like this&lt;br /&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;fileHandle.Directory.Root.ToString();&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;In the hosting trust mode, this bombs out with a FileIOPermission violation. The reason being, you don't have access to the root directory when you are on the shared host. The Root property of DirectoryInfo has this line in it causing the exception.&lt;br /&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;new&lt;/span&gt; FileIOPermission(FileIOPermissionAccess.PathDiscovery, &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt;[] { text1 }, &lt;span style="color:blue;"&gt;false&lt;/span&gt;, &lt;span style="color:blue;"&gt;false&lt;/span&gt;).Demand();&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;My solution is a little hacky at the moment but you get the idea. All it is doing is getting the root folder (ie c: or d:). This propably wont work on a network drive remember.&lt;br /&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;fileHandle.Directory.ToString().Substring(0, 3);&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Third thing to do is to add requirePermission="false" to the configSections section in web.config. If you dont do this you will receive a Configuration security permission exception.&lt;br /&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;configSections&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;sectionGroup&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;spring&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;section&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;context&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Spring.Context.Support.ContextHandler, Spring.Core&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;requirePermission&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;false&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;section&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;objects&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Spring.Context.Support.DefaultSectionHandler, Spring.Core&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;requirePermission&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;false&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;sectionGroup&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;configSections&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;The last item on the list is probably the most obscure, and i will try to explain and give some background:&lt;br /&gt;&lt;br /&gt;dll's can be signed, which gives them a strong name and a hash, which stops them being modified and re-distributed.&lt;br /&gt;strong named dlls can be registered in the GAC.&lt;br /&gt;From the GAC, dlls can be configured to run in full trust, depending on your .net framework configuration. (see somewhere in control panel -&gt; administration tools).&lt;br /&gt;&lt;br /&gt;When you run a web application in anything but full trust, all the dlls in the bin directory run in a partial trust mode.&lt;br /&gt;Strong named assemblies that are NOT in the GAC but in you bin directory, can not by default be called from a partial trusted assembly&lt;br /&gt;&lt;br /&gt;So in this case i have my project dll, spring, nhibernate and log4net in the bin directory, plus any dependant dlls. nhibernate and log4net are strong named, but i can only call log4net from my app, not nhibernate. Why is this? its because log4net has an assembly level attribute on it.&lt;br /&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;[assembly: System.Security.&lt;span style="color:teal;"&gt;AllowPartiallyTrustedCallers&lt;/span&gt;()]&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;This attribute allows my partially trusted application to call into it without throwing an exception. Details can be found on msdn, its something to do with LinkDemand.&lt;br /&gt;&lt;br /&gt;Now it gets tricky, that would mean all the dll's that i have in the bin directory need this attribute. How would i do this?, I could get all the sources for them and recompile, but what happens if i can't get the source, or i have a 3rd party app that is proprietary. I do the following instead:&lt;br /&gt;&lt;br /&gt;1. get all the dll's and disassemble them&lt;br /&gt;2. add the AllowPartiallyTrustedCallers attribute to them in the MSIL file&lt;br /&gt;3. remove all signing code from the assembly&lt;br /&gt;4. remove all public keys and hashes from the assembly&lt;br /&gt;5. update any extern assembly declarations, by removing the public hash requirement&lt;br /&gt;6. reassemble the dll's again.&lt;br /&gt;&lt;br /&gt;What does this do? It removes all strong names from the assemblies and also updates the references to not require the strong named versions.&lt;br /&gt;As we dont have the keys that sign the dll, we can't resign them, but we can remove the signing altogether.&lt;br /&gt;We could resign them all with new keys that we created and update the references, but that sounds like a lot of work for no gain.&lt;br /&gt;We are going to be running in partial trust mode so we just don't need strong named assemblies.&lt;br /&gt;This process probably wont work in all circumstances mind you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115685163791933077?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115685163791933077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115685163791933077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115685163791933077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115685163791933077'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/working-around-shared-hosting.html' title='Working Around Shared Hosting'/><author><name>djeeg</name><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-23322135.post-115676177756239983</id><published>2006-08-28T20:23:00.000+10:00</published><updated>2006-08-28T20:42:58.410+10:00</updated><title type='text'>NHibernateUtil.IsInitialized()</title><content type='html'>I have a nhibernate lazy loaded collection, well a bunch of them in a tree of parent-child relations. When i save some nodes, i have to loop over the active nodes and add a bit of data to them. Trouble is when i access the parents/children it initilises the collections. This is bad as it then loads the whole tree into memory on the saved.&lt;br /&gt;I thought there must be a way to check whether a collection had been loaded lazyily. First i thought about checking the type to see if it was the dynamic proxy. But then ran into this gem at the nhibernate reference guide:&lt;br /&gt;&lt;a href="http://www.hibernate.org/hib_docs/nhibernate/html/performance.html"&gt;http://www.hibernate.org/hib_docs/nhibernate/html/performance.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I could just pass the collection to this method, and it would check if it had been initialised. Just waht i was after. The only other place i found a reference to this function then was at the forums:&lt;br /&gt;&lt;a href="http://forums.hibernate.org/viewtopic.php?p=2282177&amp;sid=b5989f2c3f2387add4188a6e13802019"&gt;http://forums.hibernate.org/viewtopic.php?p=2282177&amp;amp;sid=b5989f2c3f2387add4188a6e13802019&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So why dao function ended up as, because i dont want the nhibernate logic permeating my service layer:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;bool&lt;/span&gt; HasBeenInitialised(&lt;span style="color:teal;"&gt;ICollection&lt;/span&gt; collection) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:teal;"&gt;NHibernateUtil&lt;/span&gt;.IsInitialized(collection);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115676177756239983?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115676177756239983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115676177756239983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115676177756239983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115676177756239983'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/nhibernateutilisinitialized.html' title='NHibernateUtil.IsInitialized()'/><author><name>djeeg</name><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-23322135.post-115665994405719266</id><published>2006-08-27T16:07:00.000+10:00</published><updated>2006-08-27T16:28:27.920+10:00</updated><title type='text'>bindingRedirect</title><content type='html'>I ran into a wall today where i was getting an exception akin to this:&lt;br /&gt;&lt;br /&gt;Could not load file or assembly 'dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)&lt;br /&gt;&lt;br /&gt;Now im fine with the error, its a shared strong named assembly, that NOT in the GAC. So how do i fix it. It didn't take long to find the solution was to add a bindingRedirect. I was going to map the 0.0.33.0 version to the lastest 0.0.36.0 one. Easier said than done i'm afraid.&lt;br /&gt;Here is a link explaining the redirect:&lt;br /&gt;&lt;a href="http://www.diranieh.com/NETAssemblies/Assemblies.htm"&gt;http://www.diranieh.com/NETAssemblies/Assemblies.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All i would have to do would be to put this in my web.config:&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;runtime&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;assemblyBinding&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;xmlns&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;urn:schemas-microsoft-com:asm.v1&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;assemblyIdentity&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;dommons&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#0000ff;"&gt;  &lt;/span&gt;&lt;span style="color:red;"&gt;publicKeyToken&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;873d6a369a01a6bd&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;culture&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;neutral&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;bindingRedirect&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;oldVersion&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;0.0.33.0&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;newVersion&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;0.0.36.0&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;assemblyBinding&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;runtime&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Though this did not fix the problem. A lot of material seems to be geared towards the assemblies being in the GAC or running as a client application. Not my case of build versions mismateching. To a newer version as well.&lt;br /&gt;&lt;br /&gt;So i then spent the next half a day figuring out what was going on.&lt;br /&gt;First checking i was doing it correctly:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx"&gt;http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://plans.thefrankes.com/tutorials/Assemblies/"&gt;http://plans.thefrankes.com/tutorials/Assemblies/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/junfeng/archive/2004/11/16/258081.aspx"&gt;http://blogs.msdn.com/junfeng/archive/2004/11/16/258081.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was sure i had the syntax right, time to start using the assembly loading debugger, a tool called fuslogvw. In the start menu, open up the .net framework command prompt and type that. Also make sure you restart IIS to register it, otherwise nothing happens. Here are some more links for debugging:&lt;br /&gt;&lt;a href="http://www.grimes.demon.co.uk/workshops/fusWSFive.htm"&gt;http://www.grimes.demon.co.uk/workshops/fusWSFive.htm&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx"&gt;http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.grimes.demon.co.uk/workshops/fusWSFive.htm"&gt;http://www.grimes.demon.co.uk/workshops/fusWSFive.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So what was my problem, it seems that the redirect was not working. This happens first in the process (&lt;a href="http://msdn2.microsoft.com/en-us/library/8f6988ab.aspx"&gt;msdn&lt;/a&gt;). But why was it failing.&lt;br /&gt;The error from fusion log viewer was this:&lt;br /&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;  *** Assembly Binder Log Entry  (27/08/2006 @ 3:29:10 PM) ***&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  The operation failed.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  Bind result: hr = 0x80131040. No description available.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  Running under executable  c:\windows\system32\inetsrv\w3wp.exe&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  --- A detailed error log follows.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  === Pre-bind state information ===&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: User = NT AUTHORITY\NETWORK SERVICE&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:red;"&gt;  LOG: DisplayName = dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  (Fully-specified)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Appbase = &lt;a href="file:///D:/projects/svn/project/trunk/project-web/"&gt;file:///D:/projects/svn/project/trunk/project-web/&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Initial PrivatePath = D:\projects\svn\project\trunk\project-web\bin&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Dynamic Base = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\91bd8e69&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Cache Base = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\91bd8e69&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: AppName = fec991e1&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  Calling assembly : repository, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  ===&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: This bind starts in default load context.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Using application configuration file: D:\projects\svn\project\trunk\project-web\web.config&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Using host configuration file: &lt;a href="file:////?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config"&gt;file:////?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:red;"&gt;  LOG: Post-policy reference: dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: GAC Lookup was unsuccessful.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; /project/91bd8e69/fec991e1/dommons.DLL.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; /project/91bd8e69/fec991e1/dommons/dommons.DLL.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Attempting download of new URL &lt;a href="file:///D:/projects/svn/project/trunk/project-web/bin/dommons.DLL"&gt;file:///D:/projects/svn/project/trunk/project-web/bin/dommons.DLL&lt;/a&gt;.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Assembly download was successful. Attempting setup of file: D:\projects\svn\project\trunk\project-web\&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; bin\dommons.dll&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Entering download cache setup phase.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  LOG: Assembly Name is: dommons, Version=0.0.36.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  WRN: Comparing the assembly name resulted in the mismatch: Build Number&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  ERR: The assembly reference did not match the assembly definition found.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  ERR: Setup failed with hr = 0x80131040.&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Note the two red lines. The redirect was not working, and as the 33 version could not be found, the application start failed. In frustration i tried a suggestion to put the redirect in the machine.config file, and what do you know, the whole thing started to work. Now at least i know why it isn't working it might be a little easier to figure out the cause. I think i read a permission on a security namespace item may need to be set.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115665994405719266?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115665994405719266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115665994405719266' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115665994405719266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115665994405719266'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/bindingredirect.html' title='bindingRedirect'/><author><name>djeeg</name><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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115650060426318585</id><published>2006-08-25T20:04:00.000+10:00</published><updated>2006-08-26T03:56:41.733+10:00</updated><title type='text'>Collection was modified; enumeration operation may not execute.</title><content type='html'>For this exception i had always kept a cache array of elements to remove, but this guy creates a temperary array enumerator in the foreach loop. Nice work. But this doesn't work with generics, so he uses a delegate to do the same job. Someone also says that there is a powercollections framework that offers .net 2.0 some advanced features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115650060426318585?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/kevin_ransom/archive/2005/03/14/395101.aspx' title='Collection was modified; enumeration operation may not execute.'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115650060426318585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115650060426318585' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115650060426318585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115650060426318585'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/collection-was-modified-enumeration.html' title='Collection was modified; enumeration operation may not execute.'/><author><name>djeeg</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115648702327001356</id><published>2006-08-25T16:18:00.000+10:00</published><updated>2006-08-25T16:23:43.290+10:00</updated><title type='text'>Extension Methods</title><content type='html'>Recently at work we had a requirement to have enum values displayed as proper words rather than camle cased. But you can't override the ToString method. But what about using the Extension Methods feature of c# 3.0. Now it seems like agood idead to do what upon future investigate you can't override methods like you would a virtual, you can only add new methods. So then i begs the point, what is the point of Extension Methods. The only case that i can see is if the class is sealed in a 3rd party library that you can't change, that you want to add a method, rather than having a Utils class to do the work for you. Now this is good, becuase then you can see all the methods in the visual studio intellisense. But if you own the class, then there really is no point, you would just add the method yourself.&lt;br /&gt;&lt;br /&gt;The could be a way to use numerous different methods with the same name, but in different namespaces, but i haven't fully thought about that yet, and propably wont until 3.0 has gone into release.&lt;br /&gt;&lt;br /&gt;Here are some links, though they are kind of old:&lt;br /&gt;&lt;a href="http://blah.winsmarts.com/2006/05/18/demystifying-c-30--part-3-extension-methods.aspx"&gt;http://blah.winsmarts.com/2006/05/18/demystifying-c-30--part-3-extension-methods.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2006/03/20/5798.aspx"&gt;http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2006/03/20/5798.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cincomsmalltalk.com/userblogs/malby/blogView?showComments=true&amp;entry=3304188302"&gt;http://www.cincomsmalltalk.com/userblogs/malby/blogView?showComments=true&amp;amp;entry=3304188302&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/abhinaba/archive/2005/10/21/483337.aspx"&gt;http://blogs.msdn.com/abhinaba/archive/2005/10/21/483337.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115648702327001356?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115648702327001356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115648702327001356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115648702327001356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115648702327001356'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/extension-methods.html' title='Extension Methods'/><author><name>djeeg</name><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-23322135.post-115641582233699320</id><published>2006-08-24T20:20:00.000+10:00</published><updated>2006-08-24T20:41:41.830+10:00</updated><title type='text'>yield</title><content type='html'>So i found this keyword that i did not know about in c#. Intriguing. So what it does is creates an enumeration on the fly, without having to code a class to do it. Sounds good, but what could i use it in. A few examples suggest that it be used in tree traveral:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:teal;"&gt;IEnumerator&lt;/span&gt;&amp;lt;Node&amp;gt; GetDepthFirstTraversalEnumerator() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.value;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;foreach&lt;/span&gt;(Node child &lt;span style="color:blue;"&gt;in&lt;/span&gt; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.children) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:teal;"&gt;IEnumerator&lt;/span&gt;&amp;lt;Node&amp;gt; enum_ = kidchildGetDepthFirstTraversalEnumerator();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;while&lt;/span&gt;(enum_.MoveNext()) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; enum_.Current;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;and also found the map function from other laungauges:&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;delegate&lt;/span&gt; &lt;span style="color:blue;"&gt;object&lt;/span&gt; &lt;span style="color:teal;"&gt;MapFunction&lt;/span&gt;(&lt;span style="color:blue;"&gt;object&lt;/span&gt; o);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; Map(&lt;span style="color:teal;"&gt;MapFunction&lt;/span&gt; mapFunction, &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; enumerable) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;foreach&lt;/span&gt;(&lt;span style="color:blue;"&gt;object&lt;/span&gt; o &lt;span style="color:blue;"&gt;in&lt;/span&gt; enumerable) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; mapFunction(o);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; PositiveIntegers() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;int&lt;/span&gt; a = 1;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;while&lt;/span&gt;(&lt;span style="color:blue;"&gt;true&lt;/span&gt;) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; a;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                a = a + 1;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; SubList(&lt;span style="color:blue;"&gt;int&lt;/span&gt; start, &lt;span style="color:blue;"&gt;int&lt;/span&gt; end, &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; enumerable) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;int&lt;/span&gt; count = 0;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;foreach&lt;/span&gt;(&lt;span style="color:blue;"&gt;object&lt;/span&gt; o &lt;span style="color:blue;"&gt;in&lt;/span&gt; enumerable) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                count++;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;if&lt;/span&gt;(count &amp;lt; start) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;continue&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                } &lt;span style="color:blue;"&gt;else&lt;/span&gt; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(count &amp;lt;= end) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; o;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                } &lt;span style="color:blue;"&gt;else&lt;/span&gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;yield&lt;/span&gt; &lt;span style="color:blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:teal;"&gt;IEnumerable&lt;/span&gt; set = I.SubList(5, 15, I.PositiveNumbers());&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;foreach&lt;/span&gt;(&lt;span style="color:blue;"&gt;int&lt;/span&gt; value &lt;span style="color:blue;"&gt;in&lt;/span&gt; Map(&lt;span style="color:blue;"&gt;delegate&lt;/span&gt;(&lt;span style="color:blue;"&gt;object&lt;/span&gt; o) { &lt;span style="color:blue;"&gt;return&lt;/span&gt; ((&lt;span style="color:blue;"&gt;int&lt;/span&gt;)o) * 2; }, )) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:green;"&gt;//do something&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        }&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;heres the link to a Fibonacci generator &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;a href="http://www.cerkit.com/cerkitBlog/2004/06/30/Using+The+Yield++Statement+In+Whidbey+C.aspx"&gt;http://www.cerkit.com/cerkitBlog/2004/06/30/Using+The+Yield++Statement+In+Whidbey+C.aspx&lt;/a&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;a lazy paged collection:&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;a href="http://haacked.com/archive/2006/08/14/FunIteratingPagedCollectionsWithGenericsAndIterators.aspx"&gt;http://haacked.com/archive/2006/08/14/FunIteratingPagedCollectionsWithGenericsAndIterators.aspx&lt;/a&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;and a textreader:&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;a href="http://blogs.msdn.com/jmstall/archive/2005/08/08/textreader_yield.aspx"&gt;http://blogs.msdn.com/jmstall/archive/2005/08/08/textreader_yield.aspx&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115641582233699320?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115641582233699320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115641582233699320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115641582233699320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115641582233699320'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/yield.html' title='yield'/><author><name>djeeg</name><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-23322135.post-115633771628260566</id><published>2006-08-23T22:50:00.000+10:00</published><updated>2006-08-23T22:55:16.283+10:00</updated><title type='text'>WeakReference</title><content type='html'>Have you ever wanted to store a time consuming to construct object in a cache, but then it hangs around forever. Try storing a WeakReference to the object instead.&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;object&lt;/span&gt; cached = &lt;span style="color:blue;"&gt;new&lt;/span&gt; TimeConsumingToConstructObject();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;WeakReference&lt;/span&gt; wr = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;WeakReference&lt;/span&gt;(cached);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            cached = &lt;span style="color:blue;"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt;(wr.IsAlive) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                cached = wr.Target;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            } &lt;span style="color:blue;"&gt;else&lt;/span&gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;                cached = &lt;span style="color:blue;"&gt;new&lt;/span&gt; TimeConsumingToConstructObject();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            }&lt;/pre&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/23322135-115633771628260566?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115633771628260566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115633771628260566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115633771628260566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115633771628260566'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/weakreference.html' title='WeakReference'/><author><name>djeeg</name><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-23322135.post-115633720102675282</id><published>2006-08-23T22:41:00.000+10:00</published><updated>2006-08-23T22:46:41.046+10:00</updated><title type='text'>To Ruby or not to Ruby</title><content type='html'>I was wondering if i should start tinkering with ruby to see what sort of framework it was. Then i read some items that suggested that it was still in its infancy as a technonolgy. Poor speed, not enough documentation.&lt;br /&gt;&lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.309321.3"&gt;http://discuss.joelonsoftware.com/default.asp?joel.3.309321.3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.pankaj-k.net/archives/2005/11/ruby_or_java_a.html"&gt;http://www.pankaj-k.net/archives/2005/11/ruby_or_java_a.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I mean its sounds good to write less code, and have db mappping handled for you, but at what cost. I have spent years writting jscript asp with variable types, but the amount of errors that you miss without compile time and type checking support is painful. I prefer to let Visual Studio do the meanal tasks like remembering method names and type checking.&lt;br /&gt;&lt;br /&gt;I think i saw somewhere that threading and internationalisation were issues, so it doesn't sound like an enterprise framework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115633720102675282?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115633720102675282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115633720102675282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115633720102675282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115633720102675282'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/to-ruby-or-not-to-ruby.html' title='To Ruby or not to Ruby'/><author><name>djeeg</name><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-23322135.post-115615677270269651</id><published>2006-08-21T20:27:00.000+10:00</published><updated>2006-08-21T20:39:32.750+10:00</updated><title type='text'>COLLATE and Coalesce</title><content type='html'>I came across both of these items a while ago, but keep forgetting about them when i need to use them. The first is the COLLATE statement in T-SQL. Sometime different databases have different collations and when you try to query between them a collation error occurs. Now i used to always use one of the collations, ie collate Latin1_General_CS_AS. But i knew there was a default one, and i finally found it again (COLLATE database_default).&lt;br /&gt;The other function Coalesce is a C# 2.0 item that does a thing similar to T-SQL's isnull()'s function. So:&lt;br /&gt;string x = null;&lt;br /&gt;string y = null;&lt;br /&gt;string z = "123";&lt;br /&gt;string value = x ?? y ?? z;&lt;br /&gt;(value == "123") == true&lt;br /&gt;So instead of using the :? statement checking nulls, it makes it alot cleaner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115615677270269651?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115615677270269651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115615677270269651' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115615677270269651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115615677270269651'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/collate-and-coalesce.html' title='COLLATE and Coalesce'/><author><name>djeeg</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115594943802002730</id><published>2006-08-19T10:58:00.000+10:00</published><updated>2006-08-19T11:03:58.036+10:00</updated><title type='text'>Javascript Includes not Included</title><content type='html'>Another 2 hours wasted this morning. It all started when a few atlas extender controls started throwing javascript debug alerts. I knew it used to work, and i couldn't see any recent changes that would cause it to break, like extra braces or colons. Then started the debuggin by removing the includes. This lead me back to the webresources, then to inline scripts. Finally i commented out the whole files text and had an alert, but no alert was firing.&lt;br /&gt;&lt;br /&gt;Finally i stumbled accross a similar problem &lt;a href="http://forums.asp.net/2/1332951/ShowThread.aspx"&gt;here&lt;/a&gt;. But then i tried it in firefox, and i got no errors. Doh, this was that IE bug where the cache gets filled an nothing seems to work anymore. I know that happens with view source, but it must also happen with this. As soon as i cleared the temporary internet files, everything worked again. Lucky with subversion i can just revert, not too much damage done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115594943802002730?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115594943802002730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115594943802002730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115594943802002730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115594943802002730'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/javascript-includes-not-included.html' title='Javascript Includes not Included'/><author><name>djeeg</name><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-23322135.post-115594383533321392</id><published>2006-08-19T09:20:00.000+10:00</published><updated>2006-08-19T09:30:35.350+10:00</updated><title type='text'>Static Code Analysis</title><content type='html'>Intergrating FxCop into the cruisecontrol .net build process is not too hard. Also finding the SuppressMessage attribute was by pure luck. This attrbiute allows you to flag exceptions to FxCop rules in your source, rather than in the FxCop project file. But that doesn't phase me too much as i would still like the project file for message historys etc. I just created another file in the properties folder of the assembly for Analysis.cs.&lt;br /&gt;&lt;br /&gt;The trouble with fxcop is that it only checks the compiled source, it doesn't check the actuall source code. I need a tool to intergrate with cruise control to check coding standards. The is a tool called &lt;a href="http://research.microsoft.com/displayArticle.aspx?id=634"&gt;PREfast&lt;/a&gt; in team studio, but i think it only does c/c++ for device drivers. And from the look of &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsent/html/vsts-dev.asp"&gt;this&lt;/a&gt; article, thats all that microsoft offers. There is a java open source project called &lt;a href="http://checkstyle.sourceforge.net/index.html"&gt;checkstyle&lt;/a&gt; that looks promising, but i will have to see that it doesn't throw huge amounts of errors for c#. I am surprised there is not a port yet. The last tool that i had a look at is &lt;a href="http://au.ssw.com.au/SSW/codeauditor/"&gt;SSW Code Auditor&lt;/a&gt; but it seems there server is having troubles at the moment and i can't download the trial. But it says it overs a large amount of source code checking, from cs, to html, to templates and sql.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115594383533321392?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://au.ssw.com.au/SSW/codeauditor/' title='Static Code Analysis'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115594383533321392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115594383533321392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115594383533321392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115594383533321392'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/static-code-analysis.html' title='Static Code Analysis'/><author><name>djeeg</name><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-23322135.post-115573149333571396</id><published>2006-08-16T22:23:00.000+10:00</published><updated>2006-08-16T22:33:39.296+10:00</updated><title type='text'>A MulitView with dynamic Views inside an UpdatePanel Exception</title><content type='html'>After having a hard day coding just before i hit the sack i got this exception that i couldn't find any google results on:&lt;br /&gt;&lt;br /&gt;ActiveViewIndex is being set to '0'. It must be smaller than the current number of View controls '0'. For dynamically added views, make sure they are added before or in Page_PreInit event.&lt;br /&gt;Parameter name: value&lt;br /&gt;&lt;br /&gt;I have an multiview in an updatepanel which has the individual view dynamically generated in OnLoad. So how was i supposed to register them in PreInit if the multiview hadn't even be initialised. Then i stumbled on a solution.&lt;br /&gt;&lt;br /&gt;I added some empty dummy views in the ascx file. Then i just cleared them before loading my own dynamic ones. I only added about 10 as i dont think ill ever need more than that, but if i do ill just add some more.&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&amp;lt;atlas:&lt;span style="color:teal;"&gt;UpdatePanel&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"MultiView1UpdatePanel"&lt;/span&gt; Mode=&lt;span style="color:maroon;"&gt;"Conditional"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;    &amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;        &amp;lt;asp:&lt;span style="color:teal;"&gt;MultiView&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"MultiView1"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt; ActiveViewIndex=&lt;span style="color:maroon;"&gt;"0"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View0"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View1"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View2"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View3"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View4"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View5"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt; ID=&lt;span style="color:maroon;"&gt;"View6"&lt;/span&gt; runat=&lt;span style="color:maroon;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;                Empty&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;/asp:&lt;span style="color:teal;"&gt;View&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;            &amp;lt;%-- add more &lt;span style="color:blue;"&gt;if&lt;/span&gt; needed --%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;        &amp;lt;/asp:&lt;span style="color:teal;"&gt;MultiView&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;    &amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;    &amp;lt;Triggers&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;        &amp;lt;atlas:&lt;span style="color:teal;"&gt;ControlEventTrigger&lt;/span&gt; ControlID=&lt;span style="color:maroon;"&gt;"Menu1"&lt;/span&gt; EventName=&lt;span style="color:maroon;"&gt;"MenuItemClick"&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;    &amp;lt;/Triggers&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;&amp;lt;/atlas:&lt;span style="color:teal;"&gt;UpdatePanel&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;I tried adding this in code in both PreInit and Init before and after the call to base.x() but that didn't work. Ill see later if i can cleanup this solution any better&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115573149333571396?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115573149333571396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115573149333571396' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115573149333571396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115573149333571396'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/mulitview-with-dynamic-views-inside.html' title='A MulitView with dynamic Views inside an UpdatePanel Exception'/><author><name>djeeg</name><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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-115521578823806478</id><published>2006-08-10T23:12:00.000+10:00</published><updated>2006-08-10T23:31:31.050+10:00</updated><title type='text'>WebServiceClientFactory</title><content type='html'>I found something with this Spring.Net webservice class.&lt;br /&gt;When you define the context object:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;object&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;authServerStub&lt;/span&gt;"&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:red;"&gt; type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Spring.Web.Services.WebServiceClientFactory, Spring.Services&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;property&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;ServiceUrl&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;&lt;a href="http://localhost:81/auth/MembershipWS.asmx?wsdl"&gt;http://localhost:81/auth/MembershipWS.asmx?wsdl&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&gt;&lt;/a&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;property&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;ServiceInterface&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;security.web.ISpringMembershipProviderAuthServer, dsecurity&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;object&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;and an interface like this:&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;interface&lt;/span&gt; &lt;span style="color:teal;"&gt;ISpringMembershipProviderAuthServer&lt;/span&gt; {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;bool&lt;/span&gt; ValidateUser(&lt;span style="color:blue;"&gt;string&lt;/span&gt; name, &lt;span style="color:blue;"&gt;string&lt;/span&gt; password);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;when implementing this interface on the server end, you have to make sure that the parameter names match.&lt;br /&gt;normally in c# you dont have to make the names match, only the types, but in this instance i expect that the client proxy generator uses the interface to pass arguements to the server. If you have them named different then you seems to only get null's on the server end.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115521578823806478?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115521578823806478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115521578823806478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115521578823806478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115521578823806478'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/webserviceclientfactory.html' title='WebServiceClientFactory'/><author><name>djeeg</name><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-23322135.post-115521521882928377</id><published>2006-08-10T23:00:00.000+10:00</published><updated>2006-08-10T23:08:47.943+10:00</updated><title type='text'>Spring.Net WebApplicationContext</title><content type='html'>I was tring to use Spring.Net to configure an authentication application that i have been working on. The idea was to have a single-sign on webservice exposed by Spring and also have the client dynamically proxy the service via the same interface. This was all going well until the application would hang at load time with a timeout connection trying to download the webservice wsdl.&lt;br /&gt;&lt;br /&gt;First i narrowed the problem to when spring started, which was when the application initialised a custom membership provider. I could also get to the webservice okay via the browser, so it must have been a context issue. I dropped the dependancy injection and created the webservice client in code and things worked fine. Next i ditched the AOP advice around the service.&lt;br /&gt;&lt;br /&gt;Finally i removed a piece of code i had custom loading the webcontext and replaced it with:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:teal;"&gt;IApplicationContext&lt;/span&gt; ctx = &lt;span style="color:teal;"&gt;WebApplicationContext&lt;/span&gt;.Current;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;This did the trick, but how much time did i waste because of some legacy code i had for a work around for an older version on Spring.NET. Note to self, always work with the latest nightly build.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115521521882928377?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115521521882928377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115521521882928377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115521521882928377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115521521882928377'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/springnet-webapplicationcontext.html' title='Spring.Net WebApplicationContext'/><author><name>djeeg</name><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-23322135.post-115512149172356940</id><published>2006-08-09T21:00:00.000+10:00</published><updated>2006-08-09T21:04:51.740+10:00</updated><title type='text'>Authenticate on LoginControl</title><content type='html'>I just spent 2 hours trying to get my custom membership provider to authenticate. No matter what i did i couldn't get the ValidateUser method to call. I know the provider was getting initialised because the Name and ApplicationName properties were being accessed.&lt;br /&gt;Then i released that i had put this:&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, &lt;span style="color:teal;"&gt;EventArgs&lt;/span&gt; e) {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        Login1.Authenticate += &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;AuthenticateEventHandler&lt;/span&gt;(Login1_Authenticate);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        Login1.LoggingIn += &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;LoginCancelEventHandler&lt;/span&gt;(Login1_LoggingIn);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        Login1.LoggedIn += &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;EventHandler&lt;/span&gt;(Login1_LoggedIn);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        Login1.LoginError += &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;EventHandler&lt;/span&gt;(Login1_LoginError);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;this was left over from some other debbuing and the OnAuthenticate was the problem. It was overriding the default provider login. Doh. So either remove the event or but my custom authentication in here. Kind of simple.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115512149172356940?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115512149172356940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115512149172356940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115512149172356940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115512149172356940'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/authenticate-on-logincontrol.html' title='Authenticate on LoginControl'/><author><name>djeeg</name><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-23322135.post-115508108664281344</id><published>2006-08-09T09:46:00.000+10:00</published><updated>2006-08-09T09:51:26.700+10:00</updated><title type='text'>Security.dll</title><content type='html'>Now heres an interesting problem. I can run a vs2005 site in IIS no problems, but when i try to open it with the debugger in vs2005, i get the exception Unable to start Debugging System.Net.DigestClient. Plug the message into google and the first answer is it.&lt;br /&gt;I have a dll called security and this apparently conflicts with a system dll of the same name.&lt;br /&gt;What do i do, i rename the output of the dll to descurity.dll, clear out the bin directory, restart vstudio and no more problems. Unfortunately i now have to change the names of all the type declarations in web.config and spring files.&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=189705&amp;amp;SiteID=1"&gt;forums.microsoft.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.asp.net/thread/1334291.aspx"&gt;forums.asp.net&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115508108664281344?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115508108664281344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115508108664281344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115508108664281344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115508108664281344'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/securitydll.html' title='Security.dll'/><author><name>djeeg</name><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-23322135.post-115500993813260160</id><published>2006-08-08T13:59:00.000+10:00</published><updated>2006-08-08T14:05:38.133+10:00</updated><title type='text'>Sandcastle CTP</title><content type='html'>At last i will be able to intergrate an api documentor into my cruisecontrol.net build process. Since i have migrated to .net 2.0 i have been without this feature. There are a few people building scripts and &lt;a href="http://dotnetpret.blogspot.com/2006/08/sandcastle-continued-documentation.html"&gt;vs2005&lt;/a&gt; plugins, so time to build the nant task.&lt;br /&gt;Whats this, someone has already done it at &lt;a href="http://blog.jkowalski.net/?p=52"&gt;http://blog.jkowalski.net/?p=52&lt;/a&gt;. Thanks Jaroslaw.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115500993813260160?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/sandcastle/default.aspx' title='Sandcastle CTP'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115500993813260160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115500993813260160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115500993813260160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115500993813260160'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/sandcastle-ctp.html' title='Sandcastle CTP'/><author><name>djeeg</name><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-23322135.post-115500000148801483</id><published>2006-08-08T11:12:00.000+10:00</published><updated>2006-08-08T11:51:41.643+10:00</updated><title type='text'>CodeFileBaseClass to the rescue of Page Inheritance</title><content type='html'>So i had a page that i needed to drop back into a compiled assembly, rather than just having it as a partial class next to the aspx file. This is always good, as you get compile support in the assembly. The only hard part is decalring all the controls you reference in the file as protected. Then i created a skeleton class that just extended the one from the assembly.&lt;br /&gt;&lt;br /&gt;Trouble was that all the control definitions in the base class didn't get wired up. You know how it goes with the protected variables. So i spent a whilte trying public, didn't work. Reading blogs suggested using master pages.. Then Scott Allen on Rick Strahl's blog came to the rescue with the CodeFileBaseClass attribute on the page directive.&lt;br /&gt;&lt;br /&gt;Nice. &lt;a href="http://west-wind.com/weblog/posts/5127.aspx"&gt;Rick's blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Heres an example: &lt;a href="http://aspadvice.com/blogs/joteke/archive/2006/03/08/15655.aspx"&gt;jotek's sample&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-115500000148801483?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/115500000148801483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=115500000148801483' title='38 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115500000148801483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/115500000148801483'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/08/codefilebaseclass-to-rescue-of-page.html' title='CodeFileBaseClass to the rescue of Page Inheritance'/><author><name>djeeg</name><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>38</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-114274272954757833</id><published>2006-03-19T14:31:00.000+10:00</published><updated>2006-08-08T11:52:29.550+10:00</updated><title type='text'>ASP.NET 2.0 Custom TreeNode</title><content type='html'>Helpful links in making custom tree node:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webcontrols/browse_thread/thread/b0f3459b35105353/df2f38d4c2b2dc20?lnk=st&amp;q=Inheriting+from+the+TreeNode+class&amp;amp;amp;amp;amp;rnum=1&amp;amp;hl=en#df2f38d4c2b2dc20"&gt;google groups&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/dannychen/archive/2006/01/25/436454.aspx"&gt;Danny Chen's blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114274272954757833?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114274272954757833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114274272954757833' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114274272954757833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114274272954757833'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/aspnet-20-custom-treenode.html' title='ASP.NET 2.0 Custom TreeNode'/><author><name>djeeg</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-114173725910733761</id><published>2006-03-07T23:12:00.000+10:00</published><updated>2006-08-26T18:49:25.196+10:00</updated><title type='text'>String Function</title><content type='html'>Its always a pain when you are can't remember how to do something and then it takes you a few minutes to search for the syntax as google aint smart enough to turn what i think into effective queries.&lt;br /&gt;&lt;br /&gt;Anyway i was looking for String.Format&lt;br /&gt;&lt;a href="http://www.builderau.com.au/architect/dotnet/0,39024710,39177160,00.htm"&gt;builderau&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And also i found a string truncate function:&lt;br /&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/100202-1.2.aspx"&gt;4guysfromrolla&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its always nice.&lt;br /&gt;&lt;br /&gt;Update: found these examples too:&lt;br /&gt;&lt;a href="http://blog.stevex.net/index.php/string-formatting-in-csharp/"&gt;http://blog.stevex.net/index.php/string-formatting-in-csharp/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114173725910733761?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114173725910733761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114173725910733761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114173725910733761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114173725910733761'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/string-function.html' title='String Function'/><author><name>djeeg</name><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-23322135.post-114164791397335082</id><published>2006-03-06T22:20:00.000+10:00</published><updated>2006-08-08T11:57:24.703+10:00</updated><title type='text'>.Net 2.0 Code Profilers</title><content type='html'>When I went to try to profile my application in c# 2.0 I wasn't surprise to see that the old application that I used in 1.1 did not work anymore. These seem to be the current tools for profiling:&lt;br /&gt;&lt;br /&gt;Free:&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=A362781C-3870-43BE-8926-862B40AA0CD0&amp;amp;displaylang=en"&gt;CLR Profiler&lt;/a&gt;&lt;br /&gt;&lt;a href="http://nprof.sourceforge.net/Site/SiteHomeNews.html"&gt;nprof&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cost:&lt;br /&gt;&lt;a href="http://www.red-gate.com/products/ANTS_Profiler/index.htm"&gt;ANTS Profiler&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.automatedqa.com/products/aqtime/index.asp"&gt;aqtime&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jetbrains.com/profiler/download/"&gt;jetbrains&lt;/a&gt;&lt;br /&gt;and last but not least, the most expensive version of VS2005&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/vstudio/products/vsts/compare/"&gt;vsts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will try the CLR Profiler first and if the results are no good/hard to decipher, which I except, I will download the trial of ANTS, as that seems to be the recommended one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114164791397335082?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114164791397335082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114164791397335082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114164791397335082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114164791397335082'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/net-20-code-profilers.html' title='.Net 2.0 Code Profilers'/><author><name>djeeg</name><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-23322135.post-114152242116228879</id><published>2006-03-05T11:26:00.000+10:00</published><updated>2006-08-08T11:54:55.253+10:00</updated><title type='text'>ASP.NET 2.0 EventValidation</title><content type='html'>When building an ajax enabled folder list view control, ran into a problem where i was clicking on the folder node, which caused a postback to the datagrid control. Trouble was then when i tried to operate on the datagrid control (sort, select) i was getting an error:&lt;br /&gt;&lt;br /&gt;The state information is invalid for this page and might be corrupted.&lt;br /&gt;&lt;br /&gt;After doing a lot of reading about it, this problem is caused by the event validation feature of ASP.NET 2.0. This is where the items in the datagrid are added to an event validation thingy, so that incorrect values can not be used to postback. Now i can solve it two ways, either by disabling eventvalidation it in web.config:&lt;br /&gt;&lt;a href="http://forums.asp.net/1/1173230/ShowPost.aspx#1173230"&gt;forums.asp.net&lt;/a&gt;&lt;br /&gt;&lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=159495"&gt;channel9&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.asp.net/2/1064482/ShowPost.aspx#1064482"&gt;forums.asp.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or by registering each of the new items that i add to the datagrid for the callback so that event validation works correct:&lt;br /&gt;&lt;a href="http://www.alexthissen.nl/weblog/PermaLink.aspx?Guid=cadcb2b4-d3c3-406b-a9a6-ae6c2bbfc758"&gt;alexthissen.nl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will see how easy it is added the validation, and hope that magicajax will correctly handle the updates. Otherwise i will just turn off the security feature as suggested here:&lt;br /&gt;&lt;a href="http://forums.asp.net/3/1064482/ShowPost.aspx"&gt;forums.asp.net&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114152242116228879?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114152242116228879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114152242116228879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114152242116228879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114152242116228879'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/aspnet-20-eventvalidation.html' title='ASP.NET 2.0 EventValidation'/><author><name>djeeg</name><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-23322135.post-114146822980474348</id><published>2006-03-04T20:25:00.000+10:00</published><updated>2006-03-04T20:30:29.813+10:00</updated><title type='text'>ASP.NET 2.0 AJAX Frameworks</title><content type='html'>Wiki:&lt;br /&gt;&lt;a href="http://ajaxpatterns.org/DotNet_Ajax_Frameworks"&gt;http://ajaxpatterns.org/DotNet_Ajax_Frameworks&lt;/a&gt;&lt;br /&gt;Comparisons:&lt;br /&gt;&lt;a href="http://www.daniel-zeiss.de/AJAXComparison/Results.htm"&gt;http://www.daniel-zeiss.de/AJAXComparison/Results.htm&lt;/a&gt;&lt;br /&gt;Atlas Tutorial:&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx&lt;/a&gt;&lt;br /&gt;MagicAjax:&lt;br /&gt;&lt;a href="http://www.magicajax.net/"&gt;http://www.magicajax.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Decisions, decisions, which framework will i choose...&lt;br /&gt;&lt;br /&gt;This is an awesome looking control so i hope whatever i choose i can build professional controls like this:&lt;br /&gt;&lt;a href="http://www.componentart.com/demos/grid/features/ajax_grid/WebForm1.aspx"&gt;http://www.componentart.com/demos/grid/features/ajax_grid/WebForm1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114146822980474348?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114146822980474348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114146822980474348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114146822980474348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114146822980474348'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/aspnet-20-ajax-frameworks.html' title='ASP.NET 2.0 AJAX Frameworks'/><author><name>djeeg</name><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-23322135.post-114136047850056730</id><published>2006-03-03T14:33:00.000+10:00</published><updated>2006-03-03T14:34:38.500+10:00</updated><title type='text'>Format Source Code in Blog</title><content type='html'>I suppose this is the must have tool for posting source code into blogs. A real time saver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114136047850056730?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://jasonhaley.com/blog/archive/2005/12/27/131246.aspx' title='Format Source Code in Blog'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114136047850056730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114136047850056730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114136047850056730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114136047850056730'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/format-source-code-in-blog.html' title='Format Source Code in Blog'/><author><name>djeeg</name><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-23322135.post-114135749878678586</id><published>2006-03-03T13:35:00.000+10:00</published><updated>2006-03-03T16:31:06.890+10:00</updated><title type='text'>MSDN VirtualPathProvider</title><content type='html'>So i copied all the code, make the files, make a web application in IIS. Doesn't work, so i have to make a few fixes to the code (ending brackets, change GetData on VirtualFile to use this.VirtualPath, rather than this.Name). Still doesn't work. Finally have to add httphandlers.&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:maroon;"&gt;xml&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;version&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;1.0&lt;/span&gt;"&lt;span style="color:blue;"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;configuration&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;system.web&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;compilation&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;debug&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;true&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;customErrors&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;mode&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Off&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;trace&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;enabled&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;true&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;requestLimit&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;100&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;pageOutput&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;true&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;traceMode&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;SortByTime&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;localOnly&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;false&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;httpHandlers&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;add&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;verb&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;*&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;path&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;*.vrf&lt;/span&gt;"&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;System.Web.StaticFileHandler&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;httpHandlers&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;system.web&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;configuration&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;And still cannot access by "~/", must access by "~/default.aspx".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114135749878678586?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn2.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx' title='MSDN VirtualPathProvider'/><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114135749878678586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114135749878678586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135749878678586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135749878678586'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/msdn-virtualpathprovider.html' title='MSDN VirtualPathProvider'/><author><name>djeeg</name><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-23322135.post-114135644684783353</id><published>2006-03-03T13:05:00.000+10:00</published><updated>2006-03-03T17:39:04.716+10:00</updated><title type='text'>VirtualPathProvider IIS vs ASP.NET Development Server</title><content type='html'>One thing that I have found when working in VS2005, is that I can be testing my VirtualPathProviders, and they will all work correctly for unmapped extensions. That is images (jpg, gif), styles sheets (css) and script files (js). Then when I move the application to run in IIS 6.0 the behaviour is different. This is because it seems that IIS does not even dispatch requests for such files to the ASP.NET runtime. So my VirtualPathProviders are not even used. Its strange how the two servers run differently.&lt;br /&gt;&lt;br /&gt;The solution for IIS, to this problem is within one of Mark DÂUrso's presentations, &lt;a href="http://blogs.msdn.com/mdurso/"&gt;http://blogs.msdn.com/mdurso/&lt;/a&gt; [VSLive]. It involves adding a Wildcard Application Map in IIS's snapin (application configuration-&gt;mappings). With this mapping in place though, the ability to have default documents in a folder is lost. When normally requesting an aspx page, the ISAPI extension takes control from IIS. When you request a file that does not have an ISAPI mapping, IIS just servers the file itself. With the wildcard, all files are palmed off to the ASP.NET application extension. Don't know how this affects load/caching, having all files go though ASP.NET.&lt;br /&gt;&lt;br /&gt;Heres what msdn says about wildcard application mappings in IIS 6.0:&lt;br /&gt;&lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some info on httphandlers when wildcard application mappings are used:&lt;br /&gt;&lt;a href="http://support.microsoft.com/?kbid=909641"&gt;http://support.microsoft.com/?kbid=909641&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Static mappings for content served by ASP.NET compared to IIS&lt;br /&gt;&lt;a href="http://www.agileprogrammer.com/dotnetguy/archive/2003/05/04/4550.aspx"&gt;http://www.agileprogrammer.com/dotnetguy/archive/2003/05/04/4550.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114135644684783353?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114135644684783353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114135644684783353' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135644684783353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135644684783353'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/virtualpathprovider-iis-vs-aspnet.html' title='VirtualPathProvider IIS vs ASP.NET Development Server'/><author><name>djeeg</name><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>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23322135.post-114135495036113552</id><published>2006-03-03T12:23:00.000+10:00</published><updated>2006-03-03T13:03:06.246+10:00</updated><title type='text'>ASP.NET 2.0 VirtualPathProvider</title><content type='html'>Wouldn't it be nice in web applications to have all scripts and images embedded in an assembly so that you only had to release one file. Now if you used this common library across more than one project, you may not want to rely upon VS 2005's web deployment project. Each project would then have to be compiled separately.&lt;br /&gt;&lt;br /&gt;One method of achieving this would be to use ASP.NET 2.0's VirtualPathProvider. Apparently you should be able to set up certain path's that map to what you want, rather than the filesystem. This could be a database, xml file or in this instance, an assembly.&lt;br /&gt;&lt;br /&gt;If I wanted to create an assembly for a client script application, for example a html content editor, that consisted of style sheets, images and script files, the idea would be to map the path, ~/scripts/htmleditor, to a custom VirtualPathProvider. This provider would then read the file from the assembly and return it to the client.&lt;br /&gt;&lt;br /&gt;Here are a few links to how to implement:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/davidebb/archive/2005/11/27/497339.aspx"&gt;http://blogs.msdn.com/davidebb/archive/2005/11/27/497339.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dotnetjunkies.com/WebLog/teund/archive/2005/02/15/54446.aspx"&gt;http://dotnetjunkies.com/WebLog/teund/archive/2005/02/15/54446.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23322135-114135495036113552?l=djeeg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djeeg.blogspot.com/feeds/114135495036113552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23322135&amp;postID=114135495036113552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135495036113552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23322135/posts/default/114135495036113552'/><link rel='alternate' type='text/html' href='http://djeeg.blogspot.com/2006/03/aspnet-20-virtualpathprovider.html' title='ASP.NET 2.0 VirtualPathProvider'/><author><name>djeeg</name><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>
