March 2005 - Posts

I took a chance and installed a CTP of Whidbey on my laptop. Thing is, I still use WebMatrix from time to time for POC stuff for v1.x of asp.net.

Problem is, when you run the Cassini webserver from webmatrix, it picks up the latest version of the .netfx and will give you different errors based on which version is installed. To get around this and ensure that the WebServer.exe runs on version 1.1 of the .netfx, simply add a WebServer.exe.config file with the following contents:

<configuration>
	<startup>
		<requiredRuntime version="v1.1.4322"/>
	</startup>
</configuration>

If you want to ensure WebMatrix runs on version 1.1 of the .netfx, you can add the above startup element to WebMatrix.exe.config.

Straight from ScottW, I added

<MarkUp>
	<globalAttributes>
		<class enable = "true" />
		<align enable = "true" />
		<style enable = "true" />
		<id enable = "true" />
	</globalAttributes>
 

notice the style element? That cleared up the little non-formatted code issue that I had in my previous post.

Keith told me that CSBlogs was returning relative urls for its Metablog API implementation. After I installed it, I noticed the same thing - so I decided to hack it a little bit and find out what was going wrong. It turns out that the software is just doing what the guys at telligent are telling it to - thankfully I've got the code and I can poke around when I find little issues like this :)

First, I added a call to the Globals class to return a formatted url with the application path intact. This was in Components.SiteUrlsData.cs:

public virtual string FormatUrl(string name, params object[] parameters)
{      	

    if(parameters == null)
        return Globals.FullPath(this.Paths[name]);

    else
        return Globals.FullPath(string.Format(Paths[name],parameters));
}

But wait! This causes the rss feed to show up with something silly like http: / /localhost/cshttp://localhost/cs/blog... for the links in the RSS and Atom feeds produced by CSBlogs. So, I tried it without the "HostPath" to see if I could get the same results. This was in Blogs.Components.BaseWeblogSyndicationHandler:

/// <summary>
/// Appends http://Host:Port to all blog urls
/// </summary>
protected override string BaseUrl
{
    get
    {
        return ""; //return Globals.HostPath(Context.Request.Url);
    }
}

That's it right? Nope, not if you have galleries enabled. One of the methods (that I know of :) uses the modified FormatUrl above to try and get a MapPath to a directory. You'll find out really quickly that MapPath doesn't like fully-qualified urls passed to it...I know I did. So, I modified one more line to make sure that I've got a relative path passed into the photo gallery. This was in Galleries.Components.Picture:

/// <summary>
/// This static method gets the location of the picture cache directory, mapped on the local filesystem.
/// </summary>
/// <returns>string</returns>
public static string CacheDirectory()
{
	Uri uri = new Uri(GalleryUrls.Instance().PictureCache);
	return CSContext.Current.Context.Server.MapPath(uri.AbsolutePath);
}

After that, everything seems to be running as normal. I don't know if I'd recommend doing something like this on your install, especially if things are working well enough for you. I just use this particular feature of the Metablog API quite often, so it bit me a lot.

update: It looks like the trackback feature uses fully qualified urls as well as the rss/atom feeds. I'll post a fix tomorrow when I find out where the BaseUrl is set for the trackbacks.

update2: Found it :) I would've got it done last night, but I don't have the broadband yet. Any ways, like I thought it was just a removal of a baseUrl parameter (case notwithstanding). I found this in Blogs.Controls.TrackbackMarkup:

protected override void Render(HtmlTextWriter writer)
{
            
    if(IsValid)
    {
        string baseUrl = Globals.HostPath(Context.Request.Url);
	writer.WriteLine(tag,/*baseUrl+*/PermaLink,Title,/*baseUrl+*/PingUrl);
    }
}

[ Currently Playing : Rooster - Alice in Chains - Unplugged (6:40) ]

This is a message that my boss recently sent to a customer that had an issue with one of our software packages (I don't own it :)

Brian, in the finest tradition of Microsoft, VDB's engineers have returned an error message  that has absolutely nothing to do with the problem at hand.   Time Steps should be in the range of 1 to 10.  Instead, of limiting the input (1 to 10). VDB's fine engineers, it seems, prefer to give a worthless message, then plow on with  a 10 millisecond TD-Chart.  I conclude, the only reason for this is that they are trying to kill me.   I will have the problem fixed.   Maybe we will replace all messages with one that says "Call Tom, we are trying to kill him, sorry for any inconvenience."

Anyway, I have attached a new release 2.8.4, it has some new features like ZOOM, Undo, and a way to graph Well markers (horizons). It will also launch the help guide from the help button, now there is a novel ideal.  Though not fully tested, I'm sure it has an entire new array of useless error messages designed to kill me.


Sorry for the problem


Tom

[ Currently Playing : I Just Wanna Love U (Give It 2 Me) - Jay-Z - The Dynasty Roc la Familia (3:47) ]

...but I've decided based on some recent feedback to release the latest version of PostXING!

This version of PostXING will optionally support Http Proxies if you need that functionality - I had been waiting on some feedback from a couple of folks who could real-world test this functionality before releasing it to the wild. Thanks Chris, Keith, and Laurent for helping me track down some of the issues that this release addresses.

You're still reading this? Go get it! :)

[ Currently Playing : Paranoid Android - Radiohead - OK Computer (6:23) ]

So, mainly because of my comment problems with dottext 0.95, I decided to go ahead and take the plunge. Here's how I got CS installed in less than an hour:

That was it. My only gripe so far is the MetaBlog API doesn't return fully-qualified urls like the dotText implementation did. I can't believe they'd introduce a regression like that, but maybe there's a reason for it. It totally breaks some features of PostXING tho - like the view blog feature. I guess I could code around it (or, maybe I should code around it :) but I'd like to see if it's addressed first. Another thing that I should probably address is the fact that one user can have many blogs in Community Server. The way PostXING works now, it would only grab the first one returned b/c that's the way that I've always worked with it.

Another thing that irked me was that Community Server broke an nGallery vdir I had running up here. Funny thing is, it only broke one that was version 1.6.1. I have a v1.0 (I think) nGallery up as well, and it works just fine afaict. Weird.

Anyways, that's my story and I'm stickin to it.

[ Currently Playing : Everything I've known - Korn - Take a look in the mirror (3:34) ]

This shouldn't have gotten this out of whack, but it did, sorry. I've made sure that all of the folders are inherited now, and tested the get latest version on a different directory on my machine.

WARNING: The only thing to watch out for is that I like to copy my assemblies to my C:\bin folder so I can dogfood the output immediately. If you don't like that, go to the main PostXING project and clear out the build events. Also, the code that is now in the repository is more recent than the release on Project Distributor. It supports proxies for the web connection and has a couple of other bug fixes in it like handling FTP files with spaces. One more thing - not all of the projects in the trunk are either deployed to the world or active - the Client Template plugin project allows you to define a custom template on the client side (since dotText doesn't implement this particular metablog api feature) and the offline plugin was going to be the save/load posts feature but that got put into the main project instead. It's still there because someday I may decide to make it handle online/offline capabilities differently.

[ Currently Playing : Bombtrack - Rage Against the Machine - (4:04) ]

Teirnan asked for a few features for PostXING. I started to write a comment, but it got too long-winded for a comment. You get a post Sir:

Can I help you? I think maybe so :) In order:

  • I did this in a very early build of PostXING, but got some feedback that asked to be able to immediately edit the post that was just, erm, posted - in case of typos or whatever. I guess I could make it configurable, that shouldn't be too hard. Since you are literally the first person to ask for this feature, I think I'll make the current behavior the default.
  • I don't know how to tackle this one - PostXING is basically just a wrapper for SOME functionality of the Metaweblog API. Generally, the blog engine will handle the entry IDs. Sometimes it gives you an int, sometimes it gives you a string.
  • I actually tried to do this at one point, but I'm not sure how stable it would be. Think about it this way: in order for this to work, images would have to be parsed out (not a problem) and each one uploaded one at a time using the FTP component. The resulting url would have to be pumped back into the post and then and only then could you finally post/publish the entry. If you have a lot of images, this could take a really long time and thus give the perception that PostXING performs poorly. I guess I could make this a config option too with the caveat that it could possibly take a really long time to make a post.
  • This one is easy :) If you want it to be zippy, download the latest version of Vault from http://vaultpub.sourcegear.com . Login as the guest account (I think it's guest/guest) and go to the PostXING repository. Set a working folder and click Get Latest Version. The latest code release should be there, although it may be a little out of sync with the most current version that I'm dogfooding on my local machine. You can also find any plugins code that is associated with PostXING. If you don't want to install vault for whatever reason, I'm pretty sure you can download from their web interface using the same uid/pwd, but I'm sure it would be about 100 times more painful.

Thanks for the feedback, Tiernan.

[ Currently Playing : I'm done - Korn - Take a look in the mirror (3:23) ]

More Posts