Hi
i am tying to develop a new module in visual studio .net 2010, and for this modules i need to connect to different sql database to retrieve employee name and office number,, so i modified the web.config file and i added the following
---------------------------------------------
<connectionStrings>
<add name="Pr1ConString" connectionString="Data Source=SQLDB;Initial Catalog=PersonalDB;User Id=usr;Password=pass" providerName="System.Data.SqlClient" />
--Other Connection---
</connectionStrings>
---------------------------------------------
and also i modified the Appsetting
---------------------------------------------
<appSettings>
<add key="Pr1ConString" value="Data Source=SQLDB;Initial Catalog=PersonalDB;User Id=usr;Password=pass" />
--Other connection--
</appSettings>
---------------------------------------------
and i created a page with gridview and sqldatasource
when i rebuild the solution it build successfully
but when i refresh the page that contains this module i am getting the following error
---------------------------------------------
Error: Get Employee Names is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The connection name 'PR1ConnectionString' was not found in the applications configuration or the connection string is empty. ---> System.InvalidOperationException: The connection name 'PR1ConnectionString' was not found in the applications configuration or the connection string is empty. at System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) at GetEmpNames.GetEmpNames.__BuildControlSqlDataSource1() in c:\websites\dnndev\DesktopModules\GetEmpNames\GetEmpNames\View.ascx:line 7 at GetEmpNames.GetEmpNames.__BuildControlTree(GetEmpNames __ctrl) in c:\websites\dnndev\DesktopModules\GetEmpNames\GetEmpNames\View.ascx:line 1 at GetEmpNames.GetEmpNames.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4733197c\30aa10a5\App_Web_6punkr7y.0.cs:line 0 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.WebFormsModuleControlFactory.CreateModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleControlFactory.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---
can you help me ?