[Mono-list] Apache+mod_mono: Auto generated encryption keys not saved error
james.wright at jigsawdezign.com
Wed Jan 25 02:39:24 UTC 2012
Thanks for your reply Gonzalo, however I couldn't find the "registry"
directory anywhere on the file system. There is no "/etc/mono" but there
is a "/etc/opt/novell/mono/" directory which contains "2.0" and "4.0"
directories which contain the machine.configs.
I tried creating a "registry" directory at
"/etc/opt/novell/mono/registry" and allowing all read/write/execute for
everyone on it. Mono then created a single file called "last-btime" in
that folder but the same security exception is still present in the
apache error logs! :-(
Am I missing something my mono installation (such as a directory tree
for the registry keys)?
On 25/01/2012 02:04, Gonzalo Paniagua Javier wrote:
> On Tue, Jan 24, 2012 at 3:20 PM, James Wright
> <james.wright at jigsawdezign.com> wrote:
>> I'm running Mono 2.10.2 with Apache 2 + mod_mono on an Amazon Linux server
>> and keep getting the following error in the apache error log:
>> (info) Auto generated encryption keys not saved:
>> System.Security.SecurityException: No access to the given key
>> at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey,
>> System.String basedir, Boolean is_volatile) [0x00000] in<filename
>> It looks like some sort of permission problem accessing the registry store,
>> but I have no idea where that is on the filesystem or whether it can (or
>> should) be changed?
> ASP.NET is creating autogenerated keys for the machine and failing to
> safe them. The only problem, other that seen that message, is that
> every time the application is started you will get new keys because
> they are not being saved.
> I think the directory where this is trying to write is somewhere
> $SYSCONFDIR/mono/registry (usually /etc/mono/registry). If you allow
> the user running apache read, write, and execute permissions on that
> folder, Mono will be able to save the autogenerated keys and will
> reuse them subsequently. Once the keys are written, the apache user
> will only need read and execute permission.
More information about the Mono-list