Copied to clipboard

Flag this post as spam?

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


  • Anthony Dang 1404 posts 2557 karma points MVP c-trib
    Apr 28, 2015 @ 11:12
    Anthony Dang
    0

    Specified cast is not valid - Azure

    We've got this issue which is happening for all pages and even when doing Umbraco.TypedContentAtRoot().

    Anyone know why this could happen?

    The site is on Azure Websites, using Azure DB

     

    System.InvalidCastException: Specified cast is not valid.
       at Umbraco.Core.Persistence.Database.PocoData.<>c__DisplayClass37.<GetFactory>b__35(Object src)
       at petapoco_factory_12(IDataReader )
       at Umbraco.Core.Persistence.Database.<Query>d__7`1.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.MapGroupsAndProperties(Int32[] contentTypeIds, Database db, IDictionary`2& allPropertyTypeCollection, IDictionary`2& allPropertyGroupCollection)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.MapContentTypeChildren[TRepo](IContentTypeComposition[] contentTypes, Database db, TRepo contentTypeRepository, IDictionary`2 allParentContentTypeIds)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.GetContentTypes[TRepo](Int32[] contentTypeIds, Database db, TRepo contentTypeRepository, ITemplateRepository templateRepository)
       at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetAll(Int32[] ids)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetAll(TId[] ids)
       at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetByQuery(IQuery`1 query)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetByQuery(IQuery`1 query)
       at Umbraco.Core.Services.ContentTypeService.GetContentType(String alias)
       at Umbraco.Core.Models.PublishedContent.PublishedContentType.CreatePublishedContentType(PublishedItemType itemType, String alias)
       at Umbraco.Core.Cache.CacheProviderExtensions.<>c__DisplayClass9`1.<GetCacheItem>b__8()
       at Umbraco.Core.Cache.StaticCacheProvider.<>c__DisplayClass1a.<GetCacheItem>b__19(String key)
       at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
       at Umbraco.Core.Cache.StaticCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem)
       at Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem[T](ICacheProvider provider, String cacheKey, Func`1 getCacheItem)
       at Umbraco.Core.Models.PublishedContent.PublishedContentType.Get(PublishedItemType itemType, String alias)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.Initialize()
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.ConvertToDocument(XmlNode xmlNode, Boolean isPreviewing)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.DetermineIdByRoute(UmbracoContext umbracoContext, Boolean preview, String route, Boolean hideTopLevelNode)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetByRoute(UmbracoContext umbracoContext, Boolean preview, String route, Nullable`1 hideTopLevelNode)
       at Umbraco.Web.Routing.ContentFinderByNiceUrl.FindContent(PublishedContentRequest docreq, String route)
       at Umbraco.Web.Routing.ContentFinderByNiceUrl.TryFindContent(PublishedContentRequest docRequest)
       at Application.Web.ContentFinders.BoardContentFinder.TryFindContent(PublishedContentRequest request) in e:\TeamCity\buildAgent2\work\33f85ceaa9983988\Source\Application.Web\ContentFinders\BoardContentFinder.cs:line 15
       at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
       at Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContent()
       at Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContentAndTemplate()
       at Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest()
       at Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

  • Ismail Mayat 4265 posts 9144 karma points MVP 2x admin c-trib
    Apr 28, 2015 @ 11:27
    Ismail Mayat
    0

    This is for umbraco 7.2.4 btw

  • Anders Bjerner 407 posts 2269 karma points MVP 3x admin c-trib
    Apr 28, 2015 @ 11:37
    Anders Bjerner
    0

    I'm not totally sure, and if I remember correctly, but I think I had this error when working with multiple environments, and a document type is changed in of of them, but the other environment(s) hasn't yet picked up the change.

    So have you tried republishing the site, rebuilding the cache, recycling the application pool and similar? Not necessarily in that order.

  • Ismail Mayat 4265 posts 9144 karma points MVP 2x admin c-trib
    Apr 28, 2015 @ 11:46
    Ismail Mayat
    0

    Anders,

    Site was up fine but then according to elmah we started getting errors around 12hrs ago.  We restarted app pool and its all backup, just a bit concerned as to why it suddenly failed.  

    Regards

    Ismail

  • Anthony Dang 1404 posts 2557 karma points MVP c-trib
    Apr 28, 2015 @ 11:53
    Anthony Dang
    0

    Andres it's a single instance Azure Website.

     

  • Paul Sterling 700 posts 1411 karma points MVP 4x admin c-trib
    Apr 28, 2015 @ 15:02
    Paul Sterling
    0

    Could you verify your DB schema matches 7.2.4?  I.e. run the upgrade installer.  If nothing shows up there hit us up on your Gold Partner support so we can dive in deeper.

Please Sign in or register to post replies

Write your reply to:

Draft