Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Downgrade From 2024 - Assets Page - Unable to cast object of type 'System.Int32' to type 'System.Int64'



  • I downgraded but the Asset page give the error:
    Unexpected Error
    (500) Server Error
    Unable to cast object of type 'System.Int32' to type 'System.Int64'.
    For more information, visit the Error Log Page.

    Please see below from the error log:

    URL: http://localhost:8624/assets
    Referrer: http://localhost:8624/administration
    User: Admin
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
    Stack trace: at Microsoft.Data.SqlClient.SqlBuffer.get_Int64()
    at lambda_method10(Closure , DbDataReader , BufferData )
    at Inedo.Data.StrongDataReader.<Read>g__readRow|11_0[TRow](<>c__DisplayClass11_01& ) at Inedo.Data.StrongDataReader.Read[TRow](IDbDataResult dbResult)+MoveNext() at Inedo.Data.StrongDataReader.Read[TRow](Func1 getReader, Boolean disposeReader)+MoveNext()
    at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
    at Inedo.ProGet.WebApplication.Pages.Assets.AssetDirectoriesPage.CreateChildControls()
    at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync()
    at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync()
    at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context)
    at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)


  • inedo-engineer

    Hi @arlymac_7956,

    What version of ProGet did you have installed prior to upgrading to ProGet 2024 before you downgraded? I don't see any differences in the table schemas between ProGet 2023 and 2024, but I want to make sure I'm comparing to the correct schema.

    Thanks,
    Rich



  • I had 2023.33.
    I downgraded to 2023.33 and due to this error I downgraded to 2023.32. As the error was still there I upgraded to 2023.33


  • inedo-engineer

    Hi @arlymac_7956

    This error will occur when the database and installed product are not the same version. This is a rare scenario, and will happen if you make certain changes to the IIS/Service configuration on a server.

    For example, if you were to copy the application folder (e.g. c:\Program Files\ProGet) to a new location, and then run the web application from that location, then it wouldn't be updated when you update ProGet.

    If you can't figure how it's happening, I would recommend uninstalling. Then try to delete any remaining configuration like services/IIS. Don't delete the database or the packages of course.

    Then when you reinstall, just point to the database and it shoudl work fine again.

    Best,
    Alana



  • Good Morning,

    Unfortunately that did not work and I had to restore to a previous database backup and update the packages etc.

    Thanks


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation