Podcast: Spiludvikling i Silverlight med Mads Laumann

OBS: This blog post is in Danish, just in case you didn’t see it :)

Efter min talk på ITU omkring spiludvikling i Silverlight, blev jeg kontaktet  af Søren fra ANUG.dk som spurgte om jeg kunne være interesseret i at deltage i en podcast omkring emnet. Dette takkede jeg selvfølgelig ja til og resultatet er nu at finde på anug.dk

ANUGCast #71 Spiludvikling med Mads Laumann del 1 af 2
ANUGCast #72 Spiludvikling med Mads Laumann del 2 af 2

– Enjoy!

Monitoring your BlogEngine.net installation – Health Monitoring and WebMonitor

When you have a web site, for instance an installation of BlogEngine, you often want to be able to know about errors on it and if it is down. There are a lot of tools to help you out here, but in this post I will talk about using a build-in ASP.NET feature called Health Monitoring and a tool I wrote called WebMonitor.

[more]

Health Monitoring

For ASP.NET developers Health Monitoring might not be something new and something that they know much about. My guess is that the average BlogEngine user/owner doesn’t know about this, why I decided to create this post. So, what is Health Monitoring in ASP.NET?

Well, Health Monitoring is a build-in feature in ASP.NET that gives you an easy way to get notified about your applications (BlogEngine in this case) health at run-time. You can read more about Health Monitoring here on MSDN. This means that with the setup I am going to explain below, you will be able to get an email when ever an error is occurring on your site. When I say “when ever an error occurring” it is really not totally true. Health Monitoring is intelligent in the way that it doesn’t just spam you EVERY time an error occur, it wait some time and send you one email, even if 20 errors occurred with in 5 seconds. But you can read more about that on the MSDN link above.
Let me also add here, that I’m not sure if Health Monitoring is fully functional on BlogEngine, as I haven’t tested it that much on the 1.6 release. If they implemented manually redirects in code in the “wrong” way in the BlogEngine, you might not get all the error emails as you should. But let me say that I have had Health Monitoring enabled on my blog for a long time and it seems to still be working in 1.6.

So, how do we enable this? Actually it’s pretty easy. You need to open up your root web.config from your BlogEngine installation. Between the <system.web> and the </system.web> you insert the code below.

<healthMonitoring enabled="true">
      <eventMappings>
        <clear />
        <!-- Log ALL error events -->
        <add name="AllErrors" type="System.Web.Management.WebBaseErrorEvent"
                                      startEventCode="0" endEventCode="2147483647" />
      </eventMappings>
      <providers>
        <clear />
        <add type="System.Web.Management.SimpleMailWebEventProvider"
                                      name="EmailWebEventProvider"
                                      from="ERROR@YOURDOMAIN.COM"
                                      to="YOUR@EMAIL.COM"
                                      bodyHeader=""
                                      bodyFooter=""
                                      buffer="false" />
      </providers>
      <rules>
        <clear />
        <add name="Auth Failure Audits Email" eventName="AllErrors"
                                      provider="EmailWebEventProvider" profile="Default" minInstances="1"
                                      maxLimit="Infinite" minInterval="00:00:05" />
      </rules>
    </healthMonitoring>

Now you change the ERROR@YOURDOMAIN.COM to the email address you want the email to come from. Then you change the YOUR@EMAIL.COM to your email, where the error emails should be send.

Now your done and you should start receiving emails about errors on your site (if your STMP settings is setup correctly, you setup them up either in the web.config or on the administration pages of BlogEngine).

You can setup up a lot of stuff on Health Monitoring via the web.config, so if you want to go deeper into this, see the MSDN page linked to earlier in the post or Google it. For instance you can make the errors go to a database instead of as email and you can setup which types of error you want etc.

WebMonitor

Another way to keep yourself updated on the “health” of your blog/site, is to use WebMonitor. WebMonitor is an application I made 2 years ago or so, as I needed to keep an eye on some servers that wasn’t responding from time to time.

So what does this “WebMonitor” tool do? Well, first of all, it’s a desktop application that you install on the machine that you are using, instead of having the server do stuff like in the Health Monitoring case. What you basically do is to setup of a “monitor” for a specific URL. The monitor will then make a request at a given time interval. You can then setup the monitor to react to different rules and notify you if something is wrong. For instance, if the response time is longer than 500 ms you can be notified with a balloon popup from the tray.

Screen1.png Screen2.pngScreen3.png

You can read more about WebMonitor and download it from Codeplex.com

Hope it helps!

– Enjoy!

BlogEngine.Net 1.6 released – Maybe focus on SEO in next release?

So today it happened, finally, the new version of BlogEngine has been released. It comes with some major Comment Spam Protection changes, multi widget support and more. This is all great and I really hope that this can beat these bad comment spam bots, which I guess we all hate.

I have just upgraded my blog to this latest release and the upgrade went pretty good without any real problems. So far so good, now I just have to wait and see if the spam protection is working as intended.

[more]

SEO in next release?

As I mentioned in a previous post I would like to get my blog 100 % (or at least close to) SEO (Search Engine Optimized) to help people find my blog through search engines. I guess we all want that, which is why I think SEO would be a great focus for the next release of BlogEngine.

ScottGu recently blogged about Microsoft’s new SEO Tool for IIS7 see the blog post here: http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx

I know the BlogEngine theme can’t help people posting broken url’s, making bad themes etc. What they could do were to try and make the default theme (the Standard one) as close to 100% search engine optimized. I just tried setting my blog to use this Standard theme and then let the SEO Toolkit run over my blog. This is the result I got.

SEO Toolkit result

SEO Toolkit validation summary

As you can see, this isn’t very good. As mentioned, I have some broken links etc, that’s my own problem, but some of the major ones should be able to be fixed by the BlogEngine team. I don’t want to go through all the points that the BlogEngine team could do something about, I think they can see them self :)

I have considered just making changes to the source for my blog to make my blog be more SEO, but then at a second thought I don’t want to, as I then need to take over my changes to each new release of the BlogEngine and that would be a nightmare. Another reason for letting the official team put it into the engine is that we would all like to have this, right?

So, lets hope the BlogEngine team will look into this, I guess much of it would be pretty easy fixes. I have posted about this in the discussion at codeplex: http://blogengine.codeplex.com/Thread/View.aspx?ThreadId=82862

– Enjoy!