Editing ASP.NET Remote Configuration Files
The ASP.NET configuration API allows you to edit configuration files on a remote server. In particular, you can modify a configuration file in any Microsoft Internet Information Services (IIS) application, or its child directories, on a remote server. You can also modify the configuration of the remote server.
When you remotely configure ASP.NET applications, you should consider the following:
The environmental constraints in which remote configuration can be performed. In particular, the .NET Framework build versions on the client and target computers, the configuration files that can be edited, the ASP.NET enabling within IIS, the access rights required, and so on.
The ASP.NET IIS Registration Tool (Aspnet_regiis.exe) to enable or disable remote configuration on the target computer.
The configuration API needed to open and update configuration files.
Security implications and guidelines.
For an example of remote configuration, see How to: Access and Modify ASP.NET Configuration Files Remotely
To allow a client computer to access the server configuration files, a remote configuration component must be installed on the server. This allows remote calls into the .NET Framework configuration API stored on the server.
The following code is the command to enable this component.
The remote configuration component runs in the user context of the caller, and requires that the caller be an administrator on the computer. If this is not the case, the system issues an access denied error.
The remote configuration component is registered to use DCOM encryption (packet privacy) by default. This is particularly important to protect the exchange of configuration information over the wire.
If a firewall is installed on the remote server, you must enable the execution of the Dllhost.exe program and open the port 135. You do this by adding Dllhost.exe to the firewall exception list, associating it with the network settings, and defining the related port.
You enable the remote configuration component using the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) with the /config+ option.
You disable the component by running the tool with the /config- option.
The component is installed by default with ASP.NET.