Web 配置参考 (Master Data Services)Web Configuration Reference (Master Data Services)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - 仅限 Windows 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Windows only 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance

Master Data ServicesMaster Data Services 使用 Web.config 文件来包含使 Internet Information Services (IIS) 能够承载 主数据管理器Master Data Manager Web 应用程序和 Web 服务的配置设置。uses a Web.config file to contain the configuration settings that enable Internet Information Services (IIS) to host the 主数据管理器Master Data Manager Web application and the Web service. 此 Web.config 文件位于 Master Data ServicesMaster Data Services 安装路径的 WebApplication 文件夹。This Web.config file is located in the WebApplication folder of the Master Data ServicesMaster Data Services installation path. 有关路径和权限的详细信息,请参阅文件夹和文件权限 (Master Data Services)For more information about the path and permissions, see Folder and File Permissions (Master Data Services).

Web.Config 元素Web.Config Elements

Web.config 文件 Master Data ServicesMaster Data Services <masterDataServices> 除了包含标准 IIS、.NET Framework、ASP.NET 和 WINDOWS COMMUNICATION FOUNDATION (WCF) 配置元素外,还包含一个自定义元素。The Web.config file contains a custom Master Data ServicesMaster Data Services element, <masterDataServices>, in addition to standard IIS, .NET Framework, ASP.NET, and Windows Communication Foundation (WCF) configuration elements. 下表描述了 Web.config 文件中包括的元素。The following table describes the elements included in the Web.config file.

配置元素Configuration Element 描述Description
masterDataServicesmasterDataServices 自定义元素。Custom element. Master Data ServicesMaster Data Services Web 服务连接到 Master Data ServicesMaster Data Services 数据库。Connects the Master Data ServicesMaster Data Services Web service to a Master Data ServicesMaster Data Services database.
connectionStringsconnectionStrings ASP.NET 元素。ASP.NET element. 有关详细信息,请参阅 MSDN Library 中的 connectionStrings 元素(ASP.NET 设置架构)For more information, see connectionStrings Element (ASP.NET Settings Schema) in the MSDN Library.
system.websystem.web ASP.NET 元素。ASP.NET element. 有关详细信息,请参阅 MSDN Library 中的 system.web 元素(ASP.NET 设置架构)For more information, see system.web Element (ASP.NET Settings Schema) in the MSDN Library.
阶段startup .NET Framework 元素。.NET Framework element. 有关详细信息,请参阅 MSDN Library 中的 <startup> 元素For more information, see <startup> Element in the MSDN Library.
运行时runtime .NET Framework 元素。.NET Framework element. 有关详细信息,请参阅 MSDN Library 中的 <runtime> 元素For more information, see <runtime> Element in the MSDN Library.
system.codedomsystem.codedom .NET Framework 元素。.NET Framework element. 有关详细信息,请参阅 MSDN Library 中的 <system.codedom> 元素For more information, see <system.codedom> Element in the MSDN Library.
system.web. extensionssystem.web.extensions ASP.NET 元素。ASP.NET element. 有关详细信息,请参阅 MSDN Library 中的 system.web.extensions 元素(ASP.NET 设置架构)For more information, see system.web.extensions Element (ASP.NET Settings Schema) in the MSDN Library.
system.webServersystem.webServer 包含 IIS 元素的节组。Section group that contains IIS elements. 有关详细信息,请参阅 MSDN Library 中的 system.webServer 节组 [IIS 7 设置架构]For more information, see system.webServer Section Group [IIS 7 Settings Schema] in the MSDN Library.
system.serviceModelsystem.serviceModel WCF 元素。WCF element. 有关详细信息,请参阅 <system.serviceModel> MSDN 库中的。For more information, see <system.serviceModel> in the MSDN Library.
system.diagnosticssystem.diagnostics .NET Framework 元素。.NET Framework element. 有关详细信息,请参阅 MSDN Library 中的 <system.diagnostics> 元素For more information, see <system.diagnostics> Element in the MSDN Library.
appSettingsappSettings ASP.NET 元素。ASP.NET element. 有关详细信息,请参阅 MSDN Library 中的 appSettings 元素(常规设置架构)For more information, see appSettings Element (General Settings Schema) in the MSDN Library.

masterDataServices 元素masterDataServices Element

<masterDataServices> 元素是一个自定义元素,用于将 Master Data ServicesMaster Data Services Web 服务连接到 Master Data ServicesMaster Data Services 数据库。The <masterDataServices> element is a custom element that is used to connect a Master Data ServicesMaster Data Services Web service to a Master Data ServicesMaster Data Services database.

语法Syntax

<masterDataServices>  
   <instance virtualPath="path" siteName="name" connectionName="name" serviceName="name" />  
</masterDataServices>  

元素和属性Elements and Attributes

Item 描述Description
实例instance 子元素。Child element. 包含指定 Web 服务和数据库连接字符串信息的属性。Contains attributes that specify information for the Web service and database connection string.
virtualPathvirtualPath 属性。Attribute. 指定 主数据管理器Master Data Manager Web 应用程序和服务的虚拟路径。Specifies the virtual path of the 主数据管理器Master Data Manager Web application and service. 这对应于 <application> <site> IIS ApplicationHost.config 文件中元素下的元素的 path 属性。This corresponds to the path attribute of the <application> element under the <site> element in the IIS ApplicationHost.config file.
siteName 属性。Attribute. 指定承载 主数据管理器Master Data Manager Web 应用程序和服务的站点的名称。Specifies the name of the site that hosts the 主数据管理器Master Data Manager Web application and service. 这对应于 <site> <sites> IIS ApplicationHost.config 文件中下元素的 name 属性。This corresponds to the name attribute of the <site> element under <sites> in the IIS ApplicationHost.config file.
connectionNameconnectionName 属性。Attribute. 指定要使用的连接的名称。Specifies the name of the connection to use. 这与 <add> <connectionStrings> Web.config 中元素下的元素的 name 属性相对应。This corresponds to the name attribute of the <add> element under the <connectionStrings> element in Web.config.
serviceNameserviceName 属性。Attribute. 指定 Web 服务的名称。Specifies the name of the Web service. 这与 <service> <services> Web.config 中元素下的元素的 name 属性相对应。This corresponds to the name attribute of the <service> element under the <services> element in Web.config.

示例Example

下面的示例演示了 Contoso 站点上一个名为 MDS1 的服务和使用由 MDSDB 指定的连接字符串的 /MDS 路径。The following example demonstrates a service named MDS1 on the Contoso site and /MDS path using a connection string specified by MDSDB.

<masterDataServices>  
   <instance virtualPath="/MDS" siteName="Contoso" connectionName="MDSDB" serviceName="MDS1" />  
</masterDataServices>