I have a vdir with a physicalPath that points to a file share. Setting the "userName" and "password" attributes to a user with access to that share in the vdir config section in applicationhost.config works fine, but the password is then in clear text.
I want this password encrypted in the applicationhost.config file.
The only option I've found is to use "appcmd.exe" to do this, but I am unable to get it to work in the obvious way:
appcmd.exe set vdir /vdir.name:"Default Web Site/img" /password:"ThePassword"
I get this error:
ERROR ( hresult:80090016, message:Failed to commit configuration changes. Keyset does not exist )
I have tried with an elevated cmd prompt, does nothing. Setting the other attributes, like userName, works fine.