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:
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:
<
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.
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.
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 );
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.
« Context free grammar | Latest | Upgrading Team Foundation Server to WSS 3... »
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Sign In
.Net (25) About (1) Agile (2) AJAX (1) Architecture (4) BizTalk (5) Blogging (12) Bugs (11) Business (2) dasBlog (9) EDA (1) Fixes (13) FlexWiki (1) Games (1) Geek (4) GTD (2) Humor (4) Interviews (1) Java (2) Office (1) Ramblings (8) Reviews (7) Scrum (2) Security (1) SharePoint (6) SOA (4) Speaking (2) Team System (10) Tech Ed 2008 (1) TechEd 2006 (5) Tips (4) Vista (1) Visual Studio (2) Web (11) Web2.0 (1) XP (1)