Moon on a Wire

By Robert Ellison. Updated on Saturday, June 23, 2018.

Moon on a Wire

Testing posting by email with a picture of the moon from last night...

I've extended BlogEngine.NET to post by email. Not horrible for the very specific case of this blog and a short list of email clients. I shudder to think of extending it to the general emails and different templates.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Moon on a Wire #code #blogengine.net Picture of the Moon close to a wire. This is actually a test of posting by email from blogengine.net. )

Catfood.Shapefile 1.40

By Robert Ellison. Updated on Monday, September 19, 2022.

I’ve just released a small update to Catfood.Shapefile. Stephan Stapel, who implemented PolyLineM support, has contributed a patch that improves the class hierarchy. CodePlex user originSH suggested supporting the ACE driver for 64-bit systems. I’ve added a constructor overload that allows you to use predefined Jet and ACE connection strings or provide your own templates if necessary. Thanks to Stephan and originSH.

Catfood.Shapefile is a .NET library for enumerating ESRI shapefiles. I originally wrote the library to help me build some complex layers in Catfood Earth. Since then it’s picked up thousands of users and some really valuable suggestions and patches from the CodePlex community. I’m very glad a took a couple of hours to open source the library back in 2009.

Add your comment...

Related Posts

(All Code Posts)

Catfood: Cleat

By Robert Ellison. Updated on Saturday, October 1, 2022.

PolyLineM support in Catfood.Shapefile

By Robert Ellison. Updated on Sunday, May 23, 2021.

I’ve just updated Catfood.Shapefile, my ESRI Shapefile parser for .NET, with PolyLineM support thanks to a contribution from Stephan Stapel. The solution for the new version has also been updated to Visual Studio 2010.

Download Catfood.Shapefile.dll 1.30 from CodePlex.

Add your comment...

Related Posts

(All Code Posts)

Catfood: Klout and Follower

By Robert Ellison. Updated on Sunday, November 6, 2022.

Klout is building PageRank for people. You get a score between 0-100 based on how large your social graph is and how much you influence it. They also have a simple API and have been kind enough to let me use it as part of Follower so I’ve just released Follower 1.40 with Klout integration.

Follower automates the chore of following new friends on Twitter. It also somewhat automates removing traitors who don’t follow you back – as much as Twitter would let me get away with. One problem with following promiscuously is that you do end up following a lot of spammy and scammy accounts. Adding Klout helps with this as you can now say ‘follow everyone who follows me as long as their Klout score is higher than 15’. This keeps some of the riff raff out. And if a follower’s score rises above the threshold then they’ll be admitted into the club.

You can also use Klout to weed out existing follows with a low Klout. In this mode anyone below a configurable score will be added to the remove list even if they are following you back.

The only snag I hit with API is that while you can lookup a user by Twitter ID the ID isn’t returned in the response. If you query multiple IDs at a time you don’t always get a full set of results so without the ID you can’t reliably tell which result is associated with each ID. For this reason I’m only looking up one score at a time. Twitter has nice bulk methods to grab IDs for up to 5,000 friends or followers, it would nice if Klout could match this or at least fix the ID issue. This is a small problem though and having an automated way of detecting the quality of Twitter accounts is a great addition to Follower. If you use Twitter check it out.

Add your comment...

Related Posts

(All Code Posts)

Debugging Treasure Trove

By Robert Ellison. Updated on Saturday, September 24, 2022.

Mark Jackson, my co-founder at Cucku, is blogging re-mastered debugging tips from StackHash. StackHash is now an open source project and all of the great content from the original site has been taken offline. This new project is a great resource for debugging on the Windows platform, especially post-mortem crash dump analysis. If that’s your thing do yourself a favor and subscribe to Mark’s blog.

Add your comment...

Related Posts

(All Code Posts)

Basic HTTP auth for an IIS hosted WCF 4 RESTful service

By Robert Ellison. Updated on Sunday, May 16, 2021.

Wasted far too long on trying to get WCF to work with custom basic authentication this week. Custom in the sense that I need to look up the username and password in a database and not have IIS attempt to match the credentials to a Windows account. Given how well WCF 4.0 supports RESTful services in general it’s a bit shocking that basic auth over SSL isn’t supported out of the box. It seems like you should be able to derive and hook up a class from UserNamePasswordValidator, set the transport clientCredentialType to Basic and be ready to go. I’ve heard that this works for self-hosted services, but no dice in IIS.

Basic access authentication is a simple protocol and so in the end I added a helper method that checks for access (and in my case returns the user information for later use) at the start of each call into the service. It’s very simple:

  1. Check WebOperationContext.Current.IncomingRequest.Headers for an ‘Authorization’ header. If it’s there decode and validate the credentials.
  2. If the header is missing or the credentials are incorrect add the WWW-Authenticate header to the response - WebOperationContext.Current.OutgoingResponse.Headers.Add("WWW-Authenticate: Basic realm=\"myrealm\""); – and then throw a WebFaultException with a 401 Unauthorized status code.

This triggers a browser to prompt for your username and password and then try the request again. When calling the service in code you can add the ‘Authorization’ header preemptively and skip the 401 response entirely.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Basic HTTP auth for an IIS hosted WCF 4 RESTful service #code #wcf #iis #rest How to implement .NET Basic HTTP auth for an IIS hosted WCF 4 REST API. )

Catfood: WebCamSaver and PdfScan

By Robert Ellison. Updated on Thursday, November 12, 2015.

Two new Catfood releases.

Catfood WebCamSaver 3.10 adds support for simultaneous updates in 4 and 16-cam modes. The WebCam Directory has also been completely overhauled. WebCamSaver is a rather voyeuristic screensaver that lets you watch live feeds from around the world. As well as a screensaver the feed is available in my World Webcams Google Gadget.

Catfood PdfScan 1.20 follows hot on the heels of 1.10. The main update is showing a preview of each scanned page which is super handy if you always forget which way pages are supposed to go in your document feeder. Mentioning no names…

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Catfood: WebCamSaver and PdfScan #code #webcamsaver #pdf #pdfscan Latest updates to Catfood WebCamSaver and Catfood PdfScan )

Catfood: Earth, PdfScan and Weather

By Robert Ellison. Updated on Sunday, November 6, 2022.

Three recent Catfood Software updates:

Catfood Earth 3.10 includes rotation to longitude / solar time, volcanoes, a screen saver, time zone updates and more. Catfood Earth uses satellite imagery and a variety of data feeds to render jaw-dropping live desktop wallpaper.

Catfood Earth 3.10

Catfood PdfScan 1.10 saves your selected paper size and feeder choices. There is also an option to keep PdfScan open after saving a scan, something that had been bugging me when slogging through large digitization projects. PdfScan is a free tool for scanning stuff into a PDF file.

Catfood PdfScan 1.10

Catfood Weather 2.00 includes weather alerts and an updated UI. Catfood Weather provides a free, taskbar based weather forecast for US locations.

Catfood Weather 2.00

Add your comment...

Related Posts

(All Code Posts)

Convert BlogML comments to WXR for Disqus

By Robert Ellison. Updated on Thursday, November 12, 2015.

I’ve just moved ITHCWY comments over to Disqus. BlogEngine.NET now supports Disqus out of the box, but doesn’t export comments to anything that Disqus is willing to eat. I’ve knocked up a quick converter that takes a full BlogML export from BlogEngine.NET (and at least in theory any other source of BlogML) and converts the comments to WXR. You can import the WXR file under the Generic option in Disqus.

The tool is a Windows console application that takes two parameters, the BlogML import file and the WXR output, i.e.:

BlogMLtoDisqus.exe C:\BlogML.xml C:\ForDisqus.wxr

It isn’t fancy and there is no error checking so it will either work or die horribly. If the latter, leave a comment and I’ll try to fix it for you.

Download BlogMLtoDisqus.exe. You’ll need to install .NET 4.0 as well if you don’t already have it.

Updated 2011-04-22: Added an optional third parameter that specifies the XML namespace for BlogML in case you need to override the default.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Convert BlogML comments to WXR for Disqus #code #blogengine.net #c# #.net #blogml #wxr #disqus A command line tool to convert BlogML comments to WXR (i.e. for Disqus). )