Redirect from IhttpHandler ashx.vb file

I have a problem with a ashx.vb file
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

        Try
               /*  CODE TO UPLOAD THE FILE */

                context.Response.Redirect("~/Prodotti/STEP6.aspx", False)
                Return
            Catch ex As Exception
                Throw New Exception("Error", ex)
            End Try

        Catch ex As Exception
            Dim msg As String = GestioneErrori.TrapError(ex)
            context.Response.Write(msg)
        End Try

    End Sub

I use it to process the request of uploading a file using uploadify.
I need to reload the page which contains the fileUpload object.
I think context.Response.Redirect("~/Prodotti/STEP6.aspx", False)  was the only way  but it doen't work.
The file upload shows http error 302 (see 302.png)

the ashx.vb file is store in a folder at the same level of the folder which contains the page to be redirected (see tree.png)

Any idea?

thank you
302.png
tree.png
Progold S.p.A.IT ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kamal KhaleefaInformation Security SpecialistCommented:
i think you need to use context.completeRequest instead
0
Progold S.p.A.IT ManagerAuthor Commented:
It's not working  :(

I had to write
context.Response.Redirect("~/Prodotti/STEP6.aspx", False)
context.ApplicationInstance.CompleteRequest()

because completerequest was not available directly on context
('CompleteRequest' is not a member of 'System.Web.HttpContext')
0
Progold S.p.A.IT ManagerAuthor Commented:
Ps. I also tried with

HttpContext.Current.Response.Redirect("~/Prodotti/STEP6.aspx", False)
HttpContext.Current.ApplicationInstance.CompleteRequest()


and

HttpContext.Current.ApplicationInstance.Response.Redirect("~/Prodotti/STEP6.aspx", False)
HttpContext.Current.ApplicationInstance.CompleteRequest()


but both didn't work
0
Progold S.p.A.IT ManagerAuthor Commented:
the problem was in uploadify
I've added
'onUploadSuccess': function (file, data, response) {
                        location.reload(true);
                    }

and I solved my problem
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Progold S.p.A.IT ManagerAuthor Commented:
I solved the problem after the comment of the expert
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.