Calender
<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Due to the fact that BlogEngine.NET was developed on the 2.0 Framework, you’ll need to update the httpHandlers in the web.config so that it can run on IIS 7.0.  This is an easy process, but one that I didn’t find well documented, so I wanted to share the most simple solution I’ve found.

Pipeline

First, you’ll need to change the pipeline mode to “Classic” and make sure that your instance of BlogEngine is operating correctly.

Command Line Expression

Now you can migrate the httpModules section by using the following command line expression:

%systemroot%\System32\inetsrv\appcmd.exe migrate config "blogEngineInstance/"

Once this is complete you can change the pipeline back to managed mode (“Intergrated”) and the site should work fine.  If you’re hosting your instance on a hosting service like DiscountASP, then you’ll need to do this process on your development machine and then update the web.config on your hosted version.

Whenever you implement "runat='server'" on an element, ASP.NET creates a unique id. 

     id='myControl' ... becomes ... id='ctl00_cphBody_deepWithin_anotherCtl_myControl'

I'm certainly not complaining, abstraction is great, but when you're using the ID as a selector in jQuery, you'll quickly run into issues with Server Controls.  There are a couple of ways, which I can think of, to get around this problem, both have their pros and cons.  

Server Tags

Providing your jQuery is on the same page as your server controls, you can use server tags to write the UniqueID to the page at runtime.

  $("#<%= myControl.ClientID%>").

The problem with this solution is that any jQuery written in external files can't implement it.  Though it would be my opinion that hard-coded ids in external files is bad design, though I'd welcome arguments against that statement.

Wild Card Selecting

An alternative way would be to use jQuery's wild card selection.

   $("[id$='myControl']");

With the wild card selection you have to consider a couple of things.  First off, ASP.NET uses this unique id to ensure that when you nest controls within controls there's no mismatch of ids, so uses a wild card could create bugs, depending on your project.  Secondly, you must consider performance; jQuery is having to search through all elements in order to find your control and no matter how good the algorithm is, it must mean a performance hit.