Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

Browser Detection using ASP.NET

, 6 May 2009
Using and updating your machine.config file to better detect browser type in ASP.NET
using System;
using NUnit.Framework;


namespace Ocean.Nunit.HttpCapabilities.CodeProject
{
	/// <summary>
	/// Summary description for CapabiltiesMobile_Nokia.
	/// </summary>
	[TestFixture]
	public class CapabiltiesMobile_Nokia
	{
		Ocean.Web.HttpCapabilities.Result R;
		Ocean.Web.HttpCapabilities.Settings Mobile;
		public CapabiltiesMobile_Nokia()
		{
			Mobile = new Ocean.Web.HttpCapabilities.Settings(Ocean.Web.HttpCapabilities.EmbededFile.CodeProject);
		}

		
		[Test]
		public void Test_Nokia3100()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3100/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("04.01",R.Version, "Browser Version Compare");
			Assert.AreEqual("04",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".01",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3100",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3100/1.0 (05.02) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("05.02",R.Version, "Browser Version Compare");
			Assert.AreEqual("05",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".02",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3100",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		
		[Test]
		public void Test_Nokia3200()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3200/1.0 () Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3200",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
						
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3200/1.0 (4.16) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.16",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".16",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3200",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		
		[Test]
		public void Test_Nokia3300()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3300/1.0 (4.62) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.62",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".62",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3300",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		
		[Test]
		public void Test_Nokia3510i()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3510i/1.0 (03.54) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("03.54",R.Version, "Browser Version Compare");
			Assert.AreEqual("03",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".54",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3510i",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3510i/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("04.01",R.Version, "Browser Version Compare");
			Assert.AreEqual("04",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".01",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3510i",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
						
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3510i/1.0 (04.44) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1a (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("04.44",R.Version, "Browser Version Compare");
			Assert.AreEqual("04",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".44",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3510i",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia3595()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3595/1.0 (8.12) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("8.12",R.Version, "Browser Version Compare");
			Assert.AreEqual("8",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".12",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3595",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
						
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3595/1.0 (8.12) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.9");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("8.12",R.Version, "Browser Version Compare");
			Assert.AreEqual("8",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".12",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3595",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}

		[Test]
		public void Test_Nokia3610()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3610/1.0 (05.26)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("05.26",R.Version, "Browser Version Compare");
			Assert.AreEqual("05",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".26",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3610",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
	
		[Test]
		public void Test_Nokia3650()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3650",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
									
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("3650",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		
		[Test]
		public void Test_Nokia5140()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia5140/2.0 (3.10) Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("5140",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual("3.10",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".10",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6010()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6010/1.0 (8.18) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("8.18",R.Version, "Browser Version Compare");
			Assert.AreEqual("8",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".18",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6010",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		
		[Test]
		public void Test_Nokia6100()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6100/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("04.01",R.Version, "Browser Version Compare");
			Assert.AreEqual("04",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".01",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6100",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6100/1.0 (05.16) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("05.16",R.Version, "Browser Version Compare");
			Assert.AreEqual("05",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".16",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6100",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6310i()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6310i/1.0 (4.80) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.80",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".80",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6310i",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6510()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6510/1.0 (04.12) UP.Link/5.1.2.5");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("04.12",R.Version, "Browser Version Compare");
			Assert.AreEqual("04",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".12",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6510",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6600()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6600/1.0 (3.42.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.42.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".42",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6600/1.0 (3.49.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.49.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".49",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.09.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".09",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.09.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".09",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6600/1.0 (5.08.0) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("5.08.0",R.Version, "Browser Version Compare");
			Assert.AreEqual("5",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".08",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 6600;422) Opera 6.10  [it]");
			Assert.AreEqual("Opera",R.Browser, "Browser Name Compare");
			Assert.AreEqual("6.10",R.Version, "Browser Version Compare");
			Assert.AreEqual("6",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".10",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6620()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6620/2.0 (3.48.2) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.48.2",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".48",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6620",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
						
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6620/2.0 (4.22.1) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.22.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".22",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6620",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6620/2.0 (4.22.1) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.22.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".22",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6620",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6630()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6630/1.0 (1.50.1) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("1.50.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("1",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".50",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6630",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6630/1.0 (3.48.2) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.48.2",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".48",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6630",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6630/4.06.0 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6630",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6682()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6682/1.0 (2.30.1) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("2.30.1",R.Version, "Browser Version Compare");
			Assert.AreEqual("2",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".30",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6682",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia6800()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia6800/2.0 (4.17) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.9");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.17",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".17",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("6800",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7210()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7210/1.0 (3.09) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/4.2.1.2");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.09",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".09",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7210",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7210/1.0 (3.09) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.4");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.09",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".09",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7210",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7210/1.0 (4.24) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.24",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".24",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7210",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
			
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7210/1.0 (4.74) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.74",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".74",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7210",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7110()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Nokia7110/1.0 (03.01; r3g.de))");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("03.01",R.Version, "Browser Version Compare");
			Assert.AreEqual("03",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".01",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7110",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7250()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7250/1.0 (3.14) Profile/MIDP-1.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.14",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".14",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7250",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7250I()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7250I/1.0 (3.22) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.22",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".22",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7250I",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7250I/1.0 (3.22) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.7 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("3.22",R.Version, "Browser Version Compare");
			Assert.AreEqual("3",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".22",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7250I",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7250I/1.0 (4.63) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.63",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".63",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7250I",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7600()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7600/2.0 (03.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("03.01",R.Version, "Browser Version Compare");
			Assert.AreEqual("03",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".01",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7600",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia7610()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7610/2.0 (4.0421.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.0421.0",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".0421",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7610",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7610/2.0 (4.0421.4ch) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("4.0421.4",R.Version, "Browser Version Compare");
			Assert.AreEqual("4",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".0421",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7610",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 7610;451) Opera 6.20  [it]");
			Assert.AreEqual("Opera",R.Browser, "Browser Name Compare");
			Assert.AreEqual("6.20",R.Version, "Browser Version Compare");
			Assert.AreEqual("6",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".20",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//Mozilla/4.0 (X11; Series60/2.1 Nokia7610/3.0415.0 Profile/MIDP-2.0 Configuration/CLDC-1.0)
		}
		[Test]
		public void Test_Nokia7650()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/1.1 (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");		
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.2a");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.5a (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");			
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.5c (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");			
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.3");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("7650",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");

			//Mozilla/4.0 (compatible; MSIE 6.0; Nokia7650) ReqwirelessWeb/2.0.0.0
		}
		[Test]
		public void Test_Nokia8310()
		{
			//-------------------------------------------------------------------
			//
			//-------------------------------------------------------------------
			R = Mobile.Process("Nokia8310/1.0 (05.06) (Google WAP Proxy/1.0)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("05.06",R.Version, "Browser Version Compare");
			Assert.AreEqual("05",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".06",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("8310",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
		[Test]
		public void Test_Nokia9500()
		{
			//-------------------------------------------------------------------
			//This one is not very well setup in the config yet so only the basic
			//information flows in
			//-------------------------------------------------------------------
			R = Mobile.Process("Mozilla/4.0 (compatible; MSIE 5.0; Series80/2.0 Nokia9500/4.34.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)");
			Assert.AreEqual("Nokia",R.Browser, "Browser Name Compare");
			Assert.AreEqual("0.0",R.Version, "Browser Version Compare");
			Assert.AreEqual("0",R["majorversion"], "Browser Major Version Compare");
			Assert.AreEqual(".0",R["minorVersion"], "Browser minor Version Compare");
			Assert.AreEqual("Nokia",R.MobileDeviceManufacturer, "MobileDeviceManufacturer Compare");
			Assert.AreEqual("9500",R["mobileDeviceModel"], "mobileDeviceModel Compare");
			Assert.AreEqual(true,R.isMobileDevice, "isMobileDevice Compare");
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Chris Maunder
Founder CodeProject
Canada Canada
Chris is the Co-founder, Administrator, Architect, Chief Editor and Shameless Hack who wrote and runs The Code Project. He's been programming since 1988 while pretending to be, in various guises, an astrophysicist, mathematician, physicist, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a web developer. He is a Microsoft Visual C++ MVP both globally and for Canada locally.
 
His programming experience includes C/C++, C#, SQL, MFC, ASP, ASP.NET, and far, far too much FORTRAN. He has worked on PocketPCs, AIX mainframes, Sun workstations, and a CRAY YMP C90 behemoth but finds notebooks take up less desk space.
 
He dodges, he weaves, and he never gets enough sleep. He is kind to small animals.
 
Chris was born and bred in Australia but splits his time between Toronto and Melbourne, depending on the weather. For relaxation he is into road cycling, snowboarding, rock climbing, and storm chasing.
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 6 May 2009
Article Copyright 2004 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid