This project is read-only.

Issue With Installing Modules and Themes

Topics: Troubleshooting
May 3, 2012 at 4:07 AM


When I go to install a Theme, it tells me it can't write to the Themes folder, but the log error tells the underlying error, which is this:

2012-05-02 22:03:38,960 [6] NHibernate.AdoNet.AbstractBatcher - Could not execute query: SELECT top 2 this_.Id as Id11_0_, this_.SerialNumber as SerialNu2_11_0_ FROM Orchard_Settings_ShellDescriptorRecord this_ WHERE 1=1System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Orchard_Settings_ShellDescriptorRecord'.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()   at System.Data.SqlClient.SqlDataReader.get_MetaData()   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)2012-05-02 22:03:38,994 [6] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Orchard_Settings_ShellDescriptorRecord'.2012-05-02 22:03:39,003 [6] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Orchard_Settings_ShellDescriptorRecord'.

Note, when setting up the project, I setup "Orchard" as the table prefix.  I copied that query above and can run manually in SQL Server OK, with no errors.

How do I resolve this?

May 3, 2012 at 4:26 AM

First, can you verify that the gallery feed in admin - settings - gallery points to ?

May 3, 2012 at 5:36 PM
Edited May 3, 2012 at 5:39 PM

I had made that switch, yes.  That is in place.  I can view the gallery, and see the themes; the only time I get the error is during the download process.

I should also add that I'm using windows 7 64 bit on a hyper V virtual.

May 3, 2012 at 5:41 PM

Does the table Orchard_Settings_ShellDescriptorRecord exist in the database? I suppose yes if the query runs. Well, it seems like the ASP.NET process does not have proper access rights on the database. Why it would be able to read any table is weird, but I can't think of another explanation for this.

May 3, 2012 at 5:42 PM

Oh, and a good workaround for now would be to install the theme manually, by renaming the package .zip, extracting it and copying the theme's folder that's in there into your Themes folder in the site.

May 4, 2012 at 1:50 AM

I'll try the workaround, thanks.  OK, so I have anonymous access in IIS currently enabled, and gave the setup page a SQL user to connect to the database with (which I used with your user setup script to give permissions for).  I added IIS_USRS and IIS APPPOOL\DefaultAppPool to the entire Orchard folder and give it modify permissions...  so what would it be connecting to the database with, it should use the SQL account, correct?  The SQL account can run it fine.....

May 4, 2012 at 1:59 AM

It should, if that's what you specified in your connection string. Next, I'd check permissions and ownership inside the database.