Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - January, 2007
A simple programmers blog
 
# Friday, January 26, 2007
ATLAS RTM by pjones@hot.co.nz
Go get it now!  ASP.Net 2.0 AJAX Extensionis officially RTM. 
 
There's a few minor changes from the release candidate, most notably the removal of the validation controls, but it's a pretty simple upgrade.
Friday, January 26, 2007 8:04:33 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
# Thursday, January 25, 2007
Yet another reason to use IIS and not the built in web server in Visual Studio (Cassini).  I have some PageMethods I'm calling from the page that tell me the progress of a search.  In Cassini these calls queue up while the async search methods are running becuase it does not know how to handle multiple requests concurrently. 
 
Also, Cassini always has Windows Auth turned on.  It ignores the NTLM Auth setting in your project.
 
I do find Cassini fine for simple web pages though and I use it on my notebook for small site development without problems.
Thursday, January 25, 2007 12:15:07 PM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
# Monday, January 22, 2007

Well, the ‘5 things about me tagging game’ has finally caught with me, thanks Darryl.  I did miss your link though as I’ve been spending a lot of time lately getting Vista working sweetly, working on a couple of web sites and preparing a presso for the local .Net User Group - which conveniently gave me plenty of time to think about the 5 things – just in case I got asked.  So here goes.

  1. I lived in Sydney for a while in my youth and drove a cab for a year.  Famous fare’s included Tim Finn, Barry Humphries (thankfully not in costume) and Yana Vent (spelling?) (but you have to be Australian to know her).  Other interesting jobs include TV Aerial Installer, Bakers Assistant, Storeman, Egg Collector, Night Porter, Barman, Bouncer, Telephone ‘Operator’.
  2. I live about ½ an hour out of Christchurch and have a lifestyle block with 500 or so olive trees, 3 kids, 8 chickens and 2 cats.  Oh, and a wife :]
  3. I seem to get sucked (?) into starting user groups and community ‘things’.  I started the Christchurch Clipper User Group back in the early 90’s and I STILL think Clipper is a great development language.
  4.  Most exotic(?) place I’ve been to would be Brunei.  My most favorite city?  Have to be Florence.  I spent a few days there about 18 years ago.  Definitely want to go back and see more of Italy.  Scariest place I’ve been? Johannessburg at night.
  5.  I hated school.  I’ve never attended university and didn’t get UI either.  Consequentially, my kids get off too easy from homework.

I’ll need to do some research to see who hasn’t been tagged yet.  I’ll update this post later.

 

Monday, January 22, 2007 10:33:21 PM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
# Monday, January 15, 2007
I've been doing a lot of fun JSON stuff lately using ASP.Net AJAX (aka ATLAS).  This really is Fun with a capital 'F' but I struck a small problem today.
 
Given the following C# class:
public class PageData {
 
    public string Name;
    public string Address;
    public DateTime DOB;
 
    ...
 
}
I serailize this to the page thus:
 
C#
 
    protected void getPageData() {
        PageData pd = new PageData("Peter Jones", "New Zealand", DateTime.Now());
        return "(" + JavascriptSerializer.Serializer(pd) + ")";
 
    }   
 
ASP:
 
    <DEFANGED script type="text/javascript">
        var pagedata = eval('<%= getPageData() %>');
 
    </script>
 
Now this works fine for all data types except DateTime.  When you serialize a DateTime you get a value in JSON like this:
 
    @7895678963897@
 
This is the number of milliseconds since 1 Jan 1970.  When this is de-serialized with eval() you just get a string. 
Instead of using eval() you need to use Sys.Serialization.JavaScriptSerializer.deserialize().
 
For reference see:  nikhilk.net and Hannes Preishuber
 
Update
 
This appears to have changed in the RTM release.  Dates are now serialized thus:  /Date(millseconds)/.  However, I cant get this to deserialize using Sys.Serialization.JavaScriptSerializer.deserialize() so have reverted to using a string in yyyymmddThhmm format, which Date.parse() will happily convert.
Monday, January 15, 2007 8:34:28 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
# Saturday, January 13, 2007

I was reading a post from Rod about Telecom's stupid idea to sell Yellow Pages.  I couldn't agree more, it is a dumb idea, but I have a more cynical POV on this.  As a (very) small time share hold who bought at $8.60 I'll be very pleased to get some money back - even if it's just $0.25 per share.

Bad company decisions from bad companies and bad management hasten the demise of the company.  Telecom is long overdue for annihilation.  Govmint legislation and stupid ideas like this are a good thing if they lead to the death of Telecom - provided that it's a slow lingering death that gives the employees, vendors and customers time to 'adjust'. So I'll be sending a thank you note to Ms Gating and encouraging her to stay on for another few years.  Think of all the future cock-ups we will miss out on when she leaves!

Saturday, January 13, 2007 8:24:08 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Politics | Business  | 
# Sunday, January 07, 2007
Heros by peter@jonesie.net.nz

I watch more TV than I really want to and I generally hate most of it (note to self – get a life!) but one show I’ve been watching recently (downloaded rather than live) is Heros.  I see TV3 is playing this from next week.  If you can’t get the clean HDTV downloads then bear the pain of the advertisements and watch this show. It is excellent – a great story with lots of twists and turns. 

Sunday, January 07, 2007 10:12:29 PM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
# Saturday, January 06, 2007

Holidays are great.  You get lots of time to do all the work you don’t normally have time for.  Yesterday I finally got around to upgrading my notebook to Vista from XP.  Here are a few things I did that made the job easier.

  1. Upgraded the RAM to 1 Gig.  Previously I only had 256 + 128.  How I have 1024 + 128.  This cost $279 from Global PC.  The tech in the local shop fitted it for me.  I’m sure I could have found something cheaper on the Interweb but given the usual no return policy on RAM it’s sensible to let someone else take the risk. 
  2. Used the Vista Upgrade Advisor.  This told me that I would have some compatibility issues with Visual Studio 2005, SQL 2005 and a few other items but that I could install anyway.  It also told me that Aero wouldn’t work with my Graphics card which surprised me a little.
  3. Downloaded Vista from MSDN.  Thanks to Telecom’s Go Large / Go Slow plan this took 10 days for 2.5 GB.  Thankfully though, the MSDN downloaded ensured that I had a clean uncorrupted download.  Burnt this image to DVD.
  4. Installed Business edition using the upgrade option rather than a full install.  I figured I could always do a clean install later if I wasn’t happy with the performance or setup.

The upgrade took about 2½ hours.  Once finished I uninstalled a bunch of stuff including Visual Studio Team Suite, SQL 2000, SQL 2005.  For the small development work I do on my notebook I find that Visual Web Developer Express and the new Expressions tools work just fine – in fact, Web Dev Express is much easier and faster to use than the full VS 05.  I also configured the standard windows components – removing IIS and installing Games – what’s the point of a home computer without Spider Solitaire??? 

At first, the hard drive was grinding for a long time and the whole install seemed very slow.  However, I used a 1GB memory stick to provide some Readyboost and over night the search indexes completed building.  Now the machine works very well.  Outlook even manages to seem speedy!  I’m very happy and not having Aero does not seem such a bad thing.

Saturday, January 06, 2007 11:54:33 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
Copyright © 2012 Peter G Jones. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: