AJAX and webprojects?

G

Guest

I have a solution with four webprojects developed in Visual Studio 2003.
It is upgraded to Visual Studio Team System 2005 / Framework 2.0.

Now I tried to AJAX enable one of the web projects.

1) I installed AJAX and did a demo based on Scotts ToDo demo application. It
worked fine.
2) Then I carefully copied all sections from the web.config file of the demo
to my real project.
3) I added ScriptManager and UpdatePanel to one very simple web page. It
complained that the assemblies were not available.
4) I added System.Web.Extensions and System.Web.Extensions.Designer to my
project references. The errors disappeared and the solution compiled.

But when I run, it does not work!
The application compiles and work but the AJAX enabling makes no difference.
I still get all the roundtrips that I intended to avoid.
I have checked my web.config several times for possible mistakes, but found
nothing.

Is it not possible to run AJAX on old style "webprojects"?
All examples I have seen so far are based on VS2005 "web sites".
 
M

Mark Fitzpatrick

It will work with the Web Application Project. I got it running after a bit of trial and errror as well. Adding the following config handlers worked well for me:

<httpHandlers>

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

</httpHandlers>

<httpModules>

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>



Something to keep in mind, there are actually a lot of bad examples of these config settings out there since a lot of them are for the beta releases. I've seen this configuration recommended as well (http://ajax.asp.net/files/Migration_Guide_Beta2_to_RC.aspx) but the lines I mentioned before worked.
 
T

Thomas Hansen

I have a solution with four webprojects developed in Visual Studio 2003.
It is upgraded to Visual Studio Team System 2005 / Framework 2.0.

Now I tried to AJAX enable one of the web projects.

1) I installed AJAX and did a demo based on Scotts ToDo demo application. It
worked fine.

I think you'll find Gaia Ajax Widgets easier to use...
http://ajaxwidgets.com

Check out any of the samples like e.g.:
http://ajaxwidgets.com/AllControlsSamples/LogoCreator.aspx
http://ajaxwidgets.com/AllControlsSamples/CalendarWebApplicationWithDateTimePicker.aspx
or
http://ajaxwidgets.com/AllControlsSamples/LiveMapsMashup.aspx (works
only in IE since it builds on LiveMaps that's not 100% FF comptible)

..t
 
W

Walter Wang [MSFT]

Hi,

ASP.NET AJAX 1.0 should be supported in Web Application Project.

To try this another way: you can create a simple AJAX enabled web site and
compare those sections in web.config. Or you can copy those sections from
your web.config into AJAX created default web.config and copy it back to
your web project.

#ASP.NET AJAX > Configuring ASP.NET AJAX
http://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx


Please feel free to let us know if there's anything unclear. Thanks.


Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

This approach was helpful.
I copied the real web.config into the demo project and it got the same
problems!
I had already checked that all AJAX sections were identical, so now I tried
to remove all other settings one by one.

The one that did the difference was:
<xhtmlConformance mode="Legacy"/>

I never put it there and never heard of it before!
When looking on the web I found a helpful explanation on Scotts blog
http://weblogs.asp.net/scottgu/arch...onformance-mode-legacy-with-asp-net-ajax.aspx
 
W

Walter Wang [MSFT]

Hi,

I'm glad you've found the root cause.

Thank you for sharing your experience here, this will surely benefit the
community!

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top