D
David Bowen
Hi,
I have written a custom membership provider based to access an existing SQL
profile store. However when I upload my application to a shared hosting
environment I get a security exception of the type IO Exception. This boils
down to a number of lines of code in my provider trying to access the
system.web/machine keys section of my web.config.
The lines of code are:
Configuration cfg =
WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath);
machineKey = (MachineKeySection) cfg.GetSection("system.web/machineKey");
And I have tried this instead to no avail:
machineKey =
(MachineKeySection)WebConfigurationManager.GetWebApplicationSection("system.web/machineKey");
Please can someone assist so that I use my custom provider in a shared
hosting environment.
Thanks,
David
I have written a custom membership provider based to access an existing SQL
profile store. However when I upload my application to a shared hosting
environment I get a security exception of the type IO Exception. This boils
down to a number of lines of code in my provider trying to access the
system.web/machine keys section of my web.config.
The lines of code are:
Configuration cfg =
WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath);
machineKey = (MachineKeySection) cfg.GetSection("system.web/machineKey");
And I have tried this instead to no avail:
machineKey =
(MachineKeySection)WebConfigurationManager.GetWebApplicationSection("system.web/machineKey");
Please can someone assist so that I use my custom provider in a shared
hosting environment.
Thanks,
David