I am trying to encrypt some sections of the web.config file of one of my applications by using RSA encryption at user level.
So I followed all the steps listed in here and I succesfully created the provider and granted access to my application. However, I have some problems in specifying the virtual path for my application.
I run IIS 7.5 in a Windows Server 2008 R2. My application is called www.testsite.com and its ID is 4.
The aspnet_regiis tool is placed in the Windows\Microsoft.NET\Framework\[version] folder:
Therefore in order to encrypt the connectionStrings
section I run the command:
aspnet_regiis -pe connectionStrings -app "[Application Path]" -prov "myRSAProvider"
I tried as [Application Path], the followings:
- /W3SVC/4
- /W3SVC/4/root
- /W3SVC/4/root/www.testsite.com
- /www.testsite.com
And I always receive the error
The configuration for virtual path '[Application Path]' and site 'Default Web Site' cannot be opened.
Failed to map the path '[Application Path]'. Failed!
I tried to browse many resources on the web but this IIS virtual path specification is not extensively covered. In IIS6 I could get it by running aspet_regiis -lk but this command does not work anymore in IIS 7.5. May somebody help?