I am developing a website (in VS2010, C#, .NET 4.0) to change web.config values on remote servers. (The application will used for testing other web applications and their configurations.)
I am using impersonation to gain access with the domain admin credentials.
I have also used the .net registration tool, "aspnet_regiis -config+", on the remote server and my development machine.
The event viewer on the remote server indicates that my application is able to logon to the server, so it seems the syntax below is correct. Regardless, I am unable to access the configuration system on the remote server.
I receive the error "Unable to access the configuration system on the remote server. Make sure that the remote server allows remote configuration." when using this code:
System.Configuration.Configuration config =
WebConfigurationManager.OpenWebConfiguration(
"/AppUnderTest", "1", null,
"TestServer");
The remote server is a Server 2003, Standard Edition with Service Pack 2.
Any suggestions would be greatly appreciated.