Hi.
I am having troubles accessing my module setting from inside a controller class inheriting DnnApiController
for example I can access my settings in my view.ascx.cs with the following
var URL = Settings["SuccessURL"].toString();
but can not use the same in the controller class so I tried to implement an IDisposable
using(ContactsManagerModuleSettingsBase cmms = new ContactsManagerModuleSettingsBase())
{
var response = Request.CreateResponse(HttpStatusCode.Moved);
response.Headers.Location = new Uri(cmms.Settings["SuccessURL"].ToString());
return response;
}
Here it would seem to work but when the code fires I have a NullReference Exception. I also notice that the count for settings is 0
Does anyone know how I might do get the settings?
Thank you
Mark