Friday, 21 December 2007

.NET AJAX .axd give error regarding utcDate

Both WebResource.axd and ScriptResource.axd give an error at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) method, as shown below:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

Parameter name: utcDate]

System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) +3258643
System.Web.HttpCachePolicy.SetLastModified(DateTime date) +47
System.Web.Handlers.ScriptResourceHandler.PrepareResponseCache

(HttpResponse response, Assembly assembly) +194
System.Web.Handlers.ScriptResourceHandler.ProcessRequest
(HttpContext context) +1154
System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.
ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication
.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

First, look for the simple. If it's your machine's date time is in the past (or the future), then it is easy to fix. Just change your system clock.

In our case, it is not that straight forward. We have moved the time forward for a while, and ASP .NET 2.0 SP1 was installed while the time is in the future. So basically the assemblies and GAC modified date time is in the future. AJAX does not like it. I guess it is a bug.

We wanted to uninstall and reinstall SP1, but windows does not allow us to remove it. So we click "change" instead of "remove" in Add/Remove programs. Not sure what did windows do, but magically it works. It probably update all the installed dlls, so the modified date times are corrected.

Otherwise, we may have to "touch" all the files... :(

Tuesday, 18 December 2007

Deploying Silverlight Application - Why Blank?!

Yesterday we have deployed a Silverlight 1.0 application onto a Window Server 2003 machine. The deployment seems very easy (well you only need to create an application in IIS), however when we try to load the application, the screen was blank.

We need to add new MIME type for the application to recognize XAML:

Properties > HTTP Headers Tab


Clicks "MIME Types...", and click "New"
Add extension ".xaml" with type "application/xaml+xml"

Tuesday, 11 December 2007

2008 Summer Road Trip - Auckland

Date and time:
Monday, 4 February 2008 at 1:00 p.m.

Hosted by:
Jacqui Chow (ya apparently that's me!)

Location:
Auckland Institute of Technology, Ground Floor, Wright Stevenson House 585 Great South Road, Penrose, Auckland

Summer is here! And with it is coming new technology from Microsoft that will affect how we design and build infrastructure and applications.

Come and join Chris Auld and Jeremy Boyd along with local, Alex Henderson, as they set up a solution entirely on Windows Server 2008, SQL Server 2008 and host an application built in Visual Studio 2008 and .Net 3.5 over a two hour period.

The application show cases all the latest features of these products including Virtualization, IIS, Spatial data, web and HTTP programing, and much more to demonstrate how these products will affect technology professionals (both infrastructure and developers) in the next couple of years.

There will be some very cool spot prizes and give aways on the day, and by registering and turning up on the day you will go into the draw to win one of three Windows Home Servers (to be drawn at the end of the road trip on Feb 21).

To register for the road trip, click here, enter your details (plus any friends you want to invite) and click register.

Doors open at 1pm, presentation starts at 1:30pm and the presentation will be done by 3:30pm.

Come along and meet your peers and learn about the latest technology and maybe even win a (very cool) prize - for free!

Dont forget to register at http://www.dot.net.nz/Default.aspx?tabid=113!

See you there!