Opening a Configuration File on a Remote Server

You can use the WebConfigurationManager class to open Machine.config or Web.config files located on remote web servers. However, before you can do this, you must perform one configuration step. You must enable the remote server to accept remote configuration connections by executing the following command from a command prompt:

aspnet_regiis -config+

To disable remove configuration connections, execute the following command:

aspnet_regiis -config-

The aspnet_regiis tool is located in the following path:

\WINDOWS\Microsoft.NET\Framework\[version]\aspnet_regiis.exe

Note

If you open the SDK Command Prompt or the Visual Studio Command Prompt, you don’t need to navigate to the Microsoft.NET folder ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.