수신기 어댑터 <수신기Adapters>

개요

요소는 <listenerAdapters> IIS(인터넷 정보 서비스) 7용 수신기 어댑터에 대한 구성 설정을 지정합니다. 수신기 어댑터는 비 HTTP 프로토콜 수신기 서비스와 WAS(Windows 프로세스 정품 인증 서비스) 간의 통신을 설정하는 구성 요소입니다. 요소에 대한 <listenerAdapters> 변경 내용은 수신기 어댑터가 WAS와 연결되는 경우에만 적용됩니다. 대부분의 경우 이 연결을 사용하려면 서버를 다시 시작해야 합니다.

참고:

  • W3SVC(World Wide Web Publishing Service)에는 IIS 7에 대한 HTTP 관련 기능이 포함되어 있으므로 추가 <listenerAdapters> 특성을 사용하지 않습니다. - WAS가 필요하지 않은 FTP 서비스에는 항목이 <listenerAdapters> 없습니다.

호환성

버전 참고
IIS 10.0 <listenerAdapters> 요소가 IIS 10.0에서 수정되지 않았습니다.
IIS 8.5 <listenerAdapters> 요소가 IIS 8.5에서 수정되지 않았습니다.
IIS 8.0 <listenerAdapters> 요소가 IIS 8.0에서 수정되지 않았습니다.
IIS 7.5 <listenerAdapters> 요소가 IIS 7.5에서 수정되지 않았습니다.
IIS 7.0 요소는 <listenerAdapters> IIS 7.0에서 도입되었습니다.
IIS 6.0 해당 없음

설치 프로그램

요소는 <listenerAdapters> IIS 7의 기본 설치에 포함됩니다.

방법

IIS 7용 수신기 어댑터를 추가하기 위한 사용자 인터페이스가 없습니다. 프로그래밍 방식으로 수신기 어댑터를 추가하는 방법의 예는 이 문서의 코드 샘플 섹션을 참조하세요.

구성

특성

없음

자식 요소

요소 Description
add 선택적 요소입니다.

수신기 어댑터에 대한 구성을 지정합니다.

구성 샘플

다음 구성 샘플에서는 Gopher 프로토콜 공급자에 대한 수신기 어댑터를 추가하고 DLL의 이름과 해당 초기화 함수를 모두 지정합니다.

<system.applicationHost>
   <listenerAdapters>
      <add name="gopher"
         protocolManagerDll="%SystemRoot%\system32\inetsrv\gophersvc.dll"
         protocolManagerDllInitFunction="GopherInit" />
   </listenerAdapters>
</system.applicationHost>

샘플 코드

다음 코드 샘플은 Gopher 프로토콜 공급자에 대한 수신기 어댑터를 추가하고 DLL의 이름과 해당 초기화 함수를 모두 지정합니다.

AppCmd.exe

appcmd.exe set config -section:system.applicationHost/listenerAdapters /+"[name='gopher',protocolManagerDll='%SystemRoot%\system32\inetsrv\gophersvc.dll',protocolManagerDllInitFunction='GopherInit']" /commit:apphost

참고

AppCmd.exe 사용하여 이러한 설정을 구성할 때 커밋 매개 변수 apphost 를 로 설정해야 합니다. 그러면 구성 설정이 ApplicationHost.config 파일의 적절한 위치 섹션에 커밋됩니다.

C#

using System;
using System.Text;
using Microsoft.Web.Administration;

internal static class Sample
{
   private static void Main()
   {
      using (ServerManager serverManager = new ServerManager())
      {
         Configuration config = serverManager.GetApplicationHostConfiguration();
         ConfigurationSection listenerAdaptersSection = config.GetSection("system.applicationHost/listenerAdapters");
         ConfigurationElementCollection listenerAdaptersCollection = listenerAdaptersSection.GetCollection();

         ConfigurationElement addElement = listenerAdaptersCollection.CreateElement("add");
         addElement["name"] = @"gopher";
         addElement["protocolManagerDll"] = @"%SystemRoot%\system32\inetsrv\gophersvc.dll";
         addElement["protocolManagerDllInitFunction"] = @"GopherInit";
         listenerAdaptersCollection.Add(addElement);

         serverManager.CommitChanges();
      }
   }
}

VB.NET

Imports System
Imports System.Text
Imports Microsoft.Web.Administration

Module Sample

   Sub Main()
      Dim serverManager As ServerManager = New ServerManager
      Dim config As Configuration = serverManager.GetApplicationHostConfiguration
      Dim listenerAdaptersSection As ConfigurationSection = config.GetSection("system.applicationHost/listenerAdapters")
      Dim listenerAdaptersCollection As ConfigurationElementCollection = listenerAdaptersSection.GetCollection

      Dim addElement As ConfigurationElement = listenerAdaptersCollection.CreateElement("add")
      addElement("name") = "gopher"
      addElement("protocolManagerDll") = "%SystemRoot%\system32\inetsrv\gophersvc.dll"
      addElement("protocolManagerDllInitFunction") = "GopherInit"
      listenerAdaptersCollection.Add(addElement)

      serverManager.CommitChanges()
   End Sub

End Module

JavaScript

var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
var listenerAdaptersSection = adminManager.GetAdminSection("system.applicationHost/listenerAdapters", "MACHINE/WEBROOT/APPHOST");
var listenerAdaptersCollection = listenerAdaptersSection.Collection;

var addElement = listenerAdaptersCollection.CreateNewElement("add");
addElement.Properties.Item("name").Value = "gopher";
addElement.Properties.Item("protocolManagerDll").Value = "%SystemRoot%\\system32\\inetsrv\\gophersvc.dll";
addElement.Properties.Item("protocolManagerDllInitFunction").Value = "GopherInit";
listenerAdaptersCollection.AddElement(addElement);

adminManager.CommitChanges();

VBScript

Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"
Set listenerAdaptersSection = adminManager.GetAdminSection("system.applicationHost/listenerAdapters", "MACHINE/WEBROOT/APPHOST")
Set listenerAdaptersCollection = listenerAdaptersSection.Collection

Set addElement = listenerAdaptersCollection.CreateNewElement("add")
addElement.Properties.Item("name").Value = "gopher"
addElement.Properties.Item("protocolManagerDll").Value = "%SystemRoot%\system32\inetsrv\gophersvc.dll"
addElement.Properties.Item("protocolManagerDllInitFunction").Value = "GopherInit"
listenerAdaptersCollection.AddElement(addElement)

adminManager.CommitChanges()