Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • matteo 4 posts 24 karma points
    Apr 05, 2011 @ 13:30
    matteo
    0

    migrating from MySQL to SQL Server 2008

    Hello,

    I'm trying to migrate an Umbraco 4.0 installation from MySQL to a SQL Server 2008 one in a different hosting.

    The first thing I did was creating a new Umbraco 4.0 installation on the new server, connecting it to SQL Server, and that was ok.

    Then I converted the original db and overwrote the new one just created by Umbraco. That went fine as well, as I can see all the tables are populated correctly.

    What I did next was to replace everything in the Umbraco directory except for web.config, to have all the content in place and keep the settings intact. That's what I would usually do when I migrate MySQL to MySQL.

    What I get next is that I can login to the CMS, but instead of the Content tab I get "Specific cast is not valid".

    How can I go about to fix that? Does this mean the database conversion went wrong or is it something else?

    Here's the whole error: 

    Server Error in '/' Application.

    Specified cast is not valid.

    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: Specified cast is not valid.

    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: Specified cast is not valid.]
    System.Data.SqlClient.SqlBuffer.get_Byte() +56
    System.Data.SqlClient.SqlDataReader.GetByte(Int32 i) +38
    umbraco.DataLayer.RecordsReaderAdapter`1.GetByte(String fieldName) +36
    umbraco.BusinessLogic.ApplicationTree.Cache() +206
    umbraco.BusinessLogic.ApplicationTree..cctor() +43

    [TypeInitializationException: The type initializer for 'umbraco.BusinessLogic.ApplicationTree' threw an exception.]
    umbraco.BusinessLogic.ApplicationTree.getAll() +0
    umbraco.cms.presentation.Trees.TreeDefinitionCollection.RegisterTrees() +69
    umbraco.cms.presentation.Trees.TreeDefinitionCollection..ctor() +20
    umbraco.cms.presentation.Trees.TreeDefinitionCollection..cctor() +21

    [TypeInitializationException: The type initializer for 'umbraco.cms.presentation.Trees.TreeDefinitionCollection' threw an exception.]
    umbraco.cms.presentation.Trees.TreeDefinitionCollection.get_Instance() +0
    umbraco.cms.presentation.TreeInit.Page_Load(Object sender, EventArgs e) +221
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627



    Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

     

    Many thanks...

  • matteo 4 posts 24 karma points
    Apr 05, 2011 @ 13:52
    matteo
    0

    The weird part is that the website seems to almost fully work on the front end side. Content is loaded, macros are loaded... the only things that don't work are the calls to the media library (= path to images are empty).
    Plus the CMS back end, which shows the error above.
    I can log in, but that's what I get when I click on Content, Media, Users, Settings, ...

    Any idea?

Please Sign in or register to post replies

Write your reply to:

Draft