I am having an issue running a module that connects to an external database. My environment is as follows:
Dev Machine & Production Server - DNN 6.1.5, VS2010.
On my dev machine, I created a c# project using Chris Hammond's template in the /desktopmodules folder per the instructions in his videos. I originally attempted to use the entity framework to access my external data, but couldn't get it to work so I gave up and went back to classic ado.net. I have a sqldatasource being used by a datagridview. I created a new connectionstring in the web.config in the root of the dnn site, which is being utilized by the sqldatasource. This all works great on my dev machine. I then package and add the module to my production install, add the connection string to the web.config and add to a page. I cannot get past this error when accessing the page:
Error: TestPlan is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The connection name 'conIOS' was not found in the applications configuration or the connection string is empty. ---> System.InvalidOperationException: The connection name 'conIOS' was not found in the applications configuration or the connection string is empty. at System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) at ASP.desktopmodules_testplan_view_ascx.__BuildControlTree(desktopmodules_testplan_view_ascx __ctrl) at System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleControlFactory.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---
I have confirmed that this connectionstring does exist in the web.config file in the root of the site. What am I missing? I am a total dnn newbie, so I appreciate any ideas or suggestions regarding a better way to access external data.