BlogEngine.NET image manipulation enhancements

4 Comments » | Tuesday, March 17th, 2009

I created a patch for BlogEngine.NET which enables you to crop & resize image while being uploaded. And not only that. You can now easily insert any previously uploaded image with the new image browser.

Image Browserbe-browsebutton be-browse

New image upload with cropping & resizing

Works only with JPEG images.  Cropping is not supported in IE8.be-resize

be-crop

Installation

Download & unpack it and then upload it to your BlogEngine.NET directory. You need to overwrite Add_entry.aspx and Add_entry.aspx.cs files.

Final notes

This extension works only for posts, not pages. The code is partly based on  Upload and Crop Images with jQuery, JCrop and ASP.NET article. If you have any problems, please let me know.

CodeRush Xpress

No Comments » | Sunday, November 2nd, 2008

Microsoft and Devexpress recently released a new plugin for Visual Studio. Every C# developer with Standard or above version of Visual Studio can now enjoy a basic set of features from CodeRush and Refactor! Pro for free. You can watch the announcement from PDC, take a look at it’s features or download it right now.

Blogengine.net running under IIS 7 causes Error 404

5 Comments » | Saturday, November 1st, 2008

You need to make some changes in web.config file in order to get it work.

The easest way is to download an updated web.config here (thanks to ASPone’s wiki).

What is the best free English online dictionary for non-native speakers?

No Comments » | Saturday, October 25th, 2008

Personally, I think that there is no clear winner but some online dictionaries are really worth mentioning: Dictionary.com, Merriam-Webster’s Learner’s Dictionary and Cambridge Dictionaries Online.

  • Use Cambridge Dictionaries Online if you need both British and American pronunciation written using IPA symbols. You can also use it as an idiom finder.
  • On the other hand Merriam-Webster’s Learner’s Dictionary will provide you with useful pictures (see “car” entry) and allows you to hear american pronunciation.
  • Finally, Dictionary.com is handy when you need more information (synonyms, etymology,..) because it will show you entries from different dictionaries like Webster’s Revised Unabridged Dictionary, The American Heritage® Dictionary of the English Language, WordNet and so on.

And what’s your favourite online dictionary?

Model-based validation for ASP.NET MVC: better approach

No Comments » | Tuesday, September 9th, 2008

In my previous post about model-based validation I introduced my concept of validating data using attributes as well as using my own HTML helpers to display errors. Many things have changed since then because of new MVC release. What’s new in ASP.NET MVC Preview 5?

  • ModelState class which stores model’s validation errors and
  • Model binders for populating data from forms to strongly typed objects.

You can read more about it in Scott gu’s article ASP.NET MVC Preview 5 and Form Posting Scenarios.

That’s why I have updated my code from last time to use some new stuff and to get much shorter code in controllers:

[ActionName("Create"), AcceptVerbs("POST")]
public ActionResult Save()
{
    if (this.IsModelValid(typeof(TestModel)))
    {
        // Save it, just an example
        _repository.Save<TestModel>(ViewData.Model);

        return RedirectToAction("Done");
    }

    return View("Index");
}

What IsModelValid() does?

  • validates submitted data (according to type, name and attributes)
  • populates ViewData.ModelState with errors
  • populates ViewData.Model

I really like this idea (code is very readable) but after reading Thoughts on validation in ASP.NET MVC applications I realized that my approach lacks in some ways:

  • no repository specific error handling
  • violating some good principles

So althrought Steve Sanderson’s code is a bit longer, his validation concept make sense and I am really looking forward to see it in action!

Are you getting errors after installing ASP.NET MVC Preview 5 for no reason?

No Comments » | Sunday, September 7th, 2008

Well I was. I uninstalled previous version, installed new one, created a blank new MVC project and got following errors:

Could not load type 'System.Web.Routing.StopRoutingHandler' from assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The UrlRoutingHandler is not used to directly handle requests.

If you are in the same situation I have good news for you! I solved it just by installing VS & .NET 3.5 Service Pack 1! You can get it here. I hope this helps you too!

Model-based validation for ASP.NET MVC (concept)

2 Comments » | Wednesday, August 20th, 2008

MVC is definitely the way to go for the future but ASP.NET MVC Preview 4 (the latest release) still lacks in lot of different areas. One of the most essential missing features is some kind of validation and I am not the only one who needs this stuff right now. That’s why I have written a few lines for validating my forms. It’s basically a concept which is not ready for production but I want to share it with you a get some feedback.

Read the rest of this entry »

ASP.NET 3.5 / IIS 7 / SQL server hosting – one year for free

No Comments » | Wednesday, July 30th, 2008

Quantasoft, a Slovakia hosting company, has a limited offer on their "Mini" hosting plan: a whole one year for free (saving you $48)!

Hosting parameters:

  • 2 GB diskspace for data / mails / database
  • 25 GB/month bandwidth
  • ASP.NET 3.5 and lower + PHP 5
  • IIS 7
  • MS SQL 2005 Workgroup Edition
  • details

This limited offer is for first 100 orders and is valid to 3th August 2008. Quantasoft also provides a free ASP.NET hosting. Enjoy!

(Disclaimer: I am not connected to Quantasoft in any way)

6 ASP.NET MVC books so far?

No Comments » | Friday, July 25th, 2008

Well… yes and no because none of them has been released yet. The only one available is "ASP.NET MVC in Action" from Mannings which is in early access program. Personally I am really curious about "Professional ASP.NET 3.5 MVC" book because Conery & Hanselman & Haack is a very interesting combination of great and famous developers. And what about you?

Read the rest of this entry »

Simple free grey template

No Comments » | Tuesday, July 22nd, 2008

About a year ago I made a simple design for internet project which has never been finished. Because of that I rewrote it recently to become at least a "free theme" (or "open design" or whatever you want to call it). You can use it for any purpose under the condition that the link to my site will be kept (but I am willing to cancel this condition for non-profit upon request).

You can see it as well as download at it’s homepage: http://stribny.name/free-themes/S_simple_grey_theme/.

Hostgator is going to host .NET sites in the nearly future