Share via


deviceFilters에 대한 filter 요소(ASP.NET 설정 스키마)

[이 설명서는 미리 보기 전용이며, 이후 릴리스에서 변경될 수 있습니다. 비어 있는 항목은 자리 표시자로 포함됩니다.]

MobileCapabilities 클래스에 필터링 기능을 제공합니다.

<filter name="capability"
        compare="capabilityName"
        argument="argument" />
<filter name="capability"
        type="className"
        method="methodName" />

특성 및 요소

다음 단원에서는 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

특성

특성

설명

argument

선택적 String 특성입니다.

기능을 비교할 대상 인수를 지정합니다. compare 특성을 정의한 경우에는 이 특성이 필요합니다.

compare

선택적 String 특성입니다.

비교 평가기로 평가할 브라우저 기능을 지정합니다. 여기에는 다른 사용자 지정 기능 평가기의 이름 또는 기본 제공 기능을 지정할 수 있습니다. 비교 필터를 지정하는 경우에는 이 특성이 필요합니다.

method

선택적 String 특성입니다.

평가기 대리자를 제공하는 메서드를 지정합니다. 평가기 대리자 필터를 지정하는 경우에 사용됩니다. type 특성을 지정한 경우에는 이 특성이 필요하며, compare 및 argument 특성은 지정할 수 없습니다.

name

필수 String 특성입니다.

필터를 식별하는 고유한 이름을 지정합니다.

NoteNote
구성 파일 또는 구성 파일 계층 구조에서 나중에 정의된 필터와 이전에 정의된 필터의 이름이 같으면 새 필터가 이전 필터를 덮어씁니다.

type

선택적 String 특성입니다.

평가기 대리자를 제공하는 클래스 형식을 지정합니다.

자식 요소

없음

부모 요소

요소

설명

configuration

공용 언어 런타임 및 .NET Framework 응용 프로그램에서 사용하는 모든 구성 파일의 필수 루트 요소입니다.

system.web

구성 파일에 있는 ASP.NET 구성 설정의 루트 요소를 지정합니다. ASP.NET 웹 응용 프로그램을 구성하고 응용 프로그램의 동작 방법을 제어하는 구성 요소를 포함합니다.

deviceFilters

사용자 에이전트나 브라우저를 기준으로 ASP.NET MobileCapabilities 시스템에 있는 장치 또는 장치 클래스를 지정합니다.

설명

장치별 내용을 포함하는 웹 응용 프로그램을 만들 때는 구성 파일의 deviceFilters 섹션에 하나 이상의 필터를 추가해야 합니다. 각 필터는 대상 장치를 찾는 데 사용되는 기준을 지정합니다.

장치 필터 구성은 두 가지 필터 형식, 즉 비교 기반 필터와 평가기 대리자 기반 필터에 사용할 수 있는 평가 메커니즘을 제공합니다. 이 구문은 두 가지 형식의 필터를 모두 지정합니다. 첫 번째 필터는 비교 기반 필터이고 두 번째 필터는 평가기 대리자 기반 필터입니다. 구성 파일에 필터를 만드는 데 대한 자세한 내용은 Device-Specific Rendering을 참조하십시오.

장치 필터는 대/소문자를 구분하므로 "isColor"라는 필터와 "IsColor"라는 필터는 서로 다른 것으로 간주됩니다.

기본 구성

다음의 기본 deviceFilters 요소는 컴퓨터 구성 파일이나 루트 Web.config 파일에 명시적으로 구성되어 있지는 않지만 .NET Framework 버전 2.0의 응용 프로그램에서 반환하는 기본 구성입니다.

<deviceFilters>
    <filter name="isJPhone" compare="Type" argument="J-Phone"/>
    <filter name="isHTML32" compare="PreferredRenderingType" argument="html32"/>
    <filter name="isWML11" compare="PreferredRenderingType" argument="wml11"/>
    <filter name="isCHTML10" compare="PreferredRenderingType" argument="chtml10"/>
    <filter name="isGoAmerica" compare="Browser" argument="Go.Web"/>
    <filter name="isMME" compare="Browser" argument="Microsoft Mobile Explorer"/>
    <filter name="isMyPalm" compare="Browser" argument="MyPalm"/>
    <filter name="isPocketIE" compare="Browser" argument="Pocket IE"/>
    <filter name="isUP3x" compare="Type" argument="Phone.com 3.x Browser"/>
    <filter name="isUP4x" compare="Type" argument="Phone.com 4.x Browser"/>
    <filter name="isEricssonR380" compare="Type" argument="Ericsson R380"/>
    <filter name="isNokia7110" compare="Type" argument="Nokia 7110"/>
    <filter name="prefersGIF" compare="PreferredImageMIME" argument="image/gif"/>
    <filter name="prefersWBMP" compare="PreferredImageMIME" argument="image/vnd.wap.wbmp"/>
    <filter name="supportsColor" compare="IsColor" argument="true"/>
    <filter name="supportsCookies" compare="Cookies" argument="true"/>
    <filter name="supportsJavaScript" compare="Javascript" argument="true"/>
    <filter name="supportsVoiceCalls" compare="CanInitiateVoiceCall" argument="true"/>
</deviceFilters>

예제

다음 예제에서는 비교 필터와 평가기 대리자 필터를 모두 구성합니다. 첫 번째 필터는 비교 기반 필터이고 두 번째 필터는 평가기 대리자 기반 필터입니다.

<deviceFilters>
  <filter name="IsHtml" 
    compare="PreferredRendering" 
    argument="html32" />
  <filter name="IsGPSEnabled" 
    type="Application1.CapabilityEvaluators1,Application1" 
    method="IsGPSEnabled" />
</deviceFilters>

요소 정보

구성 섹션 처리기

System.Web.Mobile.DeviceFiltersSection

구성 멤버

SystemWebSectionGroup.DeviceFilters

DeviceSpecificChoice.Filter

구성 가능한 위치

Machine.config

루트 수준의 Web.config

응용 프로그램 수준의 Web.config

가상 또는 실제 디렉터리 수준의 Web.config

요구 사항

IIS 5.0, IIS 5.1 또는 IIS 6.0

.NET Framework 1.1 또는 2.0

Visual Studio 2003 또는 Visual Studio 2005

참고 항목

작업

How to: Configure Specific Folders Using Location Settings

How to: Lock ASP.NET Configuration Settings

참조

system.web 요소(ASP.NET 설정 스키마)

configuration 요소(일반 설정 스키마)

mobileControls 요소(ASP.NET 설정 스키마)

MobileCapabilities

System.Configuration

System.Web.Configuration

개념

ASP.NET Configuration File Hierarchy

Securing Configuration

Configuration Inheritance

기타 리소스

Using Device Filters

ASP.NET Mobile Web Pages

Creating ASP.NET Mobile Web Applications

일반 구성 설정(ASP.NET)

ASP.NET 구성 설정

Configuring ASP.NET Applications

ASP.NET Configuration Files

ASP.NET Configuration API