Lightbox Gallery version 01.04 Error when adding to page

Oct 20, 2010 at 5:18 PM

We are using the latest DNN version 5.05.01 and SQL Server 2005.  We are having problems with adding the lightbox gallery to a page.  The module installed successfully with-out any errors, however, when you add the module to the page, we receive errors and the module is not functional.

The complete error details are:

 

An error has occurred.
DotNetNuke.Services.Exceptions.ModuleLoadException: An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\IntranetPortal\App_Data\DotNetNuke.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. ---> System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\IntranetPortal\App_Data\DotNetNuke.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at WillStrohl.Modules.Lightbox.SqlDataProvider.GetLightboxCount(Int32 ModuleId) at WillStrohl.Modules.Lightbox.LightboxController.GetLightboxCount(Int32 ModuleId) at WillStrohl.Modules.Lightbox.ViewLightbox.get_ModuleActions() at DotNetNuke.UI.Modules.ModuleInstanceContext.LoadActions(HttpRequest Request) at DotNetNuke.UI.Modules.ModuleInstanceContext.get_Actions() at DotNetNuke.UI.Containers.ActionBase.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---


Error Error: Lightbox Gallery is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\IntranetPortal\App_Data\DotNetNuke.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. ---> System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\IntranetPortal\App_Data\DotNetNuke.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at WillStrohl.Modules.Lightbox.SqlDataProvider.DoesDisplayOrderNeedUpdate() at WillStrohl.Modules.Lightbox.ViewLightbox.get_Albums() at WillStrohl.Modules.Lightbox.ViewLightbox.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
Coordinator
Oct 21, 2010 at 2:53 PM

This error doesn't appear to be specific to the module.  It uses the default DAL in DNN, so it wouldn't be looking for any other database, or attaching another database.  However, there is an off-chance that I might have something wrong in the code, and if it is what I think it is - it's an easy fix.

Can you confirm the following for me...

You don't see this error when you add any other module to the site/page?  Are you using the 01.04.00 version?  

Oct 21, 2010 at 3:00 PM

No, there are no errors when adding any other modules to this page or any other page in the site.  We have tried adding this module to other pages and still receive the same error.  We are using lightbox gallery version 01.04.00 

Coordinator
Oct 22, 2010 at 5:23 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Oct 22, 2010 at 5:24 PM

I am going to review the code and see if there's anywhere that I might be causing this.  I have copied this discussion to a work item (issue):  http://wnslightbox.codeplex.com/workitem/5337

Coordinator
Oct 22, 2010 at 5:33 PM

I think I already found the issue.  Can you please confirm with me what your connection string is in you AppSettings (if it even exists)?  I was still using a depreciated database connection string method.  :(

To be clear, if this is indeed the fix for your issue, your AppSettings connection string will be present, and it will be pointing at the SQLExpress database in your AppCode directory (which may not exist at all).

Oct 22, 2010 at 5:43 PM

You are correct.  The problem is with my App Settings connection string.  Also, I tried another installation of DNN (still latest version) on another server and have installed the Lightbox Gallery module is working with no issue's to report.  I am now in the process of correcting my AppSettings connection string on the first DNN installation.  Thanks for you help.  This is a great module! 

Coordinator
Oct 22, 2010 at 6:28 PM

If you're willing, I have an alpha release ready.  Would you mind testing it out for me without making the changes to your website?

Oct 22, 2010 at 7:31 PM

Absolutely.  We will test it out and report back.  Let me know where to download it. 

Coordinator
Oct 23, 2010 at 12:24 AM

This this new ALPHA release:

http://wnslightbox.codeplex.com/releases/view/54440

Oct 25, 2010 at 12:41 PM

The latest release, 01.04.01A, installed successfully with no errors and can also be added to a page with no errors. The module is functioning correctly. The only thing I am seeing out of the ordinary is while in “edit” mode, the pencil icon image is no longer displayed for edit album. Rather, just the text “Edit Album” is displayed just to the left of the Album Name. From a functionality viewpoint, everything is working great.

Mike Reeves

Coordinator
Oct 25, 2010 at 3:28 PM

Thanks for your feedback, Mike.  I will see if I can work on that today and get this released.

Coordinator
Oct 25, 2010 at 4:37 PM

I am unable to duplicate the edit images missing.  Are you having any JavaScript error or anything?

Oct 25, 2010 at 5:14 PM

I believe that the code is referencing the image name “edit.gif” in an incorrect location. Looking at the path, it’s trying to find the image at: http://domain name/Http Alias Name/images/edit.gif If I navigate to this directory, there is no images folder with-in the http Alias name folder, there is only the “Default.aspx” file.

The pencil image “edit.gif” just above this and directly to the left of the module title “Lightbox Gallery” is displaying correctly. The code is referencing the following path: http://domain name/Images/edit.gif

Mike Reeves

Coordinator
Oct 27, 2010 at 3:07 AM

Ah... I am not testing in any child portals. That could account for it.

Coordinator
Oct 27, 2010 at 3:08 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.