Showing posts with label ajax. Show all posts
Showing posts with label ajax. Show all posts

January 20, 2007

Sys is undefined - AJAX 1.0 RC

Okay, I am frustrated. My project was working fine a few days ago and now I'm getting the dreaded Sys is undefined error. I've been trying to track it down with no luck.

A Google search shows that there are many people with this same issue. I've gone through my config file and everything looks correct.

I'll keep working on it and will post here as soon as anything comes up.


Update: A little farther...

Ok it seems as if my ScriptResource.axd file is being encoded! I'm using the Blowery HTTP Compression Module and after adding an exclusion for the mime type: application/x-javascript my WebResource.axd started coming back - it was coming up with a blank file before. However I keep getting the error Invalid character. I think its because ScriptResource.axd is encoded and not being decoded!

It's also telling me that the Type.RegisterNamespace function cannot be found (this function exists in ScriptResource.axd). I checked with Fiddler and ScriptResource.axd is being GZIP encoded. So I removed any reference to blowery and still no luck! You can view my posts on the ASP.NET Forum here for further detail, my user name is SuperGhost (the Batman logo).

You can check if your script is being encoded by opening up Fiddler and calling your ScriptResource.axd. Run your page first and get the source. The source will contain the correct path and querystring to the ScriptResource.axd file as well as the WebResource.axd file.

I'll post an update when this gets resolved!


Resolved: Finally

Ok found the problem a few days ago. The file was being encoded and the problem was that I had earlier uncommented a line in my web.config and then commented it back out again. Apparently the setting remained, not sure why. This is the line:

<scriptresourcehandler enablecompression="true" enablecaching="true">

You can see the enableCompression is set to true. So a simple change was all it needed. I uncommented the line and set compression to false:

<scriptresourcehandler enablecompression="false" enablecaching="true">

And that's it! Resolved! Also the Blowery HTTP Module was not affecting the script at all. I hope this helps anyone else having this issue!

kick it on DotNetKicks.com

December 04, 2006

ASP.NET AJAX under the hood

Great article by Omar Al Zabir on some advanced tips & tricks using AJAX. Omar is the architect behind Pageflakes.com and uses ASP.NET / AJAX as the foundation. If you're using AJAX, much like I am, you will find the article very useful. It goes into batch calls, timeouts, caching, javascript tricks, and a few other items.

One thing I found very useful was how Omar implemented a "retry" feature when doing an AJAX call. This is exactly (or very close to) what I have implemented in my StickTo application. So go on and take a look. And in the near future I'll be posting some AJAX tips of my own including: displaying a progress bar without an update panel and how to use JSON de/serialization from client/server and back.

kick it on DotNetKicks.com

November 13, 2006

ATLAS: POST is slower than GET

A good article explaining that ATLAS defaults to POST when calling back and that POST is generally slower than calling a GET. However GET only supports strings, dates and numerals. The article goes on and shows how to implement a GET statement from your web service.

Very handy if you're looking to increase performance on your AJAX.NET app, if applicable of course :)

kick it on DotNetKicks.com

October 03, 2006

Project Foundation

Ok, it's late... I've had a stressful day... and I'd like to try the new Blogger Beta posting... so here goes.

I've finalized my foundation for my new project. After many hours researching and learning about some of this stuff I have chosen a very sexy set of tools and components as my new foundation. Here it is:



There ya go! If anyone has any suggestions or comments please let me know!

kick it on DotNetKicks.com