This is a migrated thread and some comments may be shown as answers.

Asp.net ajax client failed to load

7 Answers 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark Williams
Top achievements
Rank 1
Mark Williams asked on 28 Mar 2010, 06:17 AM
OK, I know this is a somewhat common problem - and I have truly done a lot of searching here and elsewhere but I just can't work this out (I've spent about fours hours on this tonight and my patience has been exhausted :-)).

As I posted elsewhere, I am a newbie with the Telerik controls and I am using the Ajax controls specifically. I receive the error in the subject line on "project A", which is our long running production site on which I wish to add Telerik controls. "Project B", meanwhile, is a seperate site on the same development server. The code and configuration for "project B" was provided by a vendor and works fine. This tells me that the physical machine has all the necesary support (Telerik controls, VS 2008, IIS 7.0, etc).

I have gone through the two web.config files with a fine tooth comb this evening (using a file comparison tool) and feel very confident that the relevant sections are the same. So, I believe I can discount web.config as the issue.

And that's where I get lost. What else can I check? When I load a file with a Telerik control on "project A" I receive the error. On "project B" I don't get the error and can use the Telerik controls.

I'd appreciate anyone putting me out of my misery. Beyond the web.config file, what else do I need to check?

Thanks.

Mark

7 Answers, 1 is accepted

Sort by
0
Mark Williams
Top achievements
Rank 1
answered on 28 Mar 2010, 07:30 AM
This just get's more weird. Here's some troubleshooting I did today (as a reminder "project A" doesn't work, "project B" does).

. Copied web.config from "project B" to "project A" (so exact same web.config file now)
. Create a minimal "Ajax Web Form" called AjaxTest.aspx on both projects
. BOTH RUN WITHOUT ANY ERRORS
. I then add a RadCaptcha control to both AjaxTest.aspx files.
    . "Project A" fails with an error - "Microsoft JScript runtime error: 'Telerik' is undefined"
    . "Project B" works

So, same machine, same ASPX file, same Telerik control, same web.config - but one runs and the other doesn't after I add the Telerik control. What do I need to do to ensure that "Project A" sees the Telerik control correctly.

I have no idea. Any thoughts?

Thanks.

Mark
0
Mark Williams
Top achievements
Rank 1
answered on 28 Mar 2010, 06:53 PM
Still no joy on this. I have spent many hours on this and I am completely clueless about the cause. I do have "project B" up and running on our live site, which is good but has a much narrow feature set (it's basically just a couple of admin pages we use). By comparison, "project A" is our actual production web site and because of this issue we are unable to use any Telerik controls on this site, which is immensely frustrating.

Given that the (test) .aspx file and the web/config file are identical across projects A and B and it's all running on the same development machine, I really appreciate any pointers as to what other components/factors would result in Ajax not working on "project A" but working fine on "project B".

This is driving me crazy and I've given the best part of a weekend trying to identify the cause. So, anyone saving the remainder of my weekend would be a star in mu eyes :-)

Thanks.

Mark
0
Veselin Vasilev
Telerik team
answered on 29 Mar 2010, 09:13 AM
Hello Mark Williams,

I already replied to your support ticket:

It seems there is a problem loading the javascript resources in your project. You can check possible solutions here. You can also check our web resources troubleshooting article.

I think that it is possible that when you drag and drop a control from the toolbox to the test page - the reference to the Telerik assembly is changed (probably because the toolbox items point to another version of the Telerik assembly).

You can use Fidller to inspect the javascript requests and responses and see what is the error.
Do you use forms authentication in your project? If so, the point 4 in the aforementioned blog post should help.


Kind regards,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mark Williams
Top achievements
Rank 1
answered on 29 Mar 2010, 09:34 PM
Thank you for the response, Veskoni. I have spent some more time today trying to identify the cause but with no luck. Here are some specific things I have checked.

. Keep in mind that I have an seperate project on the same machine running fine with an identical copy of web.config (apart from a couple of areas which are unrelated such as connection strings). I actually copied from the working project to the broken (and then added the connection string changes) so I know they are in sync. This, I believe, points away from this being a web.config issue.

. Ironically, the project that DOES work is the one with forma authentication, whereas the one that does not work had no authentication (or, more specifically, autonymous access is enabled).

. Both projects are configured the same for *.axd (namely, allowed with IsapiModule being the handler in both cases)

. The expected JavaScript (Sys.WebForms.PageRequestManager, etc) does exist in the page in question.

So, still very confused at this point. I look forward to hearing from you.

Thanks.

Mark
0
Veselin Vasilev
Telerik team
answered on 01 Apr 2010, 02:05 PM
Hello Mark Williams,

Can you send me the URL of the non working page?
Did you inspect the traffic with FireBug? It could give you a clue if for some reason the resources are not loaded.
If you use RadScriptManager try setting its EnableScriptCombine property to False.
Is it possible a firewall to block some of the resources that are coming from the second project? Or just strip the headers of the request?

Sincerely yours,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Accepted
Mark Williams
Top achievements
Rank 1
answered on 01 Apr 2010, 08:17 PM
Thanks. I finally got to the bottom of this, using Fiddler. In a nutshell, I have a custom URL remapper that was incorrectly handling web service calls. I fixed that and the problem is resolved.

I am not sure what can be done - if anything - to hint at this in the docs (it might be too obscure) but this took me many hours to identify. I accept that this is problem difficult to generalise though - but I wish I'd thought of that earlier :-)

Thanks for your help.

Thanks.

Mark
0
Veselin Vasilev
Telerik team
answered on 02 Apr 2010, 11:09 AM
Hello Mark Williams,

I am glad that everything is ok now. Thanks for letting us know the reason.

Best wishes,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Mark Williams
Top achievements
Rank 1
Answers by
Mark Williams
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or