NSilverBullet

Complex solutions for simple problems.

  • All posts in the month of November, 2006
Your Ad Here

Migrating Asp.Net 1.1 to .Net 2.0 - DevDays 2006


Wednesday 29 November, 2006 (.Net | Speaking | Web)

I will be speaking at DevDays 2006 here in Sweden next week on the topic of migrating Asp.Net 1.1 applications to Asp.Net 2.0. It is an interesting topic especially when you really start looking under the covers at what has changed at a lower level. The whole session will be recorded and may be made publicly available at a later date.

For anyone else who is interested in this topic these are some of the resources I have used for my presentation:
What's New in ASP.NET
ASP.NET 2.0 Internals
Codebehind and Compilation in ASP.NET 2.0
Master Pages in ASP.NET 2.0
Understanding Page Inheritance in ASP.NET 2.0
Migrating from ASP.NET 1.1 to ASP.NET 2.0

Comments [0]

Your Ad Here


Calculator in the URL


Wednesday 29 November, 2006 (Geek | Humor)

This may not be Web 2.0 but it is definitely proof that some people have too much time on their hands...

http://$urlcalc(help).x42.com/

If you need to know what 212x17 is then go to http://$mul(212,17).x42.com/
Brushing up on your RFCs? http://$rfc(1725).x42.com/

Google must have used this site as inspiration for their search calculator: http://www.google.com/search?q=212x17

Comments [0]


HTML visualizer


Tuesday 28 November, 2006 (Geek | Web)

I found a cool applet online that creates a graphical tree structure of any website. This is the first page of nSilverBullet on the 28th November 2006:

blue: for links (the A tag)
red: for tables (TABLE, TR and TD tags)
green: for the DIV tag
violet: for images (the IMG tag)
yellow: for forms (FORM, INPUT, TEXTAREA, SELECT and OPTION tags)
orange: for linebreaks and blockquotes (BR, P, and BLOCKQUOTE tags)
black: the HTML tag, the root node
gray: all other tags

You can try it out here: HTML DOM visualizer

Comments [0]


Messing with dasBlog content folder


Tuesday 28 November, 2006 (.Net | Bugs | dasBlog)

Basically avoid changing the xml files under content for dasBlog, you will mess up your blog. I did this in an attempt to make a post that I started on the 7th but posted on the 8th go back to being on the 7th... First I just changed the CreatedDate in the content xml and this almost worked, the post would intermittently disappear from the site (and the file). Luckily I had made a backup of the content files before I did this so I could just put the post back up when it disappeared. I quickly realised that this was a suboptimal solution! So I moved the post over to a new file with the correct date in the name. This file was eaten up by dasBlog and mysteriously disappeared, although I didn't notice it for about a week. What had happened was that I had got the date for the outer element set to another day in conflict with another file. So dasBlog just kicked it. Once I had got the date right it still took several updates for the change to propagate. Now I hope I have saved all my posts!

Comments [0]


What is Web 2.0.


Monday 27 November, 2006 (Business | Ramblings | Web | Web2.0)

Since I have been working on WinForm applications and technical infrastructure projects (yeah real sexy!) for the last year and a half I have not really paid much attention to the whole Web 2.0 debate and hype. Recently I have started to look at web projects again and I came across a good, short explanation of where the money is in Web 2.0 and how it is different from Web 1.0. Now I understand why Google bought YouTube for $1.65 bn, if you do the math then it turns out that they really didn't pay that much per user and each user of YouTube contributes value to the whole.

Basic (flawed) Web 2.0 definition by me: web as a platform for user interaction using data collection and aggregation as the driving force. There is a full explanation on Wikipedia but Ajits blog post made it much clearer for me.

I believe that most of the cause of the Dot Com crash can be derived from the differences between Web 1.0 and 2.0. Most companies and individuals back then failed to realise that the web was an extension of their physical business. We thought that we were building Web 2.0 but we were just extending the reach of our existing business onto the Internet. The Web 1.0 failures that I have seen up close were caused by insufficient logistical support in the physical business, we still need all the infrastructure and logistics of a book store if we want to be Amazon. During the Dot Com Hype we thought that getting the visitors and the orders would automatically solve all our other problems, well they didn't! Web 2.0 is the approach that we should have been using... Get rid of the physical product, use the enabling of social interaction as the value you provide to your users and also as the value that you create. Find someone who either wants to target your users for advertising (Google), wants to partner with you for selling related products (YouTube) or who can use the data that you provide as input into their business (Swedish Lunar Storm).

Comments [0]


Two Minute Timer Update


Friday 24 November, 2006 (.Net | GTD)

I found a couple of other Two Minute Timers:
http://www.avesh.com/blog/TwoMinuteTimer.aspx
http://blog.brettkelly.org/?p=215

On lifehacker there is a reference to an article about beating procrastination, this is something that I have a problem with so I am going to try it out: Just start doing it but only do it for 10 minutes. After that decide if you want to continue or not. With this in mind I have released a new version of my timer with a 10 minute option...

I have deployed this as a ClickOnce application now so you can get automatic updates if you want. The new version is 0.2.2

Features:
Customisable opacity.
Tray icon.
Start a 2 or 10 minute timer from a context menu.

System requirements:
Windows 2000, XP (probably 2003 Server also but not tested)
.Net 2 (the install should download .Net 2 if you don't have it)

Planned features:
Customisable alarm behaviour (flash window, system sounds, audio files).
Custom count-down enter hour, minute, seconds.
Autostart up on login option

Download now


Comments [0]


Team Build does not work when connecting from a workgroup to a domain


Thursday 23 November, 2006 (Bugs | Team System)

I have been attempting to run a Team Foundation build server on a separate machine outside our domain. Install and connectivity between the servers was no problem but once we got the build configuration up and tried to perform a build from Team Explorer we got an error:

TF42056: The build service could not connect to the Team Foundation Server: TF30063: You are not authorized to access https://myserver.

I tried all our standard solutions:

  • Set https://myserver as local intranet in Internet Explorer security settings.
  • Stored username and password in the control panel applet.
  • Cached username and password in Team Explorer

The IDE works perfectly but nothing works when we run Team Build, it turns out that this is an unsupported configuration due to the Team Build service not picking up locally configured alternate credentials. It's a known issue in v1 for some of the command line tools. So far there doesn't seem to be a workaround that could fix this, perhaps SP1 will add alternate credential support for all the command line tools.

These MSDN forum threads didn't really help us but might help others with non-domain related issues:
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=380144&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=20644&SiteID=1

UPDATE:

I continued searching for info on this and found http://msdn2.microsoft.com/en-US/library/ms400712(VS.80).aspx#:

The Team Foundation client is in a workgroup instead of a domain, but Team Foundation Server is deployed in a domain. Local user accounts must be created on the Team Foundation client computers. If you do not want to require users to type a user name and password every time that a Team Foundation client must connect to Team Foundation Server, make sure that the local user accounts use the same user name and password as the domain user names. For more information, see Managing Team Foundation Server in a Workgroup.

I couldn't get a local workgroup account set up so that it mapped to a domain account but I attempted a completely local configuration which did work even though my Team Foundation Server is set up in a domain:

  • Create a local build user account (tfsbuilder) on the Team Foundation server.
  • Add the tfsbuilder account to the Build Service TFS group for your project, this has to be done through Team Explorer on the TFS server since clients can't add local accounts to the TFS server.
  • Create a local build user account (tfsbuilder) on the build server.
  • Give the tfsbuilder account all required permissions. I'm not sure which they are but I added the user to the Power User group and this works.
  • Change the logon account for the Team Build Service to you local tfsbuilder account also giving the user log on as service permission.
  • Restart the team Build Service.
  • Kick off a build from your client and things should work smoothly!

The same solution should work for all command line tools using the "run as" start method.

Comments [0]


Free off-line blogging tool reviews


Thursday 23 November, 2006 (Blogging | dasBlog | Reviews)

I listed a set of features that I think I require for using off-line or desktop blogging tools. Here is my first round-up of test results, if nothing else is noted then these tools are Windows based. This first round will be focusing on free tools and if I can't find what I am looking for then I will start checking the commercial tools.

I'll summarise at the top so you don't have to read the entire post if you don't want to. The only two tools of the 9 that I have tested (10 with w.bloggar) that nearly meet my requirements are Zoundry and Lycos-Qumana both of these tools have the following problems for me: no support for <H4> tags which I use as subheadings and it doesn't seem possible to create new categories from within the tools. These are minor problems to say the least, at the moment I am using Zoundry for posting but I think I am going to have to try out Lycos-Qumana some more.

Lycos-Qumana

A free Java based editor with big name backing (Lycos) this is easily the tool that I have the highest expectations for, download here. Auto configuration of blog settings means it is super easy to get started. Pinging, tagging and trackback support built in. Spell checker with instant underlining of misspelled words of you want that. It is easy to manage existing posts and drafts but I couldn't find how to add new categories and there is no built in support for rmy <H4> headings. There is no custom preview with the sites style sheet but image uploading is supported. The user interface is not as intuitive as it could have been. Tested version 3.0

Zoundry

Zoundry is a free editor with an intuitive interface and easy access to draft and existing posts. Spell checking support, image upload, tagging, pinging, trackback style sheet preview, XHTML support and source view. Zoundry pretty much has it all although I have had difficulties getting trackbacks to work since you don't get notified if they were accepted or not. My only problem with Zoundry is that I have to add my sub-heading formatting manually since I want to use <h4> and there is no support for that. There is also no support for creating new categories.

Bleezer

Bleezer is a free Java based so is available for multiple platforms. It's a bit rough around the edges but was simple to configure for my dasBlog. It adds "Powered by Bleezer" to the end of posts. I don't like being forced to support Bleezer with a link every time I post, it should be an option as it is in some other tools. There is basic text formatting support but the interaction between the editing pane, which is a plain multi-line textbox, and the preview was difficult to master. The spell checker doesn't understand HTML formatting so has all sorts of ideas about what I am trying to spell with my <h4> and <p>. Also the HTML editor has no contextual help or tag completion. There is basic category support but no support for creating new categories. There is support for pinging, tagging, uploading over ftp and previewing with a custom style sheet, but no trackback management. Downloading existing posts for editing should work but I couldn't get it to play nicely with dasBlog. There is no list of unpublished local posts, you save them as files to disk and have to manage them manually so I feel that it will require quite a bit of manual work to use Bleezer for managing ongoing writing. All in all this looks like a promising tool but it has nowhere near the feature-set that I require for blogging. Tested version 0.9.5.6

blogBuddy

The first thing that strikes me with blogBuddy is the clean and simple interface. Unfortunately it just makes me feel like all of the features that I am looking for are missing... Connecting to dasBlog was no problem, neither was getting existing posts and editing them. Again there is no list of ongoing work and I couldn't find a way to save unfinished posts without posting them to my blog as unpublished work. Text editing and formatting is very basic through a textbox with HTML code support either from the tool (<B>, <I>, <U> and <A>). The spell checker and some other parts of the GUI returned developer errors. No preview, upload function, pinging, tagging, categories or trackback but it is free. Tested version 0.5

BlogDesk

Initially this looks promising, while downloading BlogDesk I read through the feature set and it seemed to cover most of my requirements. Connecting to a blog is a breeze with the help of a wizard, there is even an option for dasBlog as the blog type which makes it easy. The connection wizard tests all the functionality too if you want: uploading, getting categories and so on. After the wizard has run you can go into a tabbed dialogue and change all the details. Editing is done in a WYSIWYG pane but can also be done in HTML so you can make sure that the tool hasn't messed up your formatting. Unfortunately switching between normal (editing) mode, preview and source (HTML) is done through a menu so multiple clicks are required although there is a keyboard shortcut the interface doesn't feel intuitive. Spell checking seems to work and there are options for additional languages and custom dictionaries. It appears that there is some kind of trackback support but I couldn't figure it out and there is no mention of it in the included help file. Managing draft posts and existing posts was relatively simple although it required multiple clicks through a menu so switching between posts is not something that you do with a single click. New categories could be added through the blog configuration interface and using them was as simple as checking them in a list. Contextual menus everywhere made it simple to find the more advanced setup issues. Technorati tags are supported but no automatic pinging. This free tool contains many of the features that I am looking for but in the end it is not intuitive enough for me to use regularly and some of my main features are missing. Tested version 2.6

BlogEd

Another free Java based blog editor touted as a very simple Blog editor. It has the typical Java application feel which I personally don't like at all. Unfortunately I couldn't get it to connect to dasBlog at all. Tested version 0.7

JBlogEditor

Free Java based blog editor, JBlogEditor is a giant download (15,4 MB) which either means that it is really good or that it has loads of pointless features. The first thing that happens when I connect to my dasBlog is that the application crashes, a Java error log has been created so I can see that it is a real crash whether it is a fault in my configuration or caused by my previous Java editor test I don't know (and don't care). Simple switching between different drafts and published posts but that crash really puts me off the tool. There is no formatted editing mode, its just HTML editing with tool support and a preview pane. No tagging, pinging, trackback or uploading really means this is useless for me. Tested version 0.6

IMHO

IMHO Instant Blogger is a sourceforge project so it is free and open source, there is also a plug-in architecture and a couple of formatting plug-ins available for download. Setting up my connection to dasBlog returned a developer exception caused by a missing http:// Once connected there are many features missing: creating categories, tagging, pinging, trackback management, editing existing posts. In addition I hate the user interface, there are no menus and you don't know where to go to find functions that there are no buttons for. Tested version 1.3.2106

PowerBlog

I couldn't get this to work at all for dasBlog, the blog setup was so difficult to understand that I don't know if it just doesn't support dasBlog or if I didn't get the configuration right. Tested version 2.4.3

Comments [0]


Similar Minds


Thursday 23 November, 2006 (Geek | Humor)

I found a leader test at Similar Minds, since I quite like my result I'm posting it here. Who do you resemble?


What Famous Leader Are You?
personality tests by similarminds.com

If I'd got this result then I wouldn't have admitted it!

Comments [2]


GTD two minute timer


Wednesday 22 November, 2006 (.Net | GTD | Office)

I have been trying to use David Allen's GTD (Getting Things Done) technique over the last few weeks to better manage my time at work and at home. I have used OneNote extensively and Microsoft's FolderShare to synchronise notes between home and work. One of the things in GTD is to perform any action that needs to be done and can be completed in less than two minute immediately so as to not clutter up your brain and or task store him lots of stuff that take next to no time to complete. The theory is that tracking them takes more time than just doing it.

To help me with this I have created a small two minute timer in .Net 2. You can download it here.

Just run the exe to start the application and it will place itself in your tray.
Two minute timer in tray

Double click on the icon and the timer will start.
Two mminute timer running

This is the first version and it is not very polished but it does work. I am planning on adding a few small additional features in the future like customised alarm sounds and a nicer skin.

Update: There is a newer version available here.

Comments [0]


Urban sprinting


Wednesday 22 November, 2006 (Humor)

For all you developers who don't have a life; instead of sitting with your C# / Java SourceForge projects go out and play some sports. I have heard that many developers are fans of extreme sports so urban sprinting should be perfect for you...

Comments [0]


Offline blogging tools - my feature list


Wednesday 22 November, 2006 (Blogging | Reviews)

I have realised that it is very difficult for me to write blog entries entirely on-line. Apart from my FreeTextBox problem (it won't load) which forces me to enter HTML by hand, I usually don't finish a post in one sitting so I need to save my unfinished work somewhere. Putting it up on the blog and not publishing it is obviously an option but the web interface is not optimal for working on multiple posts in parallel. So to solve my problems I have started looking into off-line blogging tools. So far I have only tried out two tools: w.bloggar and Zoundry. Neither of which really solves all of my problems although both solve parts of it. At the moment Zoundry is what I am using to post this with. I have found a couple of blogs which cover offline tools:
http://blogpraxis.de/archive/2005/05/29/what_do_i_expect_of_an_offline
http://blog.qumana.com/blog/_archives/2005/5/28/893063.html
http://www.arunn.net/scienceblog/2006/07/10/offline-blog-tools/

And I have seen a demo of Words blog support so perhaps I could use Word 2007 as my blogging tool http://blogs.msdn.com/joe_friend/archive/2006/05/12/595963.aspx

My required features

  • Trackback ping management.
    Autodicovery of trackback ping urls and preferably listing of potential urls for trackback from the content of my post.
  • Save multiple unpublished posts locally.
  • Create new categories and use existing categories.
    Categories should not be placed inside the post but use dasBlogs category functionality.
  • Be able to ping Technorati and others.
  • Tagging support.
  • Upload function for images over ftp or any means that dasBlog supports.
  • Spell checker (preferably instant like word).
  • Posting preview preferably with my sites css.
    HTML (xhtml) formatting support with HTML viewing so I can see what has actually happened.
  • Right click in post for formatting and contextual operations.
  • Download of existing posts for edit.
  • Low cost (preferably free)
    Must be at least free to try or feature crippled trial but with all of the key features are available.
  • Must work with dasBlog!


Available tools

I found a nice list of off-line / desktop blogging tools here so at some point in time I am going to have to go through them all try them out.

Comments [0]


Do we understand each other?


Tuesday 21 November, 2006 (Business | Humor)

Somasegar over at Microsoft posted a wonderful joke pointing out the differences between IT and business people - Hot Air Balloon story. Business people really have to learn to listen to IT before a decision is made and IT has to learn to understand business peoples vague problem definitions. On the other hand Scott Adams, the creator of Dilbert, was ranked as the 12th most influential management thinker alive for 2005 so maybe we techies have good reason not to take business people too seriously... ;-)

Comments [0]


Migrating Team Projects between Team Foundation Servers


Friday 17 November, 2006 (SharePoint | Team System)

I am looking at the steps necessary to move projects between two Team Foundation Servers where both servers have existing projects setup. The lack of information on how to do this on the Internet and forums indicates that this is not something that is easy to accomplish. We have selected the server which we have customized as the target machine and luckily the other server has a default installation of TFS on it so we don’t need to synchronize any of our own customizations.

I found a post on the Team Foundation Server forums which basically says MS will be looking at this but that there is no existing solution. I also found a listserver mail archive which indicated that source control and work item history may be lost in the transfer.

At the moment I have a couple of working theories depending on what is possible through the extensibility API available at the VSIP site.

The simplest solution

  1. Manually create the Team Project
  2. Upload all the documents to SharePoint manually
  3. Use Work Item Utility, Mark Browns code for work item shallow copy or Excel to copy work items.
  4. Get the latest version of items in source control, unbind from the server and then check into the new server and rebind.

A complex solution

  1. Manually create the Team Projects
  2. Upload all the documents to SharePoint manually
  3. Adapt Work Item Utility (http://www.gotdotnet.com/codegallery/codegallery.aspx?id=b29d4456-c4ba-474e-a422-0479471776e1) to copy the history of all items if it is possible.
  4. Develop a tool (or find one on the internet) that gets every version of all the files in source control and checks them in with their original dates to the new server.

The second solution is better because we would like to keep all the history but I have a feeling that it may be difficult, maybe even impossible to keep history. Buck Hodges has posted a source control API sample and I believe that this could be modified to get existing code history and check it in to a different server. For the history to be persisted in the new server the CreationDate of the PendingChange objects that are checked in would need to be modified and the server would have to trust the date in the pending change from the client over its own date (unlikely). The super complex solution is to run the tools on the server and modify them so that the server’s date and time is changed between each check in to get them to occur at the right point in time! Probably a lot of work...

Comments [0]


Agile modeling with UML 2 templates for Visio


Friday 17 November, 2006 (Agile | Architecture | Reviews)

I have been working on putting together the documentation for a project these last few days and I use Visio for all my diagrams. I don’t always create UML diagrams for my projects because they just take too much work. UML in Visio is difficult to use as pure documentation since you also need to create the underlying structures for it to work properly and there is some pretty extensive validation built in, although obviously nothing like Rational’s software. I was working on a sequence diagram when I realized that some of the UML features that I wanted to use where not implemented in Visio. I have never really thought about it but it turns out that Visio only supports UML 1.2. There have been several minor revisions of the UML specification since 1.2 was released in 2002 and the latest version of UML is 2.0 (I believe that 2.1 is on its way).

Searching the Internet I quickly found UML 2 template support for Visio at Software Stencils. These are simply new shapes for Visio with some smart behavior. Unfortunately you don’t get any help with your UML syntax using these templates, so you either have to know your UML or accept that your diagrams don’t conform to the UML specification. They are not useful for forward or reverse engineering nor are the artifacts integrated with each other so a change in one place will not propagate to other instances of the same artifact in other places. Maintaining you diagrams is potentially more work with the new templates than using the built in UML support that Visio offers. On the other hand maintaining UML documents that are not integrated with your code is just a lot of work no matter how you do it. But who really uses UML in a completely integrated modeling tool? You can only realistically expect the static structure / class diagrams of UML to be integrated with your code, getting automatic generation of activity or sequence diagrams at the right level of granularity seems to me to be too much to expect. And if you use Visual Studio 2005 you will probably use the built in Class Diagram support instead, which is a visual representation of your code and allows refactoring and reworking of your code through the diagrams. Channel9 has more info on the Class Diagram / UML debate.

In the end this really begs the question of what we want to use UML for. I am in the Agile Modeling camp we should be using UML and other modeling tools as abstract representations of our system to enable communication of the concepts and structures that exist or could exist in our software. A whiteboard or a napkin should be all that is necessary to start modeling your software together with others. Just taking a snapshot of your whiteboard after you have finished drawing is enough for team documentation. Sometimes you want a more formal look for including your models in official documents or for presentations and that is where Visio or any other modeling software comes in handy; simply a way of getting your diagrams into an electronically editable format. My colleague Peter Tallungs is a firm believer of Word’s built in diagramming support as the best way to document your models since this does not require any additional software from your readers (article published in Computer Sweden in Swedish). I guess I agree with him in principal but in practice I find that the lack of built in support for software diagramming in Word just makes it too difficult to work with your models. For all of us who want a balance between formal modeling, agility and ease of use the Software Stencils templates offer a perfect solution for Visio.

Useful UML resources

.

Comments [0]


TeamPlain and how I would like it to integrate with Team Foundation Server


Wednesday 15 November, 2006 (SharePoint | Team System | Reviews)

I got a question from one of my many readers ;-) wondering why I didn't think that TeamPlain was right for me. Since this is a topic that I was planning on writing about I put together a list of my gripes! Unfortunately I haven't had time to try out Teamprise yet which is a related technology, but if I ever get around to it I will definitely write about it here too.

Don't get me wrong I think that TeamPlain is a great piece of software, I would really like to be able to use it but I have some issues with it. I work as a consultant on smallish custom development projects (2-10 developers) for clients who are usually not that technically savvy. Projects normally range from a couple of weeks to a year or so (although some are a lot longer). We also work quite a lot off-site and on multiple projects in parallel, so having a web and web service based interface to Team Foundation Server is great for us. Best of all most of the features that we as developers need is built into the product more or less out of the box. The value that TeamPlain could offer us is giving our clients, project managers and general executive types easy access to more parts of TFS than they get through SharePoint.

Problems that I see with TeamPlain for us

  • When opening documents via TeamPlain they are not opened via SharePoint and cannot be updated to the SharePoint document library. SharePoint is web based also so we could just have connected to the SharePoint site instead.
  • Reports can be accessed via SharePoint just as well as with TeamPlain, ok you don't get the nice looking drop-downs with a list of reports. On the other hand the reports are web based so users can connect to the report server instead.
  • The integration with Source Control is read-only so it is only useful for non-developer access to source control. We don't want non-development artifacts stored in source control; they should be stored on the SharePoint site or in the wiki, so we have no use of this feature.
  • There is no SharePoint integration, so you have to choose if you go in through SharePoint or the TeamPlain entry point. Since we also have a wiki this means we actually have to choose between three entries instead of having one big Project Dashbord with the status of the entire project and quick access to all areas. We have implemented a quick fix for our wiki by putting it inside a WebPart on the SharePoint site, we could do the same with TeamPlain but I don’t believe that this is optimal.
  • There is no API for interacting with or modify TeamPlain nor is it possible to use parts of the TeamPlain GUI in other Web Apps or from within SharePoint. The license explicitly prohibits users from modifying TeamPlain.

Features that would make me look at TeamPlain again

  • SharePoint integration so I could give users access to the features in TeamPlain that I want through WebParts. Then each Project could customize their views depending on their specific needs.
  • Floating user licensing for the lite edition since we only really need the work item editing capabilities for our clients at the moment.
  • Some form of feature customization or extensibility, partly just for the sake of it (I am a developer after all) but also because I believe that customizable products will always be more useful.

Comments [0]


Upgrading Team Foundation Server to WSS 3


Wednesday 15 November, 2006 (.Net | SharePoint | Team System)

Unfortunately it will not be possible to upgrade Team Foundation Server to Windows SharePoint Services 3 when it is released, see Jason Bariles blog for more info. This feature will not be added in the upcoming Service Pack (SP1) either. So for the time being we will all just have to make do with WSS 2 features and add any additional functionality that we need through TFS extensibility and custom SharePoint features. :'(

Comments [0]


First shot at fixing dasBlog medium trust issues


Tuesday 14 November, 2006 (.Net | AJAX | Blogging | Bugs | dasBlog | Fixes)

So far I have managed to get my dasBlog up and running. But in doing so I have disabled and broken several features:

  • No HttpCompression
  • No date picker while editing
  • No Pingback/trackback support

It seems that I have also broken my FreeTextBox editing control. I believe that this may be an unrelated issue to the medium trust fixes and wont get into that in this post.

How could I get the broken features back up again? The strong naming issues that affect SharpZipLib and BasicDatePicker are easy to fix since there is a new free version of BasicDatePicker available BasicDatePicker Lite, the new version is not strong named and may require you to recompile dasBlog. SharpZipLib is open source so you can download it and add:

using System.Security;
[assembly:AllowPartiallyTrustedCallers]

to assemblyinfo.cs then just recompile and these functions should be up and running again, you may have to install SharpDevelop to compile the code for SharpZipLib. Any changes that were made to web.config or aspx pages to disable the functions need to be reverted and recompiled. Your web.config will need to be updated with a new version for SharpZipLib:

<dependentAssembly>
<assemblyI entity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral"/>
<bindingReirect oldVersion="0.5.0.0-0.84.0.0" newVersion="0.85.0.0"/>
</dependentAssembly>

After doing this I received an "Invalid use of response filter" exception (more info at dasBlog.us) which turns out to be because my host already implements httpCompression, but disabling the blowery handler sorted it out.

TrackBack support

The main problems that remain are getting TrackBack and PingBack support. I will start by looking at getting TrackBacks working. The problem with TrackBacks is that they require dasBlog to call a web page on another site and network access to other servers is not allowed by default under medium trust so this jut won't work. I checked the TrackBack protocol to see if I could find any workarounds that could be applied. Reading the spec I realised that TrackBacks do not require the call to originate from the server that hosts the blog, if we could implement this as a client call then we could theoretically allow TrackBacks under medium trust.

I started by implementing a very simple html page to post a trackback call to localhost.

<html><body>
  <
form method=post action=http://localhost/Trackback.aspx?guid=3d9f45e4... enctype="application/x-www-form-urlencoded;charset=utf-8">
    <
input type="hidden" name="title" value="SuperTrackback 1" />
    <
input type="hidden" name="excerpt" value="This is a vlient trackback call." />
    <
input type="hidden" name="url" value=http://localhost/Trackback.aspx?guid=dc205699... />
    <
input type="hidden" name="blog_name" value="TestBlogger" />
    <
input type=submit name="doit" value=1>
  </
form>
</
body></html>

I have hardcoded the trackback urls just for testing. Of course it was not as easy as just posting the call since dasBlog includes spammer protection by checking the url in the trackback call. We have to disable spammer protection by checking if we can call the url at runtime in TrackBackHandler.cs (added lines are bold) .

Entry entry = dataService.GetEntry( entryId );
if ( entry != null )
{
System.Net.WebPermission urlPermission =
new WebPermission(System.Net.NetworkAccess.Connect,url);
if
(System.Security.SecurityManager.IsGranted(urlPermission))
{
try
{
string requestBody = null;
// see if this is a spammer
HttpWebRequest webRequest = WebRequest.Create(url) as HttpWebRequest;
webRequest.Method="GET";
webRequest.UserAgent = Utils.GetUserAgent();
...
...
}
catch
{
// trackback url is not even alive
logService.AddEvent(new EventDataItem(
EventCodes.TrackbackBlocked,
context.Request.UserHostAddress + " because the server did not return a valid response",
Utils.GetPermaLinkUrl(entryId),
url,
entry.Title
));
context.Response.StatusCode = 404;
context.Response.End();
return;
}
}
// if we've gotten this far, the trackback is real and valid
Tracking t = new Tracking();
t.PermaLink = url;
t.RefererBlogName = blog_name;
t.RefererExcerpt = excerpt;

This allows an anonymous caller to add a TrackBack to our blog but it also enables incoming TrackBacks under medium trust. This is only half of the solution for TrackBacks; we have opened up dasBlog för incoming calls to our TrackBackHandler but we still have to make calls to remote trackback urls. The next step would be to implement initiate a client-side trackback call to a remote server from inside dasBlog, this can be done in an AJAX (or is it Ajaxian) manner using XMLHttpRequest in JavaScript http://developer.mozilla.org/en/docs/AJAX:Getting_Started. I will cover this and tackling the spammer threat in future posts, since I haven't implemented a solution yet.

Comments [2]


Context free grammar


Friday 10 November, 2006 (Geek)

I am always looking out for geeky, fun stuff on the Internet. SCIgen is a typically geeky implementation of advanced mathematics and its fun! SCIgen is a generator for random Computer Science research papers. Some papers have been submitted to real conferences and even been accepted which really is quite amazing!

Now I am not a mathematician but I think that I have understood a little bit of what a context free grammar actually is. A more mathematical description can be found here: http://planetmath.org/encyclopedia/ContextFreeLanguage.html. As far as I understand context free grammar is a set of rules that create rule-based patterns. These patterns can then be combined as nodes in other patterns using the same rules.

Mathematical notation is built up like this: the rule is that a number is followed by an operator and then another number 1 + 2. These can then be combined again as a node in the pattern: (1 + 2) + 3. Or two patterns could be combined: (1 + 2) + (3 + 4).

With these rules we can build enormous structures where the parts of the overall pattern have no common context or structure, they just follow the same rules. With these mathematical structures it is possible to do all sorts of cool stuff that is completely random but has a cohesive look and structure.

Context Free Art – maths based art.
SCIgen - An Automatic CS Paper Generator – maths based writing.

Comments [0]


DEVED17 – Team System Adoption Best Practices


Thursday 09 November, 2006 (SharePoint | TechEd 2006 | Team System | Scrum | FlexWiki)

I have been working with Visual Studio Team System since the public Beta came out so the possibility of customizing, reconfiguring and extending Team System was not new for me. Unfortunately I am slightly disappointed with the content of this White Board Discussion since I have been looking forward to hearing how others are implementing Team System, I was expecting more information and tips on actually getting management buy-in and best practices for process adoption. We are in the middle of rolling out Team System for our Microsoft development projects so I know that the real value of Team System can only really be realized when you customize your setup. But at the same time it was good to hear that the work that we are doing thinking about how to customize Team System and our Team Foundation Server setup is what others also are thinking about.

Right now the state of our setup is the following:

  • Team Foundation Server setup with SSL over multiple dns names. This was no trivial task since there was no official documentation for setting up TFS with SSL when we did this. Now there is a step-by-step guide on MSDN http://msdn2.microsoft.com/en-gb/library/ms242875.aspx. Additionaly you need to “hack” your IIS and TFS configuration if you want it to work. Perhaps I will get back to this in a future post.
  • ScrumForTeamSystem (http://www.scrumforteamsystem.com/). Since we have a couple of projects that use Scrum it made sense to have a process template that supports Scrum.
  • TeamPlain Web Access (http://www.teamplain.com/). We are still evaluating this and although it works quite well, I am not sure that it is right for our use.
  • FlexWiki (http://www.flexwiki.com/). I have come to love Wikis for simplifying and reducing the friction to start writing documentation of our systems. We have integrated FlexWiki into our SharePoint portal sites by simply adding a Page Viewer WebPart with a large height.
  • SharePoint hotfix 915746 (http://support.microsoft.com/kb/915746). Without this hotfix you cannot add new Web Parts to you portal sites.

New features that we are looking at implementing:

  • Custom Process Templates and work items. We have a project on our Team Foundation Server for Team Foundation Server customization (almost a meta project).
  • Implementing some ideas from Trac (http://trac.edgewall.org/). Mainly a changelog WebPart for aggregating a change history for our WorkItems, source code, portal documents, Wiki pages. This could probably be implemented as an RSS aggregator.
  • One-stop dashboard in Sharepoint for a quick overview of the state of everything in our project.
  • RSS feed for changes to make it easier for developers to participate in different parallel projects.

Technorati tags:

Comments [0]


ARC201 – Patterns and Anti-Patterns for Service-Oriented Architecture (SOA)


Wednesday 08 November, 2006 (.Net | TechEd 2006 | SOA)

I can only say wow! Ron Jacobs is a brilliant speaker, entertaining and very informed, an expert to say the least. A couple of his insights into SOA and what he things works and doesn’t work for SOA were real eye openers for me. Not because I didn’t understand the principles behind SOA or the problems with implementing SOA but because I do understand SOA and I realise it isn’t just about choosing the right technology and then claiming that we are service-oriented!

I will try and compress some of what he said in a short list, mainly to remind myself of this from time to time:

  • Don’t loosely couple everywhere: tightly coupled components and services have a place in our architecture too they just aren’t service-oriented in the SOA sense.
  • Rely on explicit behavior over implicit behavior: a service will do what the contract says it will. Just because it happens do something more right now (like ordering the returned data) doesn’t mean you should create a dependency on this implicit behavior.
  • Business Processes are a good starting point for identifying your services: is this performed as multiple business processes then it is probably multiple services.
  • Everything changes when we cross an external boundary: just like everything changes when we cross an international border in real life. Languages change, laws change, the weather, everything. But we should strive to make crossing the external boundaries as friction-free as possible.
  • Think about services like paper-based business processes: what does the paper form like look? That’s our message. Who do we send it to? That’s our service. What do we expect them to do with it? That’s our contract and policy.

Start with the business process:

  1. Decide on a process
  2. Decompose the process
  3. Create the contract
    a. Define the messages – messages define what we can do
    b. Define the operations – operations move the process from one state to another

If anyone who reads this has the opportunity to see Ron speak on this topic then don’t miss it. Here at Tech-Ed he will be holding the same session again on Friday.

Technorati tags:

Comments [0]


Windows SharePoint Services v3


Wednesday 08 November, 2006 (.Net | SharePoint | TechEd 2006)

WSS3 seems like a great upgrade from version 2. The whole programming model is becoming more in line with other programming models that Microsoft have. You can create custom event handlers for WSS3 relatively easily linking directly to the SP API to create new lists or manipulate existing data, customing metadata and list behavior seems really simple too. One addition that I haven’t seen demoed but that is possible now is creating WebParts and custom features for a single site without having to deploy your assembly to the GAC.

The parts of WSS3 that I have seen so far look like they are going to make life a lot easier for anyone who wants to create non-trivial SharePoint solutions. In addition to what we can all  there are a whole bunch of extra functionality already included with WSS3 like Blog and Wiki templates, which actually look like they could work. Although I think that the contrived examples that I saw Chris Bryant and Todd Bleeker demo could potentially put people off Wikis and Blogs altogether, anyone who has used these technologies in other situations will immediately see the potential in integrating this into SharePoint. Many of the customizations that I have been discussing with my colleagues for us to implement in our Team Foundation Server WSS would be a lot easier to implement with WSS3, unfortunately I have not seen an upgrade path from WSS2 to WSS3 for Team Foundation Server yet.

Technorati tags:

Comments [0]


First day at TechEd


Tuesday 07 November, 2006 (.Net | Ramblings | SharePoint | TechEd 2006)

My first day at TechEd is over, it actually feels like two days now that I think about it which is kinda weird.

I managed to sneak into the Super Early Bird priority seating for the Keynote, well I really didn't do much sneaking I just walked over and sat down but still... I am always amazed by the way Microsoft tries to sell their products to developers who are already convinced that Microsoft is the way to go. There was a lot of Vista and Sharepoint 2007 in the Keynote, nothing bad in that but the way the tools were demoed is just silly.

Speaker - "Look how easy it is to create a People-Near-Me function in a Windows Presentation Foundation application!" Click, Click, typing (inserts a 200 line snippet)

Speaker - "Now I just start my application again and all the functionality is embedded in my application, all we needed to do was enable the functionality."

Of course you only have to insert and enable functionality that you have a prewritten snippet for! I'm guessing it's a completely different story if you need to write all the code from scratch... I doubt that there is a 500 line InsertCustomBusinessLogic snippet included with Sharepoint 2007 or .Net 3.

Other than that I have enjoyed my first day, I especially enjoyed the last session with Todd Bleeker on Custom Sharepoint sites and features. Although the pace he went through the material at pretty much knocked me out but thats the way it's supposed to be at TechEd. I can read sales presentations at home, while I am here I wan't to see hardcore developer action!

Technorati tags:

Comments [0]


Running dasBlog as a partially trusted application


Tuesday 07 November, 2006 (.Net | Bugs | dasBlog | Fixes)

Since changeing web hosts I have not been able to get dasBlog running in the new environment. The host server is setup so that .Net code runs at medium trust level and won't allow me to override the trust settings. As anyone who has tried to get dasBlog to run at medium trust knows, it just isn't possible out of the box. To make life even more difficult Asp.Net returns an incomplete and ambiguous SecurityException:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Security error.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

The stack trace that is included provides no help in solving the problem and actually sent me on a wild goose chase trying to solve completely unrelated issues.

I have started to dig into this to try and see if I could find a quick fix for it with googles help. So far I haven't found a quick fix but I have found a few other things that may lead me to a solution... First of all I have seen a few forum posts and blogs referring to reflection used by serialization as part of the problem. But I have managed to get XmlSerialization to work without chainging the serializer or trust level of the application so it doesn't seem to be the XmlSerializer that is causing the exception. I changed the virtual directory settings on my local machine so that dasBlog runs under .Net 2, this provided me with a much clearer exception. dasBlog has a custom XmlTextReader called XmlNamespaceUpgradeReader which inherits fom XmlTextReader. The only problem is that XmlTextReader has a security demand for exicit inheritance permissions [PermissionSet(SecurityAction.InheritanceDemand, Unrestricted=true)]. Running under medium trust you don't have the required permissions. Changing all XmlNamespaceUpgradeReader  references to XmlTextReader allowed the deserialization of SiteConfig (and all other serialized data) to run.

The next problem was that even though the site serialization was working dasBlog stilled just returned a big fat exception. Another wild goose chase followed trying to solve new unrelated issues, but working on them gave me a flashback to a problem I solved a year or so ago while setting up NGallery on the same host. Calling strong named assemblies from partially trusted code can also be a show stopper if the signed assemblies don't allow partially trusted callers. Two assemblies in dasBlog cause this problem SharpZipLib which is used for HttpCompression and BasicFrame BasicDatePicker, neither are compiled with the AllowPartiallyTrutedCallers setting. Removing references to these solves the rest of the problems that I was experiencing. Unfortunately the fixes disable some functionality in dasBlog and may have unexpected effects on configurations other than mine.

I am planning on following up on this post with detailed instructions on implementing the fixes and maybe som attempts to restore full functionality.

References on the web that sort of showed me in the right direction:
http://choirulamri.or.id/archives/94
http://www.hanselman.com/blog/CommentView.aspx?guid=a7e58fa0-9390-4270-bab3-83ea2e969352
http://www.hanselman.com/blog/CommentView.aspx?guid=4dd4573a-1fee-4680-b28e-983271bd3ae8
http://www.jwerx.com/blog/CommentView,guid,31c5f741-3d52-46a3-beb5-b934dea73423.aspx
http://dasblog.us/viewtopic.php?p=761&sid=b87a704cc1fffacabcb0bfff2660aac9


Comments [0]


TechEd 2006


Monday 06 November, 2006 (Ramblings | TechEd 2006)

Arrived in Barcelona today for Tech Ed 2006, I am going to try to write down some of my experiences here over the next couple of days.

On the flight down I realized that Tech Ed is so much more that what I have realized. There are the normal technical sessions, sponsor exhibition (probably full of all sorts of freebies and trials), an XBOX360 corner (I hope), donut buffet (confirmed) but there are also 20 or so hands on labs where you can get your hands dirty trying out some of the stuff. I am not sure how the labs are setup, I am presuming they are some kind of Virtual PC setup with code samples that you can run through but we’ll see. The labs seem to be open till late every day so hopefully I’ll get to try some of them while I’m here.

Technorati tags:

Comments [0]


Blog up again


Friday 03 November, 2006 (Ramblings | Blogging)

After a year of inactivity and a move to a new server I have finally got around to setting up my dasBlog again. I hope that it won't be another year till I write a new post!

Comments [0]


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In