Redirect to Mobile page RRS feed

  • Question

  • User342212311 posted
    I reviewed the postings and example code on Microsoft that uses Request.Browser("IsMobileDevice") and added the <httpRuntime useFullyQualifiedRedirectUrl="true" />. However, this code enters an endless quering. What would be causing this endless quering? Has anyone else experienced this? Thanks.

    Saturday, August 6, 2005 10:59 PM

All replies

  • User-95607119 posted

    Are you sure your code doesn't cause endless loop?

    Thursday, August 11, 2005 5:55 PM
  • User342212311 posted

    Yes, it was my code. The code was referencing the page calling itself. Sometimes you can look at something and not see the bugs before your eyes until you give up in frustration.

    The code redirects for a Pocket PC 2002, but fails for a Pocket PC 2003. There must also be a browser configuration that has to be added to the web.config file - do you know what might need to be added?


    Thursday, August 11, 2005 6:46 PM
  • User-95607119 posted
    Redirecting means usually that browser gets HTTP response 302. On some browsers it is possible to block redirects. I'm not 100% sure that this is the cause of your problem. Before building workarounds just check if the problem is not in your code.
    Friday, August 12, 2005 6:27 AM
  • User286710293 posted


    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 
        If Not IsPostBack Then
              Dim obj As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
               If Not obj.IsMobileDevice Then
                End If
             End If
         End Sub

    Sunday, August 14, 2005 7:45 PM
  • User-95607119 posted

    The example above works only if ASP.NET can recognize the device. If it doesn't then it uses default fir IsMobileDevice (true).

    Monday, August 15, 2005 7:33 AM