I just need to deploy orchard

Topics: Administration, Installing Orchard
Nov 13, 2011 at 7:36 AM

Hi, I know the answer to my question has to be discussed somewhere but I've searched through the documentation, the forums, and just straight through Google and I cannot find this information.  I have an orchard site that I installed using the web platform installer and I've customized the site using Web Matrix.  Now I'm ready to deploy it to my shared hosting (not cloud) account.  How do I do this?  All I have seen is that people "right-click on orchard.web" but there is nothing that says orchard.web inside web matrix.  I'm not using cloud hosting so there is no "web deploy" option so my deploy has to be done through FTP.  ALSO, I want to create a mssql database on my hosting account and use that instead of the sql CE database, but I can't find any information about how to setup required orchard database in MSSQL.  Again, I know this information has to be out there somewhere but I cannot find it.  I'm sorry for asking such a noob question but I'm very excited about Orchard and I want to be able to contribute to the community.  Any help anyone can give me about what I'm supposed to do to get my site running on my shared hosting account and using MSSQL instead of SQL CE would be VERY appreciated.

 

Thanks!

Nov 14, 2011 at 9:49 AM

When they say right-click on Orchard.Web, they're talking about Visual Studio. In WebMatrix there's a Publish button right there on the toolbar :)

Nov 14, 2011 at 12:56 PM

Hi, thanks for responding...  I guess I should have specified that I've tried the publish button and published using FTP.  When it was done, I went to my URL, and I just got an error.  I dont' know what the error was because for some reason, even though I had the custom errors node set to false in the web.config, it still didn't display the error.  SO, this leads me to believe the publish button in Web Matrix doesn't work.  SO, what do I do?

 

Thanks!

Nov 14, 2011 at 2:38 PM

There are two different sections for customErrors - depends what version of IIS your server is running. Can you show me that portion of your web.config?

Also, you can check the log files (in App_Data/Logs) because the error *should* be logged there - most of the time you don't need custom errors off at all.

I wonder, have you copied the website up in its entirety, settings and all? Do you need to modify the database connection string?

Nov 14, 2011 at 3:18 PM

Okay, now we're getting somewhere...  Now I have just gotten the source, published orchard.web to a local folder, then uploaded the contents of that folder using FileZilla.  I'm still getting an error, though.  Here is the error:

2011-11-13 21:54:54,460 [23] NHibernate.Util.ADOExceptionReporter - Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.2011-11-13 21:54:54,789 [23] NHibernate.Util.ADOExceptionReporter - Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.2011-11-13 21:54:54,871 [23] Orchard.Tasks.BackgroundService - Error while processing background taskNHibernate.ADOException: could not execute query[ SELECT this_.Id as Id718_0_, this_.TaskType as TaskType718_0_, this_.ScheduledUtc as Schedule3_718_0_, this_.ContentItemVersionRecord_id as ContentI4_718_0_ FROM Scheduling_ScheduledTaskRecord this_ WHERE this_.ScheduledUtc <= ? ]Positional parameters:  #0>11/14/2011 3:54:32 AM[SQL: SELECT this_.Id as Id718_0_, this_.TaskType as TaskType718_0_, this_.ScheduledUtc as Schedule3_718_0_, this_.ContentItemVersionRecord_id as ContentI4_718_0_ FROM Scheduling_ScheduledTaskRecord this_ WHERE this_.ScheduledUtc <= ?] ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()   at System.Data.SqlClient.TdsParserStateObject.ReadByte()   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, TimeoutTimer timeout, SqlConnection owningObject)   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, 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 NHibernate.Connection.DriverConnectionProvider.GetConnection()   at NHibernate.AdoNet.ConnectionManager.GetConnection()   at NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd)   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session)   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)   --- End of inner exception stack trace ---   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes)   at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)   at NHibernate.Impl.CriteriaImpl.List(IList results)   at NHibernate.Impl.CriteriaImpl.List()   at NHibernate.Linq.CriteriaResultReader`1.<GetEnumerator>d__0.MoveNext()   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)   at Orchard.Utility.Extensions.ReadOnlyCollectionExtensions.ToReadOnlyCollection[T](IEnumerable`1 enumerable) in C:\Users\tjones\development\orchard\src\Orchard\Utility\Extensions\ReadOnlyCollectionExtensions.cs:line 8   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Fetch(Expression`1 predicate) in C:\Users\tjones\development\orchard\src\Orchard\Data\Repository.cs:line 72   at Orchard.Core.Scheduling.Services.ScheduledTaskExecutor.Sweep() in C:\Users\tjones\development\orchard\src\Orchard.Web\Core\Scheduling\Services\ScheduledTaskExecutor.cs:line 36   at Orchard.Tasks.BackgroundService.Sweep() in C:\Users\tjones\development\orchard\src\Orchard\Tasks\BackgroundService.cs:line 31

Nov 14, 2011 at 3:32 PM

I know nothing about NHibernate, but the bottom of the error looks like it's looking in a path on my local system for something.  How did a local filesystem path get hardcoded into the code?

 

Nov 14, 2011 at 3:33 PM

Most likely cause then is the database connection string. What you should do is delete Sites, cache and hrestart from your App_Data folder on the server, restart the site, and perform a fresh install. (Then import your content)

Nov 14, 2011 at 3:34 PM
TheInternet wrote:

I know nothing about NHibernate, but the bottom of the error looks like it's looking in a path on my local system for something.  How did a local filesystem path get hardcoded into the code?

 

Because the files were compiled on your local system, it has references to your local file paths. This is normal.

Nov 14, 2011 at 3:34 PM

Oh and also, yes, I copied everything from the published folder I built, including the settings.  Also, I made sure the settings.txt file was uploaded as binary instead of ASCII...  and I did change the connection string to be that of my hosts SQL server instance.  One thing I haven't done is anything to port my local database to the database on my hosting.  Is there something I need to do there?  or is orchard supposed to take care of that?

Nov 14, 2011 at 3:36 PM

What do you mean a fresh install?  do you mean upload the files again?  or is there some installation process I'm supposed to be doing?  Again, what I've done is compiled from VS to a local folder, and then uploaded the contents of that folder.  Also, you said to import my content, how do I do that?  do you mean the data from my local database?

Nov 14, 2011 at 3:37 PM
TheInternet wrote:

Oh and also, yes, I copied everything from the published folder I built, including the settings.  Also, I made sure the settings.txt file was uploaded as binary instead of ASCII...  and I did change the connection string to be that of my hosts SQL server instance.  One thing I haven't done is anything to port my local database to the database on my hosting.  Is there something I need to do there?  or is orchard supposed to take care of that?

I see, in that case the tables won't exist. Orchard will only create tables when it first installs, or when you add a new module. So if there's already a settings file it assumes it's already installed. You can either use Database Publishing Wizard to clone your database to the site, or just run Orchard's installation (by deleting the Sites folder and restarting)

Nov 14, 2011 at 3:38 PM
TheInternet wrote:

What do you mean a fresh install?  do you mean upload the files again?  or is there some installation process I'm supposed to be doing?  Again, what I've done is compiled from VS to a local folder, and then uploaded the contents of that folder.  Also, you said to import my content, how do I do that?  do you mean the data from my local database?

What I meant by "fresh install" was Orchard's initial installation that you get when you first run the site.

Orchard has an Import/Export feature which you can enable in Admin, this is only if you have local content that you need to persist to your live site (but it sounds like you don't?)