New feeds for the ASP.NET Podcast
Thursday, May 08, 2008 12:08 PM

Wally has created some new feeds for the ASP.NET Podcast  There is still the same general feed.  It will have all shows and all of the variations of the shows in it.  These include WMV, MP4/M4V, MP3, and whatever else one can throw in it. The rest of the feeds are:

If you have any problems, let me know ASAP!

by Glav | with no comments
Latest Podcasts
Monday, May 05, 2008 10:49 PM

Wally has put up some new podcasts around using Google maps and virtual earth with ASP.NET AJAX.

You can check em out at the following links:

Integrating ASP.NET AJAX with Google Maps.

ASP.NET AJAX with Virtual Earth

These podcasts allow you to explore mapping possibilities with the 2 popular mapping services currently available.  in combination with ASP.NET AJAX.

Check em out and get geographical !

by Glav | with no comments
WiX - Painful at best
Tuesday, April 29, 2008 4:35 PM

So I finally got WiX to create an installer for me after many hours of poor documentation, obscure errors and bizarre angle bracket syntax.

The latest error I have really annoyed me as there was no obvious indication what the error was and how to resolve it, which is really the purpose of this post. To share this so that others may benefit, and because my memory is so poor, I need to record it for later use :-)

Basically I got this:

candle.exe : error CNDL0001: Cannot set column 'Attributes' with value 239 because it is greater than the maximum allowed value for this column, 127.

Nice. I wont bore you with the vulgarities that I produced trying to decipher this message, but it ended up being the fact that I had put a <sql:sqlDatabase> server definition was inside a feature element rather than outside on its own.

So I had put this:

<sql:sqlDatabase Id="SqlDatabase" Server="[DATABASESERVERNAME]" Database="[DATABASENAME]" />

inside a <Component> tag.

Placing the <sql:sqlDatabase> tag back outside the <Component> tag fixed this issue.

Hope it saves others similar frustration.

Remix in Oz
Monday, April 28, 2008 5:05 PM

Remix, is heading downunder and registrations are now open. You can register here.This event is especially cool for the many people who did not get a chance to attend the actual Mix event in the United States (which is many of us).

Dates and locations are:

Sydney
   May 20
   Powerhouse Museum
   Harris Street, Ultimo
Melbourne
   May 22
   Melbourne Town Hall
   Cnr Swanston & Collins
   Street, Melbourne

There will be heaps of quality technical content from a bunch of local technical rockstars, and I will be attending and participating as an expert in one of the "Ask the Experts" areas.

Look forward to seeing you there!

Oh, by the way, each attendee receives a copy of Expression Studio 2 (rrp$1040) for free when they register!

The Next Web Now

MCTS in WCF
Sunday, April 20, 2008 6:55 PM

So a little while ago, I mentioned that I did a WCF beta exam for a Microsoft Certified Technical Specialist. Its been a long time since I did that and I had kinda forgotten about it, but today I received the good news that I am now a MCTS in WCF!

WooHoo!

I really thought I had bombed that exam due to the very little prep that I had done, but fortunately that is not the case.

I would love to hear from anybody else (particularly any fellow australians) who have also done the beta exam and received their congratulatory email.

by Glav | 6 comment(s)
Filed under: , ,
Reducing page load times with UpdatePanels and timers
Monday, April 07, 2008 11:18 PM

I have demo'ed this technique before and talked about it various times, but I recently used this on another engagement which really helped alleviate some of the initial page load times and size.

In my scenario, we had a page utilising the AJAX Control toolkit and which utilised the excellent Tab control to contain a number of separate display elements.

image

The page itself had a number of other toolkit control on it, and quite a few GridView controls (notorious for excessive viewstate and page bloat). Page size and speed was paramount on this project so I wanted to be able to bring up the page as quick as possible -BUT- we had to retain all the functionality we had introduced.

The page weighed in at approximately 210kb. Utilising the delayed load technique I was able to reduce that to approx. 130Kb and retain every bit of functionality so far.

The theory is this:

  • The initial tab has the controls defined as normal.
  • Each subsequent tab content is encased in an Panel with the visibility set to false (to prevent its content from being rendered)
  • The invisible panel is also encased in an UpdatePanel.
  • Each UpdatePanel has an async trigger that points to an <Asp:Timer control.
  • Initial the timer control is not enabled.
  • When the page loads, it activates the first timer control.
  • The timer control tick event, sets the invisible panel to visible, disables itself, then enables the next timer.
  • Next timer sets its invisible panel to visible=true, disables itself, and enables the next timer.
  • Process continues.

I have provided a demonstration of this via videocast here with full source code here.

In this trivial example, there is one page with all tabs being loaded as normal, and another using the delay load technique. The standard page has a size of around 50Kb. The page using delay load has an initial load size of approximately 25kb which is half the size.

Obviously, the bigger pages get, you can see how you might be able to have a rather weighty page that initially only loads a small subset of the page, then uses delay load to load the other sections.

I have found this technique valuable, and it can easily be changed to suit your needs. Hope you find it of value too.

ASP.NET MVC and IE8 WebActivities
Friday, March 14, 2008 12:23 PM

One of the great things in readify is the ability to do Professional Development at scheduled intervals to keep up to speed with the latest industry technologies and advancements. My latest foray into this (amongst other things) has been looking at the ASP.NET MVC framework and Internet Explorer 8 WebActivities. Both of these technologies are quite cool and I wanted a way to learn about them both and link them in some way where I could learn about them at the same time.

To that end, I created a solution in Visual Studio 2008 which utilises the ASP.NET MVC framework and allows a user to enter some fields to create an IE8 Web Activity definition. You can then view the XML definition, and click the 'Add' button to add that activity to Internet Explorer 8 as a proper web activity.

The web activity generated is not particularly functional, but does allow previews, icon definition, execute actions, however has no current support for parameters. Again, not really intended as a fully fledged utility or application, but a good way to learn about both the MVC framework and IE8 activities.

The solution can be downloaded here.

Obviously, you need Visual Studio 2008, the ASP.NET MVC preview 2 framework, and have Internet Explorer 8 beta installed.

Feel free to download, play, chop up etc...

Why wont you just work....
Monday, February 25, 2008 8:32 AM

In a previous post on some problems I had with VS2005 and unit testing where running unit tests always gave me this:

image

I reported that uninstalling and re-installing the test components of Visual Studio fixed it up. Well I am getting the exact same behaviour with VS2008 now. So, I thought I would uninstall the unit test component of VS2008, then re-install it, and all would be good.

Not quite, uninstalling it, then re-installing it did nothing. On further examination, the tools didn't actually uninstall. Currently, I have uninstalled the entire Team test tools selection as you can see below.

image

However, I still have all the functionality to run unit tests in VS2008! So not only can I not run unit tests, I cannot even uninstall anything!

image

Please..... why wont you just work? I have better things to do with my time....

For anyone interested in the details, it has issues trying to load the Microsoft.VisualStudio.QualityTools.Common.dll assembly as shown by the exception text below;

Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Now this (and all the Quality tools assemblies) are located in the PrivateAssemblies folder, just like they are on a colleagues machine, and yet they cannot be found.

Update: I got jack of it not working after multiple attempts at uninstalling and re-installing the test components, and simply copied all the Microsoft.VisualStudio.QualityTools.* assemblies from the PrivateAssemblies folder into the ...\Common7\IDE folder. It is now working as expected.

by Glav | with no comments
Filed under: ,
WCF & ASP.NET Role Provider
Friday, February 08, 2008 3:08 PM

So I was talking to Shea Strickland a relatively new starter in readify who is doing some WCF work and asked  about the role provider support in WCF. He pointed me to an article by Dominick Baier who mentioned that the RoleProviderPrincipal in WCF will actually cause a database call each time an IsInRole check is performed.

After some experimentation, this was confirmed by myself to be absolutely true. If a service request comes in, and during the course of that request, you make 3 IsInRole checks (perhaps at various layers of the domain model for example), then the database will get 3 requests to execute a stored proc to check the users role.

By contract, the ASP.NET RolePrincipal will get all the users roles when the first IsInRole check is performed, and then subsequent role checks will not hit the database at all, but rather check against the roles that are in memory.

I was somewhat disappointed by this as it meant that potentially, a lot of extra DB work is being performed, and not exactly what I would call best practice. Luckily, WCF is pretty easy to extend, and again, with the help of an article by Dominick Baier, I created a custom authorisation policy (implements IAuthorizationPolicy) which could be plugged into WCF, and use the standard ASP.NET RolePrincipal, thus getting the behaviour we are after.

To that end, I have created a small library with the authorisation policy code ready for you to download and use.

Simply download the library here, then make a change to your configuration file as shown below.

image

I would consider this a pretty common requirement if you are using the ASP.NET Role Providers in WCF, so this is why I have made this available. In addition, its a pretty small piece of code, but its still not that easy to discern via just spelunking around WCF (as Dominick already mentioned).

So hopefully this is useful for others.

by Glav | 3 comment(s)
Filed under: , ,
ASP.NET, CSS & Control Adapters
Monday, February 04, 2008 9:06 PM

I thought I'd pass on some link love to Damian Edwards, the resident readify CSS god. Here recently did an RDN presentation on using CSS effectively with ASP.NET and the first of a series of articles on that very subject can be found here.

its a great article and well worth your time to read, especially if you want to make ASP.NET are good CSS citizen.

by Glav | with no comments
Filed under: , , ,
More Posts Next page »