[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

MobileCapabilities is wrong "most" of the time

VijayS

12/21/2006 10:32:00 AM

Howdy,

For the past two weeks, I've been playing around and implementing a
mobile web site using the ASP.NET 2 Mobile UI Controls (in
System.Web.UI.WebControls namespace).

When trying to read browser capabilities by casting Request.Browser to
MobileCapabilities, common attributes like IsColor, ScreenPixelWidth,
ScreenPixelHeight are often wrong. I've tried on a variety of color
mobile devices and IsColor always returns false...

Something is strange here, and I'm not sure what MS is doing to
determine the MobileCaps.

Has this been a problem for anyone else?

I've built WAP pages before in JSP that read the UA-Profile from the
HTTP Request header, fetch the XML URI therein and parse it for the
true and accurate MobileCapabilities.

Have MS completely forgotten about UA-Prof on mobiles?

-Vijay

11 Answers

VijayS

12/22/2006 2:44:00 AM

0

After more googling, I discovered that the MobileCapabilities are
determined from the
%WINDOWS%\Microsoft.NET\Framework\%FRAMEWORK_VERSION%\CONFIG\Machine.config.


Here are some good links that discuss the issue:
http://www.hanselman.com/blog/MakingDasBlogWorkOnMobileDe...
http://www.codeproject.com/aspnet/brows...
http://www.slingfive.com/pages/code/br... (IE ONLY)

For the schema of the BrowserCaps section, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfbrowsercapss...

There's a browsers folder inside CONFIG that contains .browser files
that try to cover the entire gamut of browsers. However, the config
files are missing most unique device models (but seem to include most
manufacturers), defaulting to some primitive capabilities. For example,
my K750i returns false IsColor, and under-valued screen res.



I couldn't find the schema of the .browser files, nor find an obvious
link between machine.config/web.config and the browser files.

These browser config files need updating for new devices.

Does anyone know where I could buy ASP.NET browser config files for our
projects? Or, must we generate them ourselves from device trial/error.

The only real solution I can think of is to parse the RDF in the
X_WAP_PROFILE request header field and generate per USER_AGENT browser
configurations. There still needs to manual tweaking and merging for
capabilities that aren't explicitly specified in the profile RDF.

This should be part of ASP.NET...or a documented missing feature..

IMHO, this limitation constraints the usefulness of ASP.NET Mobile.
Next time, I may even try and avoid ASP.NET mobile entirely for mass
market sites.

PS: I hope someone from MS reads this, because this is pretty important
to get ASP.NET working ubiquitously on mobile browsers.

-Vijay


VijayS wrote:
> Howdy,
>
> For the past two weeks, I've been playing around and implementing a
> mobile web site using the ASP.NET 2 Mobile UI Controls (in
> System.Web.UI.WebControls namespace).
>
> When trying to read browser capabilities by casting Request.Browser to
> MobileCapabilities, common attributes like IsColor, ScreenPixelWidth,
> ScreenPixelHeight are often wrong. I've tried on a variety of color
> mobile devices and IsColor always returns false...
>
> Something is strange here, and I'm not sure what MS is doing to
> determine the MobileCaps.
>
> Has this been a problem for anyone else?
>
> I've built WAP pages before in JSP that read the UA-Profile from the
> HTTP Request header, fetch the XML URI therein and parse it for the
> true and accurate MobileCapabilities.
>
> Have MS completely forgotten about UA-Prof on mobiles?
>
> -Vijay

aaron.aallen

1/22/2007 7:24:00 PM

0

I completely agree. I am suffering from the same thing. If you find a
way to supplement the .browser files please let me know. I will do the
same.

--Aaron

VijayS wrote:
> After more googling, I discovered that the MobileCapabilities are
> determined from the
> %WINDOWS%\Microsoft.NET\Framework\%FRAMEWORK_VERSION%\CONFIG\Machine.config.
>
>
> Here are some good links that discuss the issue:
> http://www.hanselman.com/blog/MakingDasBlogWorkOnMobileDe...
> http://www.codeproject.com/aspnet/brows...
> http://www.slingfive.com/pages/code/br... (IE ONLY)
>
> For the schema of the BrowserCaps section, see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfbrowsercapss...
>
> There's a browsers folder inside CONFIG that contains .browser files
> that try to cover the entire gamut of browsers. However, the config
> files are missing most unique device models (but seem to include most
> manufacturers), defaulting to some primitive capabilities. For example,
> my K750i returns false IsColor, and under-valued screen res.
>
>
>
> I couldn't find the schema of the .browser files, nor find an obvious
> link between machine.config/web.config and the browser files.
>
> These browser config files need updating for new devices.
>
> Does anyone know where I could buy ASP.NET browser config files for our
> projects? Or, must we generate them ourselves from device trial/error.
>
> The only real solution I can think of is to parse the RDF in the
> X_WAP_PROFILE request header field and generate per USER_AGENT browser
> configurations. There still needs to manual tweaking and merging for
> capabilities that aren't explicitly specified in the profile RDF.
>
> This should be part of ASP.NET...or a documented missing feature..
>
> IMHO, this limitation constraints the usefulness of ASP.NET Mobile.
> Next time, I may even try and avoid ASP.NET mobile entirely for mass
> market sites.
>
> PS: I hope someone from MS reads this, because this is pretty important
> to get ASP.NET working ubiquitously on mobile browsers.
>
> -Vijay
>
>
> VijayS wrote:
> > Howdy,
> >
> > For the past two weeks, I've been playing around and implementing a
> > mobile web site using the ASP.NET 2 Mobile UI Controls (in
> > System.Web.UI.WebControls namespace).
> >
> > When trying to read browser capabilities by casting Request.Browser to
> > MobileCapabilities, common attributes like IsColor, ScreenPixelWidth,
> > ScreenPixelHeight are often wrong. I've tried on a variety of color
> > mobile devices and IsColor always returns false...
> >
> > Something is strange here, and I'm not sure what MS is doing to
> > determine the MobileCaps.
> >
> > Has this been a problem for anyone else?
> >
> > I've built WAP pages before in JSP that read the UA-Profile from the
> > HTTP Request header, fetch the XML URI therein and parse it for the
> > true and accurate MobileCapabilities.
> >
> > Have MS completely forgotten about UA-Prof on mobiles?
> >
> > -Vijay

Peter van Rees

1/28/2007 11:55:00 AM

0


I couldn't have said it better. I am trying to get a mobile website
running, but there isn't a single modern device properly recognized
besides windows ce pda's....

I was thinking on making a uaprof file parser myself. Did you start
working on this already? I would be interested to share some thoughts
on it.

Peter

Peter van Rees

1/28/2007 3:21:00 PM

0


Guys, someone has been faster than we are

check http://mobilelabs.redc...

Paulo Gomes has written a tool to inject wurfl data directly into the
asp.net browser capabilities infrastructure, bypassing the browser
definition files!

I did some testing already, and it all seems to work like a charm.



On 28 jan, 12:55, "Peter van Rees" <petervanr...@gmail.com> wrote:
> I couldn't have said it better. I am trying to get a mobile website
> running, but there isn't a single modern device properly recognized
> besides windows ce pda's....
>
> I was thinking on making a uaprof file parser myself. Did you start
> working on this already? I would be interested to share some thoughts
> on it.
>
> Peter

aaron.aallen

1/28/2007 4:29:00 PM

0

Interesting, I know I came across this a few months back. I remember
finding a short coming. I'll need to check my notes. I thought I
remembered a community forum over there, and posted some questions.
But I can't find it again....

Definitely, let's keep this conversation going, and come to a solution
together.

On Jan 28, 10:21 am, "Peter van Rees" <petervanr...@gmail.com> wrote:
> Guys, someone has been faster than we are
>
> checkhttp://mobilelabs.redc...
>
> Paulo Gomes has written a tool to inject wurfl data directly into the
> asp.net browser capabilities infrastructure, bypassing the browser
> definition files!
>
> I did some testing already, and it all seems to work like a charm.
>
> On 28 jan, 12:55, "Peter van Rees" <petervanr...@gmail.com> wrote:
>
> > I couldn't have said it better. I am trying to get a mobile website
> > running, but there isn't a single modern device properly recognized
> > besides windows ce pda's....
>
> > I was thinking on making a uaprof file parser myself. Did you start
> > working on this already? I would be interested to share some thoughts
> > on it.
>
> > Peter

Peter van Rees

1/28/2007 6:00:00 PM

0

I would be interested in your notes, that might save me a lot of
trouble. I do hope I can live with your reason to discard the product,
because I do not think there are too many alternatives.....

the short coming might lie in the fact it uses a huge xml file which I
think is cached memory? I can really notice the slower response of the
first page being viewed after restarting the application.

Further more: as far as I can tell wurlf does not work with regular
expressions in the useragent recognition, so literally every firmware
version of a phone has to have it's own entry.

aaron.aallen

1/28/2007 9:03:00 PM

0

My notes are in the office, so I will look into this on Monday. I'm
already using Wurfl for things like logging and device recognition,
despite the need for the full user agent string it is pretty good.
It's been in production for a few months now and I'm satisfied with
that aspect of it. They release versions every 6 months or so, and
it's easy to drop the new file in.

I would be very satisfied if I could have the wurfl level of detection
integrated with the .Net controls. It would be head and shoulders
above what it is now. The .browser files are SOOOO far behind.... I
had to write my own generic blackberry file just to get it recognized
at all...

On Jan 28, 1:00 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
> I would be interested in your notes, that might save me a lot of
> trouble. I do hope I can live with your reason to discard the product,
> because I do not think there are too many alternatives.....
>
> the short coming might lie in the fact it uses a huge xml file which I
> think is cached memory? I can really notice the slower response of the
> first page being viewed after restarting the application.
>
> Further more: as far as I can tell wurlf does not work with regular
> expressions in the useragent recognition, so literally every firmware
> version of a phone has to have it's own entry.

Peter van Rees

1/30/2007 7:35:00 PM

0

Aaron, sorry for my impatience, but did you get round to looking up
your notes already? I am very curious what is in them....



On 28 jan, 22:03, "Aaron" <aaron.aal...@gmail.com> wrote:
> My notes are in the office, so I will look into this on Monday. I'm
> already using Wurfl for things like logging and device recognition,
> despite the need for the full user agent string it is pretty good.
> It's been in production for a few months now and I'm satisfied with
> that aspect of it. They release versions every 6 months or so, and
> it's easy to drop the new file in.
>
> I would be very satisfied if I could have the wurfl level of detection
> integrated with the .Net controls. It would be head and shoulders
> above what it is now. The .browser files are SOOOO far behind.... I
> had to write my own generic blackberry file just to get it recognized
> at all...
>
> On Jan 28, 1:00 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
>
>
>
> > I would be interested in your notes, that might save me a lot of
> > trouble. I do hope I can live with your reason to discard the product,
> > because I do not think there are too many alternatives.....
>
> > the short coming might lie in the fact it uses a huge xml file which I
> > think is cached memory? I can really notice the slower response of the
> > first page being viewed after restarting the application.
>
> > Further more: as far as I can tell wurlf does not work with regular
> > expressions in the useragent recognition, so literally every firmware
> > version of a phone has to have it's own entry.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


aaron.aallen

1/30/2007 8:03:00 PM

0

On Jan 30, 2:35 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
> Aaron, sorry for my impatience, but did you get round to looking up
> your notes already? I am very curious what is in them....
>
> On 28 jan, 22:03, "Aaron" <aaron.aal...@gmail.com> wrote:
>
> > My notes are in the office, so I will look into this on Monday. I'm
> > already using Wurfl for things like logging and device recognition,
> > despite the need for the full user agent string it is pretty good.
> > It's been in production for a few months now and I'm satisfied with
> > that aspect of it. They release versions every 6 months or so, and
> > it's easy to drop the new file in.
>
> > I would be very satisfied if I could have the wurfl level of detection
> > integrated with the .Net controls. It would be head and shoulders
> > above what it is now. The .browser files are SOOOO far behind.... I
> > had to write my own generic blackberry file just to get it recognized
> > at all...
>
> > On Jan 28, 1:00 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
>
> > > I would be interested in your notes, that might save me a lot of
> > > trouble. I do hope I can live with your reason to discard the product,
> > > because I do not think there are too many alternatives.....
>
> > > the short coming might lie in the fact it uses a huge xml file which I
> > > think is cached memory? I can really notice the slower response of the
> > > first page being viewed after restarting the application.
>
> > > Further more: as far as I can tell wurlf does not work with regular
> > > expressions in the useragent recognition, so literally every firmware
> > > version of a phone has to have it's own entry.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -

What I have found are notes to the effect that it doesn't actually
override the default behavior of .Net controls. In other words the
existing Command Link will still decide based on the .Net
implementation on whether to emit a link with javascript or a regular
command button based on it's own detection of javascript capabilities.

I distinctly remember posting a question about this on a forum they
used to have, however I can no longer find that forum. I also
distinctly remember after checking back for an answer after a week,
posting a not so happy remark about they need to engage the developer
community if they want this to go anywhere. From what I recall none
of the posts were actually answered on that forum, which is probably
why they removed it.

This coupled with the fact that it only shows that it has been
downloaded a total of ~60 times doesn't give me a warm fuzzy feeling.
The application that I'm looking to solve this for is a fortune 50
client. I don't have a whole lot of confidence in this organization
at this point.

I'm willing to write my own over-ride based on the wurfl file (because
it is that good), but I'm not aware of any way to do this...

How has your experience been with it? Have you tested it out
significantly? If all your looking for is detection for your own
custom decision points I highly recommend it. If you find that it
does integrate seamlessly please let me know. I'll be playing with it
again this afternoon to re-familiarize myself with it.

If it does integrate the way I need, I'm sure we can speed up the slow
down you said you noticed.

aaron.aallen

1/30/2007 8:20:00 PM

0

On Jan 30, 3:03 pm, "Aaron" <aaron.aal...@gmail.com> wrote:
> On Jan 30, 2:35 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
>
>
>
> > Aaron, sorry for my impatience, but did you get round to looking up
> > your notes already? I am very curious what is in them....
>
> > On 28 jan, 22:03, "Aaron" <aaron.aal...@gmail.com> wrote:
>
> > > My notes are in the office, so I will look into this on Monday. I'm
> > > already using Wurfl for things like logging and device recognition,
> > > despite the need for the full user agent string it is pretty good.
> > > It's been in production for a few months now and I'm satisfied with
> > > that aspect of it. They release versions every 6 months or so, and
> > > it's easy to drop the new file in.
>
> > > I would be very satisfied if I could have the wurfl level of detection
> > > integrated with the .Net controls. It would be head and shoulders
> > > above what it is now. The .browser files are SOOOO far behind.... I
> > > had to write my own generic blackberry file just to get it recognized
> > > at all...
>
> > > On Jan 28, 1:00 pm, "Peter van Rees" <petervanr...@gmail.com> wrote:
>
> > > > I would be interested in your notes, that might save me a lot of
> > > > trouble. I do hope I can live with your reason to discard the product,
> > > > because I do not think there are too many alternatives.....
>
> > > > the short coming might lie in the fact it uses a huge xml file which I
> > > > think is cached memory? I can really notice the slower response of the
> > > > first page being viewed after restarting the application.
>
> > > > Further more: as far as I can tell wurlf does not work with regular
> > > > expressions in the useragent recognition, so literally every firmware
> > > > version of a phone has to have it's own entry.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -
>
> What I have found are notes to the effect that it doesn't actually
> override the default behavior of .Net controls. In other words the
> existing Command Link will still decide based on the .Net
> implementation on whether to emit a link with javascript or a regular
> command button based on it's own detection of javascript capabilities.
>
> I distinctly remember posting a question about this on a forum they
> used to have, however I can no longer find that forum. I also
> distinctly remember after checking back for an answer after a week,
> posting a not so happy remark about they need to engage the developer
> community if they want this to go anywhere. From what I recall none
> of the posts were actually answered on that forum, which is probably
> why they removed it.
>
> This coupled with the fact that it only shows that it has been
> downloaded a total of ~60 times doesn't give me a warm fuzzy feeling.
> The application that I'm looking to solve this for is a fortune 50
> client. I don't have a whole lot of confidence in this organization
> at this point.
>
> I'm willing to write my own over-ride based on the wurfl file (because
> it is that good), but I'm not aware of any way to do this...
>
> How has your experience been with it? Have you tested it out
> significantly? If all your looking for is detection for your own
> custom decision points I highly recommend it. If you find that it
> does integrate seamlessly please let me know. I'll be playing with it
> again this afternoon to re-familiarize myself with it.
>
> If it does integrate the way I need, I'm sure we can speed up the slow
> down you said you noticed.

I'm reading the source now, it seems it does override the default
capabilities. Maybe I was doing something wrong back when I was
checking it out?

If nothing else this gives me the jump-start I need to writing my
own. I wonder what Microsoft's plan is for this? Have they just
abandoned it? If so are they just abandoning the entire mobile
development framework?