Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Mobile / January 2005

Tip: Looking for answers? Try searching our database.

IsMobileDevice returns false when connecting with WM 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sacha Korell - 21 Dec 2004 22:57 GMT
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
Sean Feldman - 06 Jan 2005 21:30 GMT
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");

Signature

With the best wishes,
         Sean Feldman

> Request.Browser("IsMobileDevice") returns false when connecting with my
> iPAQ
[quoted text clipped - 22 lines]
>
> Sacha
Sacha Korell - 06 Jan 2005 22:12 GMT
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

> Hi,
> why won't you assign some special value to TYPE field in web.config
[quoted text clipped - 31 lines]
>>
>> Sacha
Sean Feldman - 07 Jan 2005 22:41 GMT
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?

Signature

With the best wishes,
         Sean Feldman

> Thanks for your reply, Sean
>
[quoted text clipped - 58 lines]
>>>
>>> Sacha

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.