views:

70

answers:

3

I am developing a mobile web application using System.Web.Mobile namespace of ASP.NET. I am facing problem with redirect to a different aspx page using Response.Redirect() while testing with dotmobi emulators with the error message:

The requested item could not be loaded (status code 502)

A: 

Make sure both aspx pages have the correct content-type set, e.g:

<%@ Page ContentType="application/xhtml+xml" %>

As well as:

Response.ContentType = "application/xhtml+xml"
Cpt.Ohlund
A: 

Status code 502: The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Reference: Wikipedia

Is the destination page within your website? Does it contain calls to external services / other servers?

Gan
+1  A: 

Try using Server.Transfer istead of response.redirect.

Martin S