Base solution for your next web application
Open Closed

Getting error while running for first time #3558


User avatar
0
hkanaiya created

Server Error in '/' Application.

No language defined in this application. 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: Abp.AbpException: No language defined in this application.

Source Error:

Line 59: Line 60: headerModel.Languages = _languageManager.GetLanguages(); Line 61: headerModel.CurrentLanguage = _languageManager.CurrentLanguage; Line 62: Line 63: headerModel.Menu = AsyncHelper.RunSync(() => _userNavigationManager.GetMenuAsync(FrontEndNavigationProvider.MenuName, AbpSession.ToUserIdentifier()));


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @hkanaiya,

    It means that database seed haven't runned or it failed somehow.

    1. If you are using one of MVC 5.x versions, the run "Update-Database" command in package manager console in Visual Studio.
    2. If you are using one of ASP.NET Core versions, then stop your application and try to run it again to insert seed data to your database.

    I assume you have already runned "Update-Database" command for step 2.

    Thanks.

  • User Avatar
    0
    hkanaiya created

    when I try Update-Database command here is what I am getting. Please help. PM> Update-Database Specify the '-Verbose' flag to view the SQL statements being applied to the target database. No migrations configuration type was found in the assembly 'AIIM.Web'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).

  • User Avatar
    0
    hkanaiya created

    I was able to enable migration and then do Update-Database to run seed method

    PM> Update-Database Specify the '-Verbose' flag to view the SQL statements being applied to the target database. No pending explicit migrations. Running Seed method. PM>

    what does the -Verbose comment mean up here?

  • User Avatar
    0
    hkanaiya created

    ok finally got this working. Now trying to figure out how to get it working with Active Directory group instead of individual accounts.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @hkanaiya,

    Actually, we haven't tried it with AD Groups but it's code is very simple, you can change it according to your needs if it does not work.

    Thanks.