Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can extend the HttpBrowserCapabilities by adding/extending the browserCaps configuration section in your machine.config/web.config file. For example, to detect the OS version more accurately, add something like this to your config file:</p> <pre><code>&lt;system.web&gt; &lt;browserCaps&gt; &lt;use var="HTTP_USER_AGENT" /&gt; &lt;filter&gt; &lt;case match="Windows NT 6.1"&gt; platform=Windows7 &lt;/case&gt; &lt;/filter&gt; &lt;/browserCaps&gt; &lt;/system.web&gt; </code></pre> <p>If you access the web site with Mozilla running on windows 7 (UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1") you'll see that Request.Browser.Platform will display "Windows7". See here for more information: <a href="http://msdn.microsoft.com/en-us/library/sk9az15a%28v=vs.71%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/sk9az15a%28v=vs.71%29.aspx</a></p> <p>Add a regex in the browserCaps section to match the WOW64 string in order to detect whether the client platform is 64 bit (I'm not sure what the WOW64-equivalent is for non-Windows platforms running on 64 bit).</p> <p>...Of course, by using a regex in the element you're doing nothing else than actually parsing the UserAgent string yourself. However you can easily find predefined browseCaps on the web (e.g. <a href="http://owenbrady.net/browsercaps/CodeProject.xml" rel="nofollow">http://owenbrady.net/browsercaps/CodeProject.xml</a>).</p> <p>Keep in mind that even though this capability is quite powerful, it still is not 100% accurate. For example, both Windows 7 and Windows Server 2008 R2 will return Windows NT 6.1 as the platform.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload