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.
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.
latest code from the resouce and MSSQL.
After updated the site, following errors shown up:
And this only happens on my current database. If I setup an emty database, there is no such error.
bject cannot be cast from DBNull to other types. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Object cannot be cast from DBNull to other types. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Object cannot be cast from DBNull to other types.] System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +68 mojoPortal.Business.HtmlRepository.LoadFromReader(HtmlContent content, IDataReader reader) +1824 mojoPortal.Business.HtmlRepository.Fetch(Int32 moduleId) +279 mojoPortal.Web.ContentUI.HtmlModule.PopulateControls() +702 mojoPortal.Web.ContentUI.HtmlModule.Page_Load(Object sender, EventArgs e) +62 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
bject cannot be cast from DBNull to other types. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Object cannot be cast from DBNull to other types.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidCastException: Object cannot be cast from DBNull to other types.] System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +68 mojoPortal.Business.HtmlRepository.LoadFromReader(HtmlContent content, IDataReader reader) +1824 mojoPortal.Business.HtmlRepository.Fetch(Int32 moduleId) +279 mojoPortal.Web.ContentUI.HtmlModule.PopulateControls() +702 mojoPortal.Web.ContentUI.HtmlModule.Page_Load(Object sender, EventArgs e) +62 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
Hi Wei Li,
Try getting the updates again, rebuild solution and visit the setup page. Let me know if the problem persists.
Best,
Joe
Now, everything is working. thanks a lot.
Running the following script:
UPDATE [mp_Pages] SET HideAfterLogin=0 WHERE HideAfterLogin IS NULL
fixed the problem for me