Welcome Guest Search | Active Topics | Sign In | Register

NullReferenceException in AJAXFileUploader after postback Options
Chris
Posted: Thursday, January 17, 2008 9:07:44 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2007
Posts: 7
I keep getting the following error with AJAXFileUploader

Quote:
[NullReferenceException: Object reference not set to an instance of an object.]
EO.Web.Internal.a8.a(cd A_0, HttpResponse A_1, Object A_2) +1807
EO.Web.Internal.ai.a(cd A_0) +427
EO.Web.Internal.ai.a(HttpApplication A_0) +45
EO.Web.Internal.fb.a(Object A_0, Boolean A_1) +62
EO.Web.Internal.d2.a(Object A_0, EventArgs A_1) +34
System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

This seems to be a result of the requested url ending with '/',
e.g. http://www.example.com/test/ causes an exception
whilst http://www.example.com/test works fine.
eo_support
Posted: Thursday, January 17, 2008 9:15:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Do you use any Url rewriting module? How do you get http://www.example.com/test/ to be directed to a page that contains our AJAXUploader?

Thanks
Chris
Posted: Thursday, January 17, 2008 9:17:25 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2007
Posts: 7
No, custom IHttpHandler.
eo_support
Posted: Thursday, January 17, 2008 11:55:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Chris,

Would you be able to provide a copy of your custom IHttpHandler or a stripped down version of it so that we can reproduce the issue at here?

Thanks
Chris
Posted: Friday, January 18, 2008 2:20:54 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2007
Posts: 7
The http handler
Code: Visual Basic.NET
Public Class Test
    Implements IHttpHandler

    Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.IsReusable
        Get
            Return True
        End Get
    End Property

    Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
        Dim page As New page

        Dim form As New HtmlForm
        form.ID = "form"

        Dim uploader As New EO.Web.AJAXUploader
        uploader.ID = "uploader"
        uploader.TempFileLocation = "d:\data\temp\upload"
        uploader.AutoPostBack = True

        form.Controls.Add(uploader)

        page.Controls.Add(New LiteralControl("<html><body>"))
        page.Controls.Add(form)
        page.Controls.Add(New LiteralControl("</body></html>"))

        page.ProcessRequest(context)
    End Sub
End Class


Also add to the web.config file
Code: XML
<location path="test">
		<system.web>
			<httpHandlers>
				<add verb="*" path="*" type="WebApp.Test, WebApp" />
			</httpHandlers>
		</system.web>
    </location>


Now try to access a url under test ending with '/', eg /test/ and it should error whilst /test is ok.
Chris
Posted: Friday, January 18, 2008 3:09:45 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2007
Posts: 7
I forgot to mension as it could make a difference that this web app is .Net 1.1
eo_support
Posted: Friday, January 18, 2008 4:47:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Thanks for the information. We will take a look and see what we can find.
eo_support
Posted: Monday, January 21, 2008 5:17:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
The issue has been fixed with build 2007.2.26.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.