Copied to clipboard

Flag this post as spam?

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

  • Joao Rochate 3 posts 23 karma points
    Aug 30, 2013 @ 01:26
    Joao Rochate

    InvalidCastException - install error


    I'm getting System.InvalidCastException: Specified cast is not valid with SW MVC 2.0 on umbraco 6.1.4

    Is there anything I can do, in order to circumvent this problem? If I refresh the page, the package get installed, but I think something was unfinished.

    here is the stack. Thanks in advance.

    [InvalidCastException: Specified cast is not valid.]
       umbraco.editorControls.datepicker.DateData.ToXMl(XmlDocument d) +149
       Umbraco.Core.Models.PropertyExtensions.ToXml(Property property, IDataTypeService dataTypeService) +534
       Umbraco.Core.Services.PackagingService.Export(IContentBase contentBase, String nodeName) +1507
       Umbraco.Core.Services.PackagingService.Export(IContent content, Boolean deep) +241
       Umbraco.Web.Search.ExamineEvents.IndexConent(IContent sender) +76
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +148
       Umbraco.Core.Services.ContentService.Save(IEnumerable`1 contents, Int32 userId, Boolean raiseEvents) +913
       Umbraco.Core.Services.PackagingService.ImportContent(XElement element, Int32 parentId, Int32 userId) +288
       umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +2460
       umbraco.presentation.developer.packages.Installer.ProcessInstall(String currentStep) +716
       umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +618
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +19
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
  • Jan Skovgaard 11264 posts 23592 karma points MVP 8x admin c-trib
    Aug 31, 2013 @ 09:53
    Jan Skovgaard

    Hi Joao

    I suspect you might miss part of the MVC framework on your machine. In my experience the easiest way to ensure that all the dependencies needed to have Umbraco work properly is to make an Umbraco installation from within Webmatrix by installing it from their app gallery.

    Otherwise try to download the web platform installer and see if you're missing any MVC framework updates etc.


  • Louise Newton 4 posts 26 karma points
    Aug 31, 2013 @ 22:38
    Louise Newton

    I had the same error and I definitely had all of the MVC framework on my machine.

  • Joao Rochate 3 posts 23 karma points
    Sep 02, 2013 @ 00:13
    Joao Rochate

    Hi Jan, thank you for your interest in helping with my problem.

    I've always installed Umbraco via WebPI, and MVC is also pushed.

    As you can see from the attached screenshot, I think I've got what's needed about MVC.

    Do you have any more suggestions?



  • John 12 posts 51 karma points
    Sep 03, 2013 @ 22:47

    Hi Joao

    I had the same problem, I think I resolved it by adjusting the permissions on the umbraco installtion folder (I say 'I think' because I tried various things but they didn't seem to work).

    I'm using Windows 7; on the secuirty tab on the umbraco folder there is a group called Users, which my logged on user is a member of, I simply changed the permissions by adding the modify permission - it was previously set to Read & Execute, List and Read. Doing this seemed to resolve the issue and I can now view and edit the content, templates etc.

    I hope this helps you.


  • Fido 9 posts 41 karma points
    Sep 04, 2013 @ 13:57

    I have the same problem, Win XP, 6.1.5.

  • John 12 posts 51 karma points
    Sep 04, 2013 @ 14:26

    Hi Fido

    Did you try adjusting the permissions?

  • Orich 2 posts 22 karma points
    Sep 19, 2013 @ 10:57

    Is it possible its a problemw ith Umbraco?  I'm getting this same error ... can't figure out why

    If you check :

    The last commit changed :

               if (Value != null && Value.ToString() != "")
                    return d.CreateTextNode(((DateTime) Value).ToString("s"));

    taking out the "Value != null"




  • John 12 posts 51 karma points
    Sep 19, 2013 @ 14:56

    Hi Orich

    Looks like you found the issue. Following your link and then on to the current source code on guthub I found this recent modification

    , which seems to fix the issue, guees it will be in the next release.


    My permission fix was a fluke, it only worked once and when I tried reinstalling it this morning I got the same error message!

    Well done and thanks - I wouldn't have known where to look to find that source code information but now you have enlightened me I'll be able to use it with future troubleshooting.


  • Alan Ellicott 45 posts 104 karma points
    Sep 19, 2013 @ 17:34
    Alan Ellicott

    Yes it has to be Umbraco - This excellent MVC starter kit (standard site mvc) has installed happily on this machine in the past below Umbraco 6.1

  • Orich 2 posts 22 karma points
    Sep 19, 2013 @ 19:46

    If you guys are newer to Umbraco and/or MVC like me ... you might want to head here :



       Pretty awesome guide to proper MVC coding


        His updated post regarding a "better" MVC design, and he has a demo project

    Ofcourse, this is if you develop in Visual Studio ... it's helped me so much as I am new to Umbraco and MVC both.  The demo project, however, is much less "complete" in feature set ... but a lot more "complete" in design ideology.

    I haven''t slept in a while here .. Please excuse the grammar and convoluted articulation :-p

Please Sign in or register to post replies

Write your reply to: