Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

ASPNET V5 Errors. #4237


User avatar
0
velu created

Hi,

We are using aspnetzero V5, But we are facing some issues.

Please help us to solve this.

[*]Error In GetUsers(InternalserverError) we found error in this code block

var users = await query
                    .OrderBy(input.Sorting)
                    .PageBy(input)
                    .ToListAsync();

Excelption

Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.

[*] Also get Error In these methods. * GetLinkedUsers * GetUserNotifications

Thanks


13 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Are you on v5.0.3?

  • User Avatar
    0
    velu created

    Hi,

    Yes, Its 5.0.3

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Can you try v5.0.4?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu,

    Are you using a different database than Ms Sql ? (Oracle or MySql )database ? If so, have you regenerated all migrations ?

  • User Avatar
    0
    velu created

    Hi,

    We are trying to start application first, That Why we are first use msSQL 2008

    all below errors are in MSSQL2008 and v5.03

    Thanks

  • User Avatar
    0
    velu created

    Hi,

    We are using aspnetzero V5.0.0.0 and Angular 5.0.3.

    Dear Aaron,

    What do you mean by upgrade to v 5.0.4?

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    aspnetzero v5.0.4 (for ASP.NET Core & Angular) is available for download.

    Sorry for the confusion, I wasn't aware that Angular's latest version is v5.0.3.

  • User Avatar
    0
    velu created

    Hi Aaron,

    Please guide us on:

    • How to migrate existing solition.

    Or We download fresh zip from aspnetzero website..

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Yes, download fresh zip from aspnetzero website.

    How to migrate existing solution: https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697

  • User Avatar
    0
    velu created

    We will download the aspnetzero v5.0.4 (for ASP.NET Core & Angular) and will do the necessary checking. If any problem we will get back to you.

  • User Avatar
    0
    bbakermmc created

    If you are using MSSQL 2008 you need to change out your context, EF core defaults to 2012+ standards that have an offset.

    In EF project, in the configure file you need to add the "UseRowNumberForPaging()" option.

    public static void Configure(DbContextOptionsBuilder<PlatformDbContext> builder, string connectionString)
            {
                builder.UseSqlServer(connectionString, o => o.UseRowNumberForPaging());
            }
    
  • User Avatar
    0
    velu created

    HI,

    We try all methods, Still, We are facing the same issue....

    Exception :

    Incorrect syntax near 'OFFSET'.
    Invalid usage of the option NEXT in the FETCH statement.
    

    Please check log file.... <a class="postlink" href="https://drive.google.com/open?id=1sa16aNFBSrnxh3skviYBLterwgmqAfd5">https://drive.google.com/open?id=1sa16a ... erwgmqAfd5</a>

    Request you to solve this issues.

    Thanks.

  • User Avatar
    0
    velu created

    Hi,

    @ BBakerMMC

    Thank You So much for the suggestion,

    After making these changed in the application, Its working fine...

    Thanks.