Click here to Skip to main content
15,880,651 members
Articles / Web Development / ASP.NET

WURFL ASP.NET Implementations

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
15 Jan 2009CPOL5 min read 80.9K   797   23  
A comparison of three WURFL ASP.NET Implementations
<?xml version="1.0"?>
<configuration>
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
<!-- Marge Config-->
    <section name="Wurfl.Caps" type="Marg.Wurfl.WurflSectionHandler, Marg.Wurfl"/>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<!-- /Marge Config-->
<!-- RedCircle Config-->
    <sectionGroup name="redcircle.framework">
      <section name="wurfl" type="RedCircle.Framework.Wap.Wurfl.Configuration.WurflSection, RedCircle.Framework.Wap.Wurfl" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
    </sectionGroup>
<!-- /RedCircle Config-->
  </configSections>
<!-- Marge Config-->
  <Wurfl.Caps manifest="WURFL_Data\wurfl_manifest.xml" wurflUrl=""/>
  <log4net debug="true">
    <root>
      <level value="DEBUG"/>
      <appender-ref ref="RollingLogFileAppender"/>
    </root>
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="c:\tmp\WurflSamples.txt"/>
      <appendToFile value="true"/>
      <maxSizeRollBackups value="10"/>
      <maximumFileSize value="1000000"/>
      <rollingStyle value="Size"/>
      <staticLogFileName value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <header value="[Start]======================================================================&#xA;"/>
        <footer value="[End]========================================================================&#xA;"/>
        <conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
      </layout>
    </appender>
  </log4net>
<!-- /Marge Config-->
<!-- RedCircle Config-->
  <redcircle.framework>
    <wurfl wurflFilePath="~/WURFL_Data/wurfl.xml">
      <capabilitiesWhiteList>
        <add capabilityName="mobile_browser"/>
        <add capabilityName="xhtml_support_level"/>
        <add capabilityName="xhtml_honors_bgcolor"/>
        <add capabilityName="xhtml_supports_forms_in_table"/>
        <add capabilityName="xhtml_support_wml2_namespace"/>
        <add capabilityName="xhtml_autoexpand_select"/>
        <add capabilityName="xhtml_select_as_dropdown"/>
        <add capabilityName="xhtml_select_as_radiobutton"/>
        <add capabilityName="xhtml_select_as_popup"/>
        <add capabilityName="xhtml_display_accesskey"/>
        <add capabilityName="xhtml_supports_invisible_text"/>
        <add capabilityName="xhtml_supports_inline_input"/>
        <add capabilityName="xhtml_supports_monospace_font"/>
        <add capabilityName="xhtml_supports_table_for_layout"/>
        <add capabilityName="xhtml_supports_css_cell_table_coloring"/>
        <add capabilityName="xhtml_format_as_css_property"/>
        <add capabilityName="xhtml_format_as_attribute"/>
        <add capabilityName="xhtml_nowrap_mode"/>
        <add capabilityName="xhtml_marquee_as_css_property"/>
        <add capabilityName="xhtml_readable_background_color1"/>
        <add capabilityName="xhtml_readable_background_color2"/>
        <add capabilityName="xhtml_allows_disabled_form_elements"/>
        <add capabilityName="xhtml_document_title_support"/>
        <add capabilityName="xhtml_preferred_charset"/>
        <add capabilityName="opwv_xhtml_extensions_support"/>
        <add capabilityName="xhtml_make_phone_call_string"/>
        <add capabilityName="xhtmlmp_preferred_mime_type"/>
        <add capabilityName="xhtml_table_support"/>
        <add capabilityName="xhtml_supports_file_upload"/>
        <add capabilityName="xhtml_send_sms_string"/>
        <add capabilityName="xhtml_send_mms_string"/>
        <add capabilityName="xhtml_file_upload"/>
        <add capabilityName="xhtml_support_iframe"/>
        <add capabilityName="cookie_support"/>
        <add capabilityName="accept_third_party_cookie"/>
        <add capabilityName="css_supports_width_as_percentage"/>
        <add capabilityName="ajax_support_javascript"/>
        <add capabilityName="ajax_support_getelementbyid"/>
        <add capabilityName="ajax_xhr_type"/>
        <add capabilityName="ajax_support_inner_html"/>
        <add capabilityName="ajax_manipulate_dom"/>
        <add capabilityName="ajax_manipulate_css"/>
        <add capabilityName="ajax_support_events"/>
        <add capabilityName="ajax_support_event_listener"/>
        <add capabilityName="resolution_width"/>
        <add capabilityName="resolution_height"/>
        <add capabilityName="columns"/>
        <add capabilityName="rows"/>
        <add capabilityName="max_image_width"/>
        <add capabilityName="max_image_height"/>
      </capabilitiesWhiteList>
      <wurflPatches>
        <!-- Add new wurfl patches. Note that the attribute 
                     enabled is optional and its default value is true -->
        <!--<add name="desktop_web_browsers_patch" filePath="~/desktop_web_browsers.xml" enabled="false"/>-->
      </wurflPatches>
    </wurfl>
  </redcircle.framework>
<!-- /RedCircle Config-->

  <appSettings/>
	<connectionStrings/>
  
	<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
		</compilation>
    
<!-- Marge Config-->
    <browserCaps>
      <file src="WURFL_Data\browserCaps.config"/>
    </browserCaps>
<!-- /Marge Config-->

		<authentication mode="Forms" />
		<pages>
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</controls>
		</pages>
		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
		</httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
  
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
		</compilers>
	</system.codedom>

  <system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</handlers>
	</system.webServer>
  
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
  
</configuration>

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)


Written By
Software Developer Encore Software
Australia Australia
Contractor in Desktop and Web applications.
Gold Coast, Queensland.

Comments and Discussions