enter the pirate

A poorly maintained blog of technology

I Hate ASP.NET AJAX

There!! I’ve said it!!!

Don’t look at me like that, you know you’ve all been thinking it!

I just overcame the wonderful “[Method Error 500]” error while working with a set of ASP.NET AJAX CascadingDropDowns. What a lame error. Spend some time researching the problem and you’ll find a uniform response: “That error could mean that anything is wrong”. Fantastic!! That’s exactly how I wanted to spend two hours of my time. (That’s sarcasm, by the way)

Everyone’s solution is different because everyone’s problem is different; but, here’s what solved it for me.

I’m using a ContextKey to select data specific to the user who is accessing the application. Since (inspired by true genius… more sarcasm [hopefully you'll pick up the I'm somewhat sarcastic]) the ContextKey attribute of the CascadingDropDown can’t be DataBound, you have to set the ContextKey property of the CascadingDropDown object on Page Load. Well, I added another CDD and forgot to set the ContextKey in the Page Load even handler.

Bada-Bing!! That was it.

Sure, I should have remembered that adding a new CDD to the page meant setting it’s ContextKey on Page Load; but I didn’t. Because the code never reached the web service function, there was no way to step through with the VS 2005 debugger. Fun!

Remember, “[Method Error 500]” could mean your dog just died.

No comments yet »

Your comment

HTML-Tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>