Home | Categories | Sources | Sites | Languages | About
Note: The project has been discontinued
#region /* mads's thoughts */ [Site] [XML]
Description: backlog on sharepoint, office and .net development
Last Update: 19:39:47 05/27/2006

Additional Info

First Fetched: 00:18:10 01/31/2004
Last Updated: 19:39:47 05/27/2006


<< >> 1 2 3 4
More VSTO Deployment - AppCheck and PIACheck compiled
A while ago Microsoft released a walkthrough for VSTO deployment to, as Misha puts it; "not remove the pain but help controlling it". The walkthrough covers all my (less structured) instructions, and improves on security aspects.However the article does provide you with a fair amount of work. The security part adds strong-name based evidence for assemblies which is absolutely required from a security perspective. However, the samples does not support multi-assembly deployments so you'll need to write this up yourself. I'll look into using Assembly.GetReferencedAssemblies() later on to see if that will solve this problem.Furthermore you get native checking utils for common prereqs. These are not compiled however and Aerodrome has posted a compiled version. Although these exe's (PIACheck.exe and AppCheck.exe) works nicely if you've got the .NET Framework preinstalled, they will fail if not. Probably because they're compiled in managed C++, and not the way instructed in the MSDN ...
09:46:00 May 3, 2006, Wednesday (PDT) Source: #region /* mads's thoughts */
MSCRM 3.0 and the VSTO for MSCRM 3.0 Toolkit
Read about the upcoming VSTO Toolkit for MSCRM 3.0 at Kjell-Sverres blog. Beeing Objectwares MSCRM guru KSJ also have started writing about general 3.0 topics. Keep watching if you're in the MSCRM space.
11:52:00 December 3, 2005, Saturday (PST) Source: #region /* mads's thoughts */
Validating Sharepoint filenames on upload
Some characters are legal for FAT or NTFS files but illegal for files in Sharepoint documentlibraries. Using the regular upload UI for Sharepoint you'll encounter a rather unpleasant validation error when uploading a file with funky characters. Using the object model will give you a good ole' exception. I've seen a lot of approaches to solving this problem, and implemented a couple myself. Last night I noticed a method on the SPEncode static class that enabled a clean approach to the problem (updated for double punctuation mark problem): private string CleanForUrlAndFileNameUse(string dirtyFileName) { char[] dirtyChars = dirtyFileName.ToCharArray(); foreach (char c in dirtyChars) { if (!SPEncode.IsLegalCharInUrl(c)) { dirtyFileName = dirtyFileName.Replace(c.ToString(), ""); } } // Spaces are not appreciated dirtyFileName = dirtyFileName.Replace(" ", ""); // double punctuation marks causes validation error while(dirtyFileName.IndexOf("..") != -1) dirtyFileName = ...
06:28:00 November 17, 2005, Thursday (PST) Source: #region /* mads's thoughts */
Refresh page after edit in InfoPath
When using InfoPath for editing data in you webapplications you run into a couple of tricky situations when beeing used to plain webdevelopment. One of these scenarios is when you want your webpage to refresh after having edited a record in some datasource with InfoPath. Typically you've implemented a view webpage and edit with InfoPath. This sounds pretty uncomplicated, and I guess it is, but still it took me quite a while to figure out. My first attempt was to use standard web techniques like opening a browser window pointing to the infopath form modally with showModalDialog and refreshing the hostpage on return. No luck. I was thinking about creating a custom hostpage utilizing iframes to open the document much like a lot of people do to handle pdfs, but I really don't like adhoc host'ish pages in my solution. I also considered going all the way and serve my Infopath documents dynamically, but that would have been to big of a change to my current solution. I went back and ...
02:26:00 November 1, 2005, Tuesday (PST) Source: #region /* mads's thoughts */
Complete set of Custom Prerequisites available
Seems like VSTO Outlook deployment just got easier. I now have Custom Prerequisites for Office 2003 (SP2), Outlook 2003 (SP2), Office 2003 PIA and the Visual Studio Tools for Office 2005 Runtime ready. I got some feedback from the community on my previous post and I've updated my article with my findings and also a download for the prerequisite definitions for Visual Studio 2005. VSTO Outlook: the Complete Setup Solution Please provide feedback on this if you find bugs or points of improvement.
12:18:00 October 26, 2005, Wednesday (PDT) Source: #region /* mads's thoughts */
VSTO Outlook: The complete deplyment solution
This week has been all about the pain of client deployment of our VSTO solution. I've written a summary which I hope will be the start of the complete solution for idiot-proof installs of Outlook plugins. I'm not quite there yet but I feel I'm pretty close. Read it here! Input and feedback is very welcome! Also check out Peters blog for VSTO content and the MSDN VSTO Forums.
11:30:00 October 14, 2005, Friday (PDT) Source: #region /* mads's thoughts */
Recycle Bin / Undelete for Document Libraries finally solved
Last week I met Todd from Mindsharp in Seattle and he told me that he'd just created a purely client side solution to the whole undelete / recycle bin problem with Sharepoint document libraries. Several solutions have been posted to address this issue in the past, amongst others Max and Erics article in MSDN Mag. The beauty of Todds solution is it simplicity. Todd has solved everything from the clientside and wrapped it all up in a list template (.stp) file. In addition to supply undelete features (and even right-shift key integration!!) he also adds the bonus of multitemplate document creation. Giant kudos to Todd for this excellent piece of Sharepoint/javascript voodoomagic. In my opinion this is the final solution for undelete until WSS v3 arrives. Get it here!
07:03:00 October 7, 2005, Friday (PDT) Source: #region /* mads's thoughts */
InfoPath DropDown List doesn't match on items in list
When populating InfoPath DropDown lists with values and then binding the dropdown to a field in your main datasource you'll sometimes see the bound value instead of its corresponding text value in the dropdown on load. It seems slightly confusing given that the entry containing your bound value is actually in the list, but it doesn't match. Most likely this is a string casing problem. I've got a dropdown bound to a Sharepoint (WSS) UserGroup service and bind the value to @LoginName. These values are typically DOMAIN\login.name. My main datasource however, lowercases all reference variables to avoid any confusion. Since I don't control the formatting done by the Sharepoint service my best bet is to lowercase the values of the @LoginName attributes in my secondary datasource. First off I got excited by this post on the InfoPath Blog which feels a bit like calling C# or javascript code from regular XSLT transformations. The blog describes calling code to evaluate conditions, not ...
07:30:00 October 6, 2005, Thursday (PDT) Source: #region /* mads's thoughts */
WebBrowser control and InvokeScript
This is a little code nugget I planned to blog about a while ago, but forgot, so my recap and reasoning is not a 100% but hopefully it might be of help to someone struggelig with making the System.Windows.Forms.WebBrowser control execute scripts programatically. I started out using the WebBrowser.InvokeScript method to force execution of clientside scripts in the page that was loaded in my WebBrowser control: HtmlWindow win = doc.Window;doc.InvokeScript("Update_UI_From_Values();"); This is where my reasoning is not complete (because i didn't bother to actually reproduce the original problem..), but basically it didn't work as expected. After some Reflector action I figured out that the mshtml.IHTMLWindow2.execScript method wasn't actually directly mapped into the new WebBrowser APIs and I figured I'd give it a go and add a reference to Microsoft.mshtml.dll (COM component Microsoft HTML Object Library): mshtml.IHTMLWindow2 win = ...
03:24:00 September 23, 2005, Friday (PDT) Source: #region /* mads's thoughts */
Error using VSTO 2005 Outlook Addin with VS2005 RC1
Just installed Visual Studio 2005 RC1 and reinstalled Visual Studio Tools for Office 2005 Outlook on top to continue working on my Outlook Add-in. When trying to cast a MailItem object i recieved the following error: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063034-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).. Seems like something didn't register properly and after performing the following operation from the Visual Studio 2005 Command Prompt (in a folder containing the dll) I was back up and running: regasm Microsoft.Office.Interop.Outlook.dll
07:29:00 September 22, 2005, Thursday (PDT) Source: #region /* mads's thoughts */
Temporary Release of Outlook Plugin code
This summer I got the opportunity to demo a VSTO Outlook plugin at TechEd in Amsterdam. The demo was done on a prototype made as a proof-of-concept for a customer in the preceeding weeks (not actually the night before the demo:-). The prototype was accepted and development for production was planned to the first weeks of august. Unfortunately this has been postponed, so to accomodate those of you out there who wants to check out the code I'm now releasing the prototype codebase. I would like to stress that this was developed as a proof-of-concept. Documentation is less than poor, code quality is quite frankly very close to embarrassing, but it runs. Use it to get an idea of how it might be done. The future plan for the plugin has evolved. We're currently looking into creating a very robust "Sharepoint Favorites System" to be able to keep track of favorite sharepoint sites and import such links from both sharepoint lists (online) and possibly internet explorer favorites. We're ...
10:00:00 August 23, 2005, Tuesday (PDT) Source: #region /* mads's thoughts */
Google Earth once again available for download
And wow. Now a lot more info is coming up in the views. All major norwegian roads and names are now rendering. Damn it's cool! I just got stuck another 10 minutes. So. In about a week I leave for my summer vacation. Not going too far this year, spending two weeks at our cabin in Kragerø. Most tourists miss out on the southern coast of Norway in the summer, so if you're going; don't. Ian Campbell just mailed me about his upcoming SMove for Sharepoint (move sites around with a nice steady UI), and he asked where I was going this summer. So Ian, I'm going here this summer (load the link up in http://earth.google.com).
06:20:00 July 15, 2005, Friday (PDT) Source: #region /* mads's thoughts */
Options for Aggregating Sharepoint Sub-site content
Creating aggregated views or Sharepoint content is a reoccuring topic. I've blogged about using RSS feeds to create aggregations or Roll-Ups (actually a CorasWorks trademark) before. You generally have more options if the content you're aggregating (or rolling up) is located on subsites to a specific site. The U2U RSS Feed for Microsoft Sharepoint 2003 will enable you to define highly customizable RSS feeds for specific lists or document libraries. Only drawback is that you actually have to define each feed, which pretty much rules out using it when your site count grows on a daily basis. For this scenario the previous version that Jan created is more suitable, because it exposes a generic What's New feed for all sites on your server. RSS enables monitoring of content, but in other scenarios you'd want to work on the aggregated content more like a ListViewWebPart. The first thing you'll run across is the CorasWorks Roll-upTM webparts. These are general purpose well crafted ...
05:10:00 July 15, 2005, Friday (PDT) Source: #region /* mads's thoughts */
MVP Awarded
Last friday I got the email. I have been given the honor of the Most Valuable Professional title/award/membership. Today my profile was made public on the MVP site, and I attended the MVP lunch where MVP program manager Sean O'Driscoll gave a good overview of the program. I'm very pleased and excited about beeing in the same crowd as all those other professionals who are contributing all over the world. It's been a good week:-)
14:18:00 July 7, 2005, Thursday (PDT) Source: #region /* mads's thoughts */
Oracle watches SQL Server Migration Assistant like hawkes
I am currently attending a session on the SQL Server Migration Assistant for Oracle. Basically a tool to get your database from Oracle to the Microsoft platform. We've got a guy from Oracle in the audience:
12:22:00 July 7, 2005, Thursday (PDT) Source: #region /* mads's thoughts */
VSTO Demo at TechEd
Today I was lucky enough to get the opportunity to do a demo in Mike Fitzmaurices session on Sharepoint/Exchange integration and, later on, at Andrew Whitechapels session on VSTO. The demo was on the the Visual Studio Tools for Office 2005 Outlook Add-in I've been working on lately. Basically it allows you to store mail in document libraries efficiently including dynamic metadata handling. As I said in the session we've been so fortunate to have the customer (Lorentzen & Stemoco) approve the release of the solution to the general public. There is still some stuff that needs to be resolved, but I will blog about it as soon as it's out. BTW: in some time Microsoft will release a customer evidence video on the solution at Lorentzen & Stemoco. Feel free to let me know that you're interested. I might ask for advice on how to release the code (sourceforge/gdn/simple download?). I'm also interested in hearing about how you want to use it, or what you might want to add to it. Off-topic ...
10:06:00 July 7, 2005, Thursday (PDT) Source: #region /* mads's thoughts */
TechEd '05 Commenced - where are the v-celebs?
Well, it's 0817 and I'm already registered at Teched and hooked up to the wlan. This rare occasion of early-birdness was not by my free will, but more an upside of the construction-guys powering up the jackhammer outside my hotel window at 0700hrs (anything before eight o'clock is in military time in my world). Anyways I'm good to go! Last night we went for a boatride with dinner with the norwegian crowd. Speakers Mark Bower and Jessica Gruber of Microsoft UK came along. We had a lot of fun, but covered some serious topics aswell. Most importantly we finally put a name on the phenomenon: What do you call the "geek-celebs"? You know the guys that gets the best ratings at teched, drawing the most people and are pretty close to autographing last years orange bag for the most dedicated of nerds: v-celebs ('vE dash ce·lebs) Term derived from "vertical-celebrities" and rewritten in the Microsoft in-house consultant email-style to reflect their status as close to, or inside the ...
01:34:00 July 5, 2005, Tuesday (PDT) Source: #region /* mads's thoughts */
Dynamic InfoPath Forms Impossible?
UPDATE: The scenario gets less and less impossible:-) I embarked on our first major InfoPath based solution looking forward to sunny days. My biggest mistake seems to be not leaving my ASP.NET mindset behind. I started out creating a form that looks up data based on an id from a service and updates the data. I wanted the form to load data for editing on open, freeing users from having to query with the id manually. The form was supposed to be deployed on several Sharepoint sites, each with a different id for looking up the data. I figured that InfoPath must have some way of beein parameterisized, but no, not without somehow altering the xml of the source document. What I really wanted was some kind of QueryString. My first hunch was to promote the id field from the form to the form library and the alter the value in the form library, but it's read-only. Editing the properties.xfp file in the Form Library Forms directory removes the read-only, but the value does not propagate two ...
11:07:00 April 8, 2005, Friday (PDT) Source: #region /* mads's thoughts */
Anders Hejlsberg visits Oslo
Today we've had the pleasure of having Anders Hejlsberg on a visit to Oslo and he's been touring press, academic foras, NNUG, JavaBin, and a Microsoft hosted event. My colleague Trond Brande followed mr. Hejlsberg with two talks on upcoming SQL Server 2005, and I finished the day at Folkets Hus with two sessions on Best Practices for development, and Visual Studio Team System. Although some were there only for the main attraction, most stuck around all the way through Team System and we had several interesting questions. I've made my presentations available here and here, and they'll also be available at Microsoft somewhere pretty soon. Watch out for the Microsoft Days coming up soon all around Norway: Oslo: 27th - 28th of AprilTrondheim: 3rd - 3th of MayBergen: 10th - 11th of MayStavanger: 12th - 13th of May
10:15:00 April 5, 2005, Tuesday (PDT) Source: #region /* mads's thoughts */
SourceVault and CruiseControl.NET
For a recent project we had to discard Visual Source Safe for source control because we needed remote access to our build system. Previously we've been using SourceGears Source Off Site to access VSS, but this time we noticed that SourceGear had a pricing model that made their SQL Server based source control system Vault a cheaper option. In the process we also considered moving to CVS which was available internally, but discarded it due to the developers incompetence (myself included) on the subject. Blessed with a non-filesystem based source control we set up our buildserver with the latest version of CruiseControl.NET. At first we tried the 0.8 release, but soon figured out that we had to use the latest build of ccnet instead which so far seems stable. Using Vault was about a day of getting used to (from a VSS perspective) but somewhat disappointing when it came to ccnet integration. No longer did we have the autoGetSource feature, so a bootstrap buildfile was required. The ...
10:47:00 March 19, 2005, Saturday (PST) Source: #region /* mads's thoughts */
Sharepoint Include and Exclude Content and the Site Directory
Internally we're using several site directories around the portal to categorize external content, both WSS sites and other stuff. We are pretty liberal in allowing people to create sites and add links to sites with relevance. There's YASQ related to this. First let me explain how the Site Directory area template works. The Site Directory template is really just an Area with a list. I usually compare the Directory to a whitepages listing that allows you to tag content with metadata, like you tag people with addresses and phone numbers in the phonebook. If your address changes there are no high coupling to the phonebook so using Site Directories provides more flexibility than creating site hierarchies in WSS to indicate associations. When clicking "Create Site" from the Site Directory Area Template (no matter where it is instantiated) you're basically going to perform three functions: Create a new top-level WSS site (yes, always top-level) Create an entry in the "whitepages", i.o.w. ...
03:01:00 February 22, 2005, Tuesday (PST) Source: #region /* mads's thoughts */
Sharepoint Content RSS Feeds unlocked
I usually don't bother crosslinking plainly obvoius fantastic stuff, simply because everyone else does it, and noone really needs another "i've also seen it" posting. However this time I just can't help myself. I recently unlocked Sharepoint content using RSS with Jan and Patricks early beta of the RSS feed generator. Now they've done it again: RSS Feed Generator Available for Download In addition to their (and Maxims) already much appreciated SmartPart this release builds significant value on any Sharepoint installation. Why Patrick wasn't accepted for Teched US this year beats me, but I'd sure like to know this; how did you guys get the day expanded from 24hrs to a 100:-) Impressive contribution. Just impressive...
07:25:00 February 19, 2005, Saturday (PST) Source: #region /* mads's thoughts */
Light-weight extension of Sharepoint Document Management
I recently helped the Norwegian video-conference company Tandberg get more value out of their Sharepoint installation through extended project support features and improved desentralized internal publishing. The existing routines for document management were heavily based on a centralized assignment of unique document numbers. Early in the process it was agreed that internally both the document url and the Sharepoint guid were unique identifiers for documents, but none of these could be used externally. This called for extending Sharepoint with functionality for assigning unique document numbers. A primary goal in the project was not to choose solutions that required deploying custom code on the Sharepoint server. We tried several approaches but they were rejected on poor user experience (extensive use of lists and custom relations and custom auto-numbering). The final solution was based on a service oriented approach, and a simple chubby client implementation in the Sharepoint UI. ...
16:04:00 February 16, 2005, Wednesday (PST) Source: #region /* mads's thoughts */
InfoPath + Amazon Web Service = wtf!?
Wow. I'm getting into InfoPath these days and wanted to use the Amazon E-Commerce Service 4.0 to retreive some data. I've tried and reproduced this on two machines so far: Open InfoPath Design a form > New blank form Tools > Data Connections > Add Receive Data > Web Service > Paste URI http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl Select an operation > ItemLookup > Next > CRASH! Who's to blame? InfoPath or the Amazon WebService. Well, FrontPage consumes the service without violently terminating without giving any errormessages. Anyone else able to reproduce?
08:22:00 February 9, 2005, Wednesday (PST) Source: #region /* mads's thoughts */
Disappearing Sharepoint folders in Explorer view
Heads-up on this one people (YASQ - yet another sharepoint quirk): When having content approval enabled for a document library and using explorer view to make changes, content are not automatically approved when adding items or making changes. This can give the impression of stuff disappearing in your document libray. If you've got content approval enabled and add or rename a file or folder in Explorer View it will simply disappear from the All Documents view. You'll have to approve the change in the Approve/Reject view to make it appear again. Very scary if you had a million documents in that folder. To make the confusion complete you'll also need to be aware of possible caching in the Explorer View control. If you create a folder called "test" in Explorer View, then return to the Approve/Reject View and select "Delete" on the item pending and return to the "All Documents" view the "test" folder is gone. If you open the Explorer View again the folder "test" is still there (at ...
05:17:00 February 8, 2005, Tuesday (PST) Source: #region /* mads's thoughts */
Blogmap in 15 seconds
Through Mark Bower: I just placed my blog on the Map(Point). Very cool, even though MapPoint seems to have a funny look at Oslo (It's really not "Frognersætra", but "Frognerseteren", and it's not located right next to Skillebekk). Check out Chandu Thota and his blogmap project , takes just about 15 seconds to get it going! And btw: man I want to make some location aware software *drewl*.. And btw2: I recon I'll put this on my Sharepoint MySite aswell (just so I could add this to my Sharepoint feed:-)
02:53:00 February 7, 2005, Monday (PST) Source: #region /* mads's thoughts */
Creating Site Roll-ups in Sharepoint with RSS
Roll-ups of information from several (top-level or nested) Windows Sharepoint Services sites has been a “nice-to-have” feature mentioned in several Sharepoint projects I've been involved with. Commercial solutions is available in the market, like the CorasWorks package. However these solutions tend to be too expensive to justify. By using a combination of RSS feed generation and RSS feed consumption webparts (both opensource or freeware) it is possible to create roll-up like functionality with minor configuration effort. The Leadit.Sharepoint.Services, written by Jan Tielens, provides an RSS feed for every site in the portal, and the SmilingGoat FeedReader displays such feeds in a webpart. (More Sharepoint RSS solutions listed by Daniel here). By configuring the FeedReader as illustrated we can extract information about changes in all or selected Sharepoint lists on a certain site. The FeedReader of course allows us to configure several feeds for display thus creating a nice rollup ...
08:35:00 February 4, 2005, Friday (PST) Source: #region /* mads's thoughts */
Enterprise Continous Integration
Mike Roberts, one of the lead devs of the CruiseControl.NET project, has just published a paper on Enterprise Continous Integration. Mike is addressing a very importan issue of Continous Integration and automated build processes, namely "What to do when the build takes too much time?". Integration time was one of the hot potatoes at last years BoF with James Newkirk at TechEd. Mike outlines a solution for splitting up those 10 min -> 12hrs (!?!!?) builds. We have practiced a lightweight solution of Mikes approach for a good while. In our CI projects we don't use the file system monitor. We've included extended targets for release builds of our "root" projects. When a project is built in release and other projects have dependancies to it, the project deploys the new components directly into the sourcecontrol of the dependant projects. This will automatically trigger a build just as any other change. Of course, this is not as robust as Mikes approach, but very quick to implement with ...
16:41:00 February 2, 2005, Wednesday (PST) Source: #region /* mads's thoughts */
Playing with SharePointPSSearch SQL Syntax
I've been working with a technical customer lately and they wanted me to demonstrate what they could do with the Sharepoint Search engine. I explained that you could easily consume the portal search service just as any other web service (as Bil describes nicely here) and make customized searches. They wanted me to make a demo as a proof-of-concept so I created a portal area on their test server and added what they needed to experiment for themselves in addition to a small sample. The cool thing about this is that you really can experiment with the SharepointPSSearch SQL Syntax right in the browser. The setup was really basic; one Form (get dwp here)webpart with the default querypacket xml displayed inline, one DataView webpart consuming the search.asmx service based on the form input (get dwp here), and a Sample webpart displaying a predefined call to QueryEx. The sample was a little bit tricky to get working. I needed to call QueryEx to get DataSet formatted xml returned. ...
13:16:00 February 2, 2005, Wednesday (PST) Source: #region /* mads's thoughts */
Setting MySite as Office Default WebSite
My experience is that frustration usually leads to salvation, this took me two days and lead to a 90% solution and explanation. Day 1 I just reinstalled all my software, thus the My Site link in Office save open dialogs disappeared. No problem I thought and went to MySite to click the "Set as Office default website" link. Well, it did not show, so I created a custom link with a content editor webpart to be able to call the script "setPersonalSite()". This had no effect. By examining the script I found that an ActiveX control called PortalConnect.PersonalSite was involved. Because I'd tried just about everything to disable security (yeah, I just installed Windows XP SP2) on all levels I figured I could try calling the component directly from managed code through COM Interop. No luck here either. A COMException of the unknown type blessed my console application which left me kind of blank. More research lead me to the assumed functionality of this code, which is in fact simply ...
07:03:00 January 25, 2005, Tuesday (PST) Source: #region /* mads's thoughts */