Modify a Reporting Services Configuration File (RSreportserver.config)Modify a Reporting Services Configuration File (RSreportserver.config)

Reporting ServicesReporting Services 會將應用程式設定儲存在組態檔集合中。stores application settings in a set of configuration files. 安裝程式會針對您所安裝的每個報表伺服器執行個體建立組態檔。Setup creates the configuration files for each report server instance you install. 在每個檔案內部,其值是在安裝期間設定,或當您使用工具和應用程式來設定作業的伺服器時設定。Within each file, values are either set during installation or when you use tools and applications to configure a server for operation. 在某些情況下,您必須直接修改檔案,以便加入或修改進階設定。In some cases, you must modify a file directly to add or configure advanced settings. 組態設定會指定為 XML 元素或屬性。Configuration settings are specified as either XML elements or attributes. 如果您了解 XML 和組態檔,就可以使用文字或程式碼編輯器來修改可由使用者定義的設定。If you understand XML and configuration files, you can use a text or code editor to modify user-definable settings.

某些組態設定只能透過某個工具進行設定。Some configuration settings can be set only through a tool. 您必須透過 Reporting Services 組態工具、安裝程式或 rsconfig 命令列公用程式來修改包含加密值的設定。Settings that contain encrypted values must be modified through the Reporting Services Configuration tool, the Setup program, or the rsconfig command line utility. 您必須是本機管理員群組的成員才能執行這些工具。You must be a member of the local Administrators group to run these tools.'

重要

修改組態檔時,請特別小心。Use caution when modifying configuration files. 如果您修改保留給內部使用的設定,可能會停用安裝程序。If you modify a setting that is reserved for internal use, you may disable your installation. 除非您嘗試解決特定問題,否則一般而言不建議您修改組態設定。Generally, modifying configuration settings is not recommended unless you are trying to solve a specific problem. 如需有關哪些設定可安全變更的詳細資訊,請參閱< RSReportServer Configuration File >或< RSReportDesigner Configuration File>。For more information about which settings are safe to change, see RSReportServer Configuration File or RSReportDesigner Configuration File. 如需組態檔的詳細資訊,請參閱 MicrosoftMicrosoft.NET Framework.NET Framework 產品文件。For more information about configuration files, see the MicrosoftMicrosoft.NET Framework.NET Framework product documentation.

本主題內容:In this topic:

讀取和使用組態值Reading and Using Configuration Values

當服務啟動時,以及每次系統儲存組態檔時,報表伺服器都會讀取組態檔。A report server reads the configuration files when the service starts and whenever the configuration file is saved. 目前的應用程式網域過期之後,全新和修訂的值才會在新的應用程式網域中生效。New and revised values take effect in a new application domain after the current application domain expires. 系統會盡可能讓仍然在目前應用程式網域中處理的要求完成。Whenever possible, requests that are still processing in the current application domain are allowed to complete. 不過,少數設定需要進行立即應用程式網域回收作業。However, a few settings require an immediate application domain recycle operation. 在這種情況下,所有處理中的要求都會在新的應用程式網域中重新啟動。In this case, all requests that are in process are restarted in a new application domain.

如果報表伺服器偵測到無效的值,報表伺服器就會在 Windows 應用程式記錄中記錄錯誤,而且無法啟動或使用預設值 (視錯誤情況而定):If the report server detects an invalid value, the report server logs an error to the Windows application log and either fails to start or uses a default value, depending on the error:

  • 如果錯誤是不正確的 XML,則報表伺服器將不會啟動。If the error is malformed XML, the report server will not start. 如果您造成錯誤時,報表伺服器正在執行,報表伺服器就會忽略無效的組態檔,直到報表伺服器重新啟動或應用程式網域回收為止。If the report server is running when you introduce the error, the report server ignores the invalid configuration file until the report server restarts or the application domain is recycled. 偵測到錯誤之後,報表伺服器將不會再啟動。Once the error is detected, the report server will no longer start.

  • 如果錯誤是無效的組態值,伺服器將使用內部預設值並在追蹤記錄檔中記錄錯誤。If the error is an invalid configuration value, the server will use internal default values and log an error to the trace log files. 在內部預設值無法使用的少數情況下,如果無效的組態設定對於伺服器作業很重要,伺服器將傳回 rsServerConfigurationError 錯誤。In the few cases where internal default values are not available, the server will return the rsServerConfigurationError error if the invalid configuration setting is critical to server operations. 有關遺漏或無效重要設定的錯誤會以 HTML 錯誤頁面傳回用戶端應用程式並記錄在事件記錄中。Errors about missing or invalid critical settings are returned to the client application in an HTML error page and logged to the event log.

所有組態檔變更 (包括成功變更) 都會記錄在報表伺服器追蹤記錄檔中。All configuration file changes, including successful changes, are recorded in the report server trace log file. 只有錯誤會記錄在應用程式事件記錄中。Only errors are logged to the application event log.

關於預設值About Default Values

大部分組態設定都具有報表伺服器內部指定的預設值。Most configuration settings have default values that are specified internally in the report server. 如果使用者定義的值無效或未指定,報表伺服器就會使用這些值。The report server will use these values if a user-defined value is invalid or not specified. 如果由於組態設定無效而必須使用預設值,系統就會在追蹤記錄檔中寫入錯誤。If a default value must be used due to an invalid configuration setting, an error is written to the trace log file.

刪除組態設定Deleting Configuration Settings

如果是有預設值的組態設定,從組態檔中移除此設定不會有任何作用。For configuration settings that have default values, removing the setting from the configuration file has no effect. 大部分組態設定實際上都會在內部定義及設定。Most configuration settings are actually defined and configured internally. 如果您刪除組態檔中的項目,內部複本仍然可以使用,而且會使用為它定義的預設值。If you delete an item from the configuration file, the internal copy is still available and uses the default value that is defined for it.

編輯 Reporting Services 組態檔To Edit a Reporting Services Configuration File

  1. 尋找您想要編輯的組態檔:Find the configuration file you want to edit:

    • RSReportServer.config 位於下列資料夾:RSReportServer.config is located in the following folder:

      C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer  
      
    • RSReportServerServices.exe.config 位於下列資料夾:RSReportServerServices.exe.config is located in the following folder:

      C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin  
      
    • RSReportDesigner.config 位於下列資料夾:RSReportDesigner.config is located in the following folder:

      C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies  
      
  2. 儲存檔案的副本,以防您需要回復變更。Save a copy of the file in case you need to roll back your changes.

  3. 在 [記事本] 或程式碼編輯器中開啟原始檔。Open the original file in Notepad or a code editor. 請勿使用 Textpad,因為它會在儲存檔案之前設定檔案長度,進而導致系統在追蹤記錄檔中寫入無效字元錯誤。Do not use Textpad; it sets the file length before the file is saved, causing an invalid character error to be written to the trace log file.

  4. 輸入您想要加入或使用的元素或值。Type the element or value that you want to add or use. 元素會區分大小寫。Elements are case-sensitive. 如果您要加入元素,請務必使用正確的大小寫字母。If you are adding an element, be sure to use the correct upper and lower case letters. 如果您要自訂轉譯延伸模組、驗證延伸模組或資料處理延伸模組,請使用編輯組態檔的特定指示。Specific instructions for editing configuration files are available if you are customizing rendering extension, authentication extensions, or data processing extensions:

  5. 儲存檔案。Save the file.

  6. 檢查追蹤記錄檔,以便確認錯誤並未發生。Check the trace log files to verify that errors did not occur. 如果您看見錯誤狀況,表示某項設定或其值的指定內容不正確。If you see error conditions, a setting or its value is specified incorrectly. 請檢閱< RSReportServer Configuration File >,以便取得導致錯誤發生之任何設定的有效值。Review the RSReportServer Configuration File for valid values for any setting that is causing an error. 如需如何檢視追蹤記錄的詳細資訊,請參閱報表伺服器服務追蹤記錄For more information about how to view the trace log, see Report Server Service Trace Log.

另請參閱See Also

RSReportServer 組態檔 RSReportServer Configuration File
ReportingServicesService 設定檔 ReportingServicesService Configuration File
RSReportDesigner 組態檔 RSReportDesigner Configuration File
部署資料處理延伸模組 Deploying a Data Processing Extension
部署傳遞延伸模組 Deploying a Delivery Extension
部署轉譯延伸模組 Deploying a Rendering Extension
如何:部署自訂報表項目 How to: Deploy a Custom Report Item
Reporting Services 設定檔Reporting Services Configuration Files