IsMobileDevice returns false when connecting with WM 2003

S

Sacha Korell

Request.Browser("IsMobileDevice") returns false when connecting with my iPAQ
2215 (and other Windows Mobile 2003 devices), although
HTTPBrowserCapabilities "Platform" returns "WinCE".

What's going on? I'm using VS.NET2003 for development with DeviceUpdate4
installed.

I had a code snippet like:

If Not (Page.IsPostBack) Then
If (Device.IsMobileDevice) Then
RedirectToMobilePage("mobile/m_default.aspx")
Else
Response.Redirect("default.aspx")
End If
End If

It used to work just fine, but now "Device.IsMobileDevice" also returns
false.

Any ideas?

Thanks,

Sacha
 
S

Sean Feldman

Hi,
why won't you assign some special value to TYPE field in web.config
specification of your iPAQ and trest it this way:

if (Device.Type == "the value you have assigned")
RedirectToMobilePage("mobile.aspx");
else
Response.Redirect:)web.aspx");
 
S

Sacha Korell

Thanks for your reply, Sean

Well, the problem is really that I want any mobile device to be redirected
whether it's an iPAQ or a Smartphone device, but apparently devices running
Windows Mobile 2003 do not get recognized by Device.IsMobileDevice. I was
very enthusiastic when Microsoft started the whole "DeviceUpdate" thing, but
they must have quit that over a year ago. Now they refer to a vendor
(cyScape) in the machine.config that charges over $300 for new device
updates.

Here's how I have solved the problem (for now):

If (Request.Browser("IsMobileDevice") = "true") Then
RedirectToMobilePage("mobile/m_default.aspx")
Else
Dim bc As HttpBrowserCapabilities = Request.Browser

'* Will be changed to 'Select Case' later
If bc.Platform = "WinCE" Then
RedirectToMobilePage("mobile/m_default.aspx")
Else
Response.Redirect("default.aspx")
End If
End If


Sacha
 
S

Sean Feldman

Hi,
well, frankly speaking, I can't figure out what's going on with Mobile
ASP.Net. On one hand it's a great piece of work, on other hand it's kind of
stacked. For instance, the Xhtml adapters source I've being chasing after
aren't on the MSDN or any other place. Aslo the mobile part of asp.net site
is quiet as dead place. Have a clue what are Microsoft's plans?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top