it took me 4 hours to find out the simplest thing last night. So I
thought Id make a post in hopes that a) this will be fixed to stop
others from having to go through the same thing and b) help people who
are having the issue currently.
I was using the old Ajax.dll for 1.1, I saw the new version and wanted
to upgrade so I thought woohoo Ill jsut replace the dll and rename it
to Ajax.dll and everything would work great! Of Course this is not the
case.
So first of all you need to forget you even installed the old Ajax.dll
jsut remove it from your project and delete it from your bin folder.
out with the old in with the new!
Next you need to delete the HTTPHandlerFactory code from the web.config
and replace it with the new syntax.
For 1.1
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro"/>
</httpHandlers>
For 2.0
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>
now after you do this and run it you would think hey everythign is
great now! right!?!
WRONG! if you view the page source your going to see theres no <SCRIPT>
tags rendering in the html source like it used to, and hence you think
this is why you are reciving these Undefined errors from all your
method/function calls. If you are like me and are putting all your ajax
methods in its own class and not the web page you probably are doing
somehting like this
myAjaxClass(doFunction, callback)
this no longer works and this is where all the problems are.
AjaxPro.dll only accepts calls by using the full namespace name so
myAjaxClass(doFunction, callback) becomes
MyProjectName.myAjaxClass(doFunction, callback)
POOF EVERYTHING WORKS! even without the page rendering the script html.
I do not know why this was changed and really wish they would change it
to accept both methods as now I have to go back and change 30 pages of
code that call functions which is terrible. you should always allow
backwards compatibility when releasing new versions of stuff. nobody
wants to rewrite there entire project cause you thought of a better way
to do something. allow both!
Im not trying to bash the writer of this fantastic wrapper. I am only
trying to save some people some headaches. This is the best Ajax
Wrapper out there far better then googles and I can do nothing but
thank Michael Schwarz for all his hard work.
But please allow for backwards compatibility!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---