OCDProgrammer.com

It's Microsoft's World, and I'm just living in it
View Clarence Klopfstein's profile on LinkedIn

Clarence Klopfstein's Facebook profile

This site is under construction...

Categories

New Comments

Referring Sites


Disclaimer

  • This is MY blog. The views represented here are not in relation to anybody else. Please read my full disclaimer for a more complete disclaimer.

Cat and Mouse with Comments

August 6, 2010 01:25 by ckincincy

So I have re-enabled comments on this site.  It is a cat and mouse game, but this time I implemented something custom to my DotNetBlogEngine site, so the default hacks that exist for DNBE sites won’t work on mine.

I simply require that a basic math problem be answered before the post goes on.  Will be interesting to see how this works.


Recent Referrers User Control

March 1, 2010 06:00 by ckincincy

In the past, Chris Blankenship had written a user control to show the recent referrers in DotNetBlogEngine.  I’ve used it on my site since then.  However in a recent upgrade of the code base it stopped working.  Having a little free time on my hand, I took the time to fix it for version 1.6. 

While doing that I wanted the ability to white list and black list certain domains.  The logic in DotNetBlogEngine to see if a referrer is spam is a little limited.  It does a simple web request on the referrer to see if it can find the host domain in the returned HTML.  This leads to a lot of good referrals being marked as spam.  Then there are some ‘good’ domains that I want hidden.

imageSo I added a white and black list to the referrer page.

The end result you see on the side bar of my site. 

If you’d like the code, you download it below.  This change does require a recompile of the business logic dll, and a schema change if you are using SQL.

Download Referrer Patch 1.1 – 31.4KB


Stop DotNetBlogEngine.NET Comment Spam

February 27, 2010 16:57 by ckincincy

image Comment spam on the DotNetBlogEngine platform has been a huge frustration.  Spammers have taken aim and generally have won. There have been various solutions offered up from the community.  Version 1.6 was almost solely targeted to combat spam.  So what happened?  The spam got much worse.

So in this cat and mouse game a new trick has been deployed.  Filip Stanek has incorporated the reCaptcha solution into DotNetBlogEngine. 

I deployed it last night and went from 20+ spam comments a day, to none so far.  Now, obviously, this is just another step on the cat and mouse game.  Will be interesting to see how long this works.


App_offline.htm – Page Not Found - Solution

December 9, 2009 17:49 by ckincincy

Today while looking over my RSS feeds I saw a post about some changes to the DOTNETBLOGENGINE, while looking over that fellow’s blog I saw a post about App_Offline.htm – Page Not Found.  I took a brief read over the article and it reminded me of a time when I ran into this issue. 

The Problem

The problem occurs when you turn App_Offline on, Internet Explorer (and apparently Google Chrome) will show a ‘pretty’ 404 error page.  Though FireFox will show the contents of the file without issue.

Here is the contents of my App_Offline.htm file:

image

Google Chrome shows this as a result:

image

Internet Explorer will show a page similar to this:

image

But Firefox shows the page as you would expect:

image 

 

The Solution

Now I remembered the solution pretty much immediately, you have to make the size of the file hit a certain limit.  I took a look around the web and found this article which puts the size at 512k.  That page recommends fixing this with some comments in the code.

Here is what my new App_Offline.htm file looks: 

image

Now you can see that the three browsers mentioned above will display the page as you would expect:

image

image

image

A Conclusion

Now, during my time of writing this blog post I got an email from Ben.  He gives a good justification for using his HTTPModule that his post talked about.  When you use App_Offline, all files are inaccessible.  Your site is down.  Now if you have some admin pages, or if you wanted to edit his solution to white list some IP, so you can test the solution without the general public seeing it using an HTTPModule sounds like a fantastic idea.  It, however, is not something you should implement to fix the 404 Page Not Found error.


Upgraded Blog

April 20, 2009 03:00 by ckincincy

image I took the time today to upgrade my blog to version 1.5. 

The main new item in this release for my casual reader is the ability to have nested comments. So now you have a ‘Reply’ option to comments so, who you are replying to is obvious.

Overall DNBE is a very good blog engine and if you run a blog, well worth the transfer to it. 


Fighting Spam Comments in DotNetBlogEngine.Net

March 28, 2009 08:28 by ckincincy

DotNetBlogEngine.NET (DNBE) has many extensions and managers to fight comment spam, but no matter what happens the spammers seem to be one step ahead of the automated system available to us. 

So I went back to a static extension from Chris Blankenship. After looking at it, I determined I wanted to add a few more fields to statically block comments.  Thus Comment Blacklister 2.0 is born. 

I have taken his extension and added the ability to block commenter’s by email, IP, and web url. 

Nothing special about it.  Download the zip file and put the CS file into your App_Code folder, then manage it through the Extension Manager.

Just for reference here is the other main comment spam extension I use, though as a stand alone it is not enough.

Download Commentor Blacklist 2.0.


Abusive Spiders - GateKeeper

January 11, 2009 15:39 by ckincincy

image

Chris Blankenship has been on a crusade lately about abusive spiders.  I was interested in some of the fixes he was applying to it, but a few weeks ago I got an email from him about a solution he was developing, ‘GateKeeper’.  I reviewed the code and it all looked good, but he wasn’t ready yet to fully release it into the wild.

It finally got to that point and I installed it on my two DotNetBlogEngine.net blogs. So far I have been really impressed with it.  I’m really interested to see how it affects my overall traffic.  Right now I have four blocked user agents:

baiduspider, larbin, sogou, sosospider.  All of those came from Chris’s recommendation.  Then I immediately got a Slurp violation, though I am going to give them one more failure before I block them.  Chris also has MSN blocked.  A lot of my traffic comes from Live Search, so I’m a little scared to do that.

I did fall on one issue with the solution though.  When I installed it, I had it set to automatically block violators.  Unknown to Chris and I is that Google caches the robots.txt file!  So since they didn’t get my new robots.txt file, they were blocked!  So it is recommended to not turn on the automatic blocking for at least a few days.

Related post from Chris’s site:
The Continued Struggle With Spiders
To catch a spider…
Abusive Web Crawlers
Blocking Bad UserAgents and IP Addresses
The elusive Robots.txt file


Windows Live Writer 2009 – Release Candidate

December 29, 2008 00:00 by ckincincy

image So I finally took the plunge and grabbed Windows Live Writer 2009’s Release candidate.

I tested it with my blog engine and found a bug where the publish date wasn’t being honored.  Found the issue in the code and submitted the fix to the DNBE team. The other bug I found while writing this post is that only the last image border set is honored, covered that here, so if you stick to one image border per post you won’t have issue.

So now I want to give an overview of the product itself.

It is ripe with great features.



First it gets you away from the lame website based rich text editors.

 

 

All the generics of this make, making a post kind of difficult.  Adding a picture is what I always found most difficult.  With Windows Live Writer you can add a picture one of two ways.

1. Just paste the image from your clipboard to your post.
2. Insert an image via their menus (or drag and drop).

Now here is where Windows Live Writer 2009 separates itself from anything else, the ability to manipulate images.  Windows Live Writer 2008 was good, but 2009 takes it to another level.

What the various ways I can post an image, without having to open up an image editor at all.

All of those options without opening an image editor. Also as you can see I am able to post to an album on the fly as well.  Windows Live Writer defaults to a Window’s provided album, but there are many plug-ins available for other online albums.

There are really a limitless number of things a person can do with Windows Live Writer 2009, all readily available from the UI.

One of the things alluded to in one of my pictures above was the ability to use plug ins.  Currently there are 111 plug-ins available.

There really is no reason to not use Windows Live Writer.

Though I will offer one caveat, the version they are pushing on their site is a release candidate.  Not official, so there could be a few issues with it.  I have found one, just working on this post.

UI Options:
image

image


Windows Live Writer 2008

December 27, 2008 18:43 by ckincincy

windowslivewriter2008I run two blogs, and if you've ever run a blog you know that one of the biggest headaches is using the built in HTML editor to make a post. 

In comes probably the best software Microsoft has ever released, Windows Live Writer.  gives you advanced controls so you can make a nice looking blog post with ease.  It works with many blog platforms, including the one this blog is built on (DotNetBlogEngine.Net).

I am actually posting this with their new version, Windows Live Writer 2009 – Release Candidate, but there is at least one issue with DotNetBlogEngine.net.  I have submitted the bug to both the WLW team and the DNBE team.  However their old version is perfectly functional, so when you visit the site go to the right side bar and download the stable version, or be ready to uninstall their current version in favor of their stable version. I know a lot of techies are weary of Microsoft Products, but trust me on this one... its an incredible piece of software and worth the risk.


New Blog Engine Extension - Comment Count

November 13, 2008 18:20 by ckincincy

The Comment Count Extension adds an image to the end of each RSS post showing how many comments have been made on the post. 

I chose to link to an image so whenever people look at your post in their RSS reader they will see the current number of post.  It also gives you an easy way to embed a message to your readers.

CommentCountInUse

To install this extension you can download the file below and put the comments in your BlogEngine web site.  No .config files need changed.

This extension has been configured to work with the extension manager:

CommentCountExtensionManager

Since it is an image you have to set the Width and Height of the image.  Then you can define the size of the font used.

Finally you have the string to display in your RSS feed.  The (x) is where the number of post will be placed.

Download
commentcount1.0.zip (2.94 kb) - November 13, 2008