SingleUserBlog
ASP.NET and Dirty Urls
There are two things that have been bothering me about pages that are getting indexed in Google from an ASP.NET application. The first is somehow there are ASP.NET Session Urls ending up in the Google index. This is bad because searchers that actually do click these links are likely to get a 500 error (internal server error) because they will be trying to access a page of an expired session.
How is Google finding all these 'bad' urls?
Well apparently there is no browser definition in ASP.NET 2.0 for the Googlebot's useragent string, so when the spider...
A few weeks ago before everything started getting really busy both personally and work wise, I still somehow found the time to put together a mobile version of my blog content.
Device DetectionIn the beginning I was just using the ASP.NET property Request.Browser.IsMobileDevice for device detection, but for some reason WindowsCE is not considered a mobile device by this property, so I included an additional 'if Request.Browser.Platform.Equals("WinCE")'. The mobile devices request will be redirected to www.kowitz.net/mobile/ which displays only one post on the screen at a time using 100% mobile controls and pages.
While I was creating my Mobile...
Why not use IHttpHandler for rewriting: You can find the previous post I've done on this subject here, it has a c# source code example and will also explain some of the downfalls of using the IhttpHandler for rewriting. In summary my basic feeling on this is IhttpHandler is great if you know the Url that is going to be requested eg. /Rss.ashx every time an rss reader requests this Url, the reader will never know that Rss.ashx doesn't necessarily have to exist as the response is picked up and written back by the handler. How is IHttpModule more useful url rewriting? When it...
I have been aching to try out Live Writer to do a post...but no success yet :(
Many people have probably seen the "Powered By ASP.NET 2.0" button.
So I thought it was only fair to convert it into a Powered by SUB button.
Or here's another more subtle one.
You may have noticed that over the past few weeks I have been trying to build more
interactive elements into this blog, some of these include.
Most viewed posts webpart.
Rate a post.
Highest Rated posts webpart.
Concurrent user indicator.
MSN client, online / offline status.
Sessions per hour graph.
My intention was that this blog would start to expose more of the interesting content
and create a slight online presence awareness by subtly reacting to...
Today I was browsing the website ProgrammableWeb, which lists the Web APIs by a lot of well known sites. One of the things that caught my eye was MSN, and then I noticed they had a listing for Messenger. After clicking details I soon found it was only a description of how Javascript can invoke a chat window from the installed messenger client.
I wanted to take this idea further and maybe integrate something Messengery into SUB. After a single search I come across DotMSN, a C# library for Messenger. So& as an experiment I've integrated the library into SUB....
I've had a couple of experimental things going on here in this blog. Firstly is the Archive page, it now renders the archive list in a similar fashion to a plug-in Al has created for wordpress. As for the whole query problem with the wordpress version, the SUB version of this does exactly 1 query for each month listed or 0 queries if that month has already been cached.
The other experimental webpart I've been running is the "Popular Posts" component (displayed on the left). Everytime a post is hit it increments the daily count, then it selects the...
Just for something random I decided to re-arrange the objects in the banner and adjust the link font sizes.
One of the things that has been annoying me for some time about Webparts is that silly dependency on SqlExpress/SqlServer. My webhosting at Jumba comes with MySQL or something and not SqlServer. So up until this point to get around the dependency on SqlServer I simply disabled all the calls from SqlBlogPersonalizationProvider and that did the trick, but I had to manually do all the layout stuff and couldn’t use the webparts properly. A while ago when Microsoft released the source code for the old AccessPersonalizationProvider from Beta 1 I thought I’d come back and address this issue.
Here’s what...
Here is the new Sqlite Dataprovider for SingleUserBlog v2.0.1. It is now supports string IDs so any existing SingleUserBlog can migrate easily.
Find out more information at its new home here.
Please feel free to leave any comments, feedback or problems on this post.
The proof of concept IHTTPModule friendly url rewriter for SUB using regular expressions.
For my previous post regarding friendly urls see here.Edit: To read more on this topic see my next post here.
There are very important differences between IHttpHandler and IHttpModule.
Last week I was also playing around with IHTTPHandler as a way of implementing a stop-gap friendly url handler.
Now the important difference is, once the request is sent to IHTTPHandler, if it doesn’t send any content back, the user will basically see a blank page. Now that’s not to say that one handler can’t pass the request only another handler...
Please be aware that it may still have bugs. I have been using it now for about two weeks, making small refinements as I’ve found them.
To Install. Copy the “sub.db” file in the /Data directory.
Ensure the “sub.db” file is writable and not read-only.
Copy the "kowitz.SQLiteBlogDataProvider.dll" file into the /Bin directory.
Copy the "System.Data.SQLite.dll" file to the /Bin directory.
Change the config file so SUB now uses the SQLite provider: <DataAccessType> kowitz.SingleUserBlog.Services.DataReaderBlogDataProvider, kowitz.SQLiteBlogDataProvider </DataAccessType> If you experience any problems when using the provider, just post comments here. Download Get it here [Edit 10-Mar-06: Updated Link]View Source Files OnlineI've...
Probably the best thing about SUB is its simplicity. There are two things I’d like to try to document in this post, firstly is the code for adding a simple google sitemap, the other is actually a question. I’m still curios to why Darren has used hard coded URL formatting in most of the repeaters when displaying a collection of posts. Under the APP_Code/ directory there is a UrlFormatter class which can generate a URL for any ApplicationDataObject (post or feedback item).
Taking this UrlFormatter class into consideration I have modifiied the GSiteMap.ashx file include a method that will write...
Just downloaded and included the ASP.NET Google SiteMap control, had to modify it a little so it looks at the mainMenu="true" option. You can have a look at its output here.Also I've added a Post Archive, which just passes straight down to the sqlite datalayer where it groups posts by a formatted month/year string.The other addition so far is a new search control on the sidebar. It also passes straight down to the sqlite datalayer and returns the appropriate post records.
I signed up with Jumba a few weeks ago now, so I’ve been really trying to get at least SOMETHING onto this webspace. There were a couple of conditions on choosing Jumba…I want ASP.NET…well that’s about it.
So the two things I currently have installed here are SingleUserBlog v2 and nGallery.
I’ve played around with the SUB source code back in v1, and “apparently” v2 is heaps better.
The changes I made to SUBv2 Well already I’ve written a new datalayer that uses the sqlite engine. What’s my reason for the sqlite datalayer? Well, I originally liked the idea of SUB...
Just a test post after setting up SingleUserBlogV2, all my data is stored using a custom Sqlite dataprovider I wrote. Will explain it all later.