I build the application for Protected Configuration Provider by help of following link.
http://msdn.microsoft.com/en-us/library/33ws57y0.aspx
in this example we need to add following code in web.config
<configuration>
<configProtectedData>
<providers>
<add name="TripleDESProvider"
type="Samples.AspNet.ProtectedConfiguration.TripleDESProtectedConfigurationProvider,
TripleDESProtectedConfigurationProvider,
Version=0.0.0.0, CultureInfo=neutral,
PublicKeyToken=a5a9eb4fc5306403,
processorArchitecture=MSIL"
keyFilePath="c:\WebSites\SampleApplication\App_Data\Keys.txt" />
</providers>
</configProtectedData>
</configuration>
its work fine in local matchine but now I want to deploy my application on azure as web role. So my question is that how can I specify path for "Keys.txt" if I add this file in my web application? somehow "~\keys.txt" is not working. If I using "~"
sign for root path, In case of IIS it return following error
Could not find file 'c:\windows\system32\inetsrv\Keys.txt (got same kind of error on Azure)
So "~" did not take application directory. I also try to set value for
keyFilePath attribute on run time by editing web.config file, its work fine on local machine but on Azure its give me following error
Access to the path 'E:\sitesroot\0\web.config' is denied
So is there any alternate way so I can use Protected Configuration Provider on Windows Azure?