Owin security

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Building an Owin Security plugin, to login with facebook, google, microsoft and twitter.
To setup the app I need to change the Nop.Web config file
<add key="owin:AutomaticAppStartup" value="true" />

is there any way to override it in the plugin?

by the way, if the plugin is not installed and the above set to True it will throw an error.

further I think Nop team should include it as part of the solution
7 years ago
hezyz wrote:
Building an Owin Security plugin, to login with facebook, google, microsoft and twitter.
To setup the app I need to change the Nop.Web config file
<add key="owin:AutomaticAppStartup" value="true" />

is there any way to override it in the plugin?

by the way, if the plugin is not installed and the above set to True it will throw an error.

further I think Nop team should include it as part of the solution


Not tried, but using below code we can override/add configuration settings.

Configuration config = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
config.AppSettings.Settings.Add("owin:AutomaticAppStartup", "true");
config.Save();


But when application will restart your settings will removed. So you need to write this code when ever your application restarts.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.