Update website with source-code

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/31/2011 11:51:32 AM
Gravatar
Total Posts 76

Update website with source-code

Hello,

I have a website running on my hosting plan. Everything works well.

I also downloaded the source-code with Toirtoise-HG. I've added a custom guestbook, but for it to work there has to be added an external *.dll. I've done this in the source code and on my local computer the new site works great.

But how do i update it now on my hosting server?

THNX in advanced.

2/1/2011 11:48:23 AM
Gravatar
Total Posts 18439

Re: Update website with source-code

I would set the solution to Release mode, rebuild the solution,, then publish it to a local folder then from there you can upload it to your hosting.

http://www.mojoportal.com/packaging-and-deployment.aspx

Be careful to backup your Web.config so you can restore the machine key to the new web.config and be careful not to overwrite your user.config on the server with your local copy.

Hope it helps,

Joe

2/1/2011 3:04:29 PM
Gravatar
Total Posts 76

Re: Update website with source-code

THNX Joe.

But is that gonna wipe my database?? I don't wanna lose the data on it!

 

2/1/2011 4:00:48 PM
Gravatar
Total Posts 76

Re: Update website with source-code

Hello Joe,

I build published the website in visual studio 2010 and uploaded it to my hosting-plan.

When i run my website i now get following error:

Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
1 site(s) found.
Running script mojoportal-core - 2.3.3.6 - 00:00:00.1708875
An Error Occurred:Cannot insert the value NULL into column 'ID', table 'Mojoportal.dbo.mp_SchemaScriptHistory'; column does not allow nulls. INSERT fails. The statement has been terminated.
Source:.Net SqlClient Data Provider
Stack Trace at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.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.ExecuteScalar() at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.SqlParameterHelper.ExecuteScalar() at mojoPortal.Data.DBPortal.SchemaScriptHistoryAddSchemaScriptHistory(Guid applicationId, String scriptFile, DateTime runTime, Boolean errorOccurred, String errorMessage, String scriptBody) at mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) at mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

How to resolve this??

2/2/2011 6:34:26 AM
Gravatar
Total Posts 18439

Re: Update website with source-code

There is something you are not telling me. You've done something to the database like you imported tables or something so it lost its primary key and it lost the auto identity on the ID column of that mp_SchemaScriptHistory table and probably other tables if you imported them. You cannot restore a database by importing tables. 

2/4/2011 3:41:39 PM
Gravatar
Total Posts 76

Re: Update website with source-code

Hello Joe,

I don't now what went wrong.

I created the site from scratch back online.

I also have a backup of the database, but i believe allready the error exists in this backup.

Is it possible to copy back my data from Calender_events and Forums and user_accounts to the new database ??

THNX

7/8/2011 4:56:12 AM
Gravatar
Total Posts 20
ScalSan

Re: Update website with source-code

Hi guys,

Is there a logic explanation for this?  Any update much appreciated... (to avoid haviong the same probems)

Regards

Pascal

You must sign in to post in the forums. This thread is closed to new posts.