Hello everyone. Thanks in advance for the help you can give me.
I have a page (business page class that inherits from UI.Page) where I
want to enable AjaxPro (1.1 framework), so I've done all the passages
to configure it.
The component so configured (httpHandler and page_load code) emits 3
scripts in the page but I found that the script "ashx" file that
should contains all the namaspaces and proxy jscript methods does not
render correctly.
I tried using trace.axd asp utility, and the file "ajaxpro/core.ashx"
give the status code 200 (OK) but the file named for example
"ajaxpro/ASP.test3,fxtds-vg.ashx" give the error 500. If I try to put
that URL in the browser I receive this application error:
[NullReferenceException: Object reference not set to an instance of an
object.]
AjaxPro.AjaxRequestProcessor.Run(String typeName) +511
AjaxPro.AjaxHandler.ProcessRequest(HttpContext context) +61
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
+179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +87
The page has the code page_load directly on the aspx file and not in
codebehind .vb files. The exactly same page coded using codebehind file
works correctly. The problem is that I cannot use the codebehind 'cause
it's an existing application and is developed using code in the aspx
file. All the exaples I found use the codebehind logic.
The url of proxy file emitted by the page that use the codebehind (the
page that works) is slightly different from the one emitted by the
not-codebehind page:
codebehind: ajaxpro/test3,_2xfswye.ashx
notcodebehind: ajaxpro/ASP.test3,fxtds-vg.ashx
It seems that ajax cannot access the assembly/class generated by
asp.net framework (ASP.test3), so cannot wrap the method and it can't
generate the script file.
--------
file not codebehind: *this doesn't work! but should*
<%@ Page Language="VB" ClassName="test3"
Inherits="MyNameSpace.HtmlPage" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Ajax.Utility.RegisterTypeForAjax(GetType(test3), Me)
End Sub
<Ajax.AjaxMethod()> _
Protected Function hello() As String
Return "Hello World!"
End Function
</script>
--------
file codebehind (only the file .vb): *this works! but I cannot use it*
Public Class test3
Inherits MyNameSpace.HtmlPage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Ajax.Utility.RegisterTypeForAjax(GetType(test3), Me)
End Sub
End Class
Sorry for the long post, but I should explain. Sorry for my bad english
too.
Im looking forward your replies, thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---