Base solution for your next web application
Open Closed

Web deploy failing - No language defined in this application #1591


User avatar
0
theedge created

Hi,

  • ZERO V1.10.0

I have made no changes to the downloaded template. It runs up fine locally, but when I do a web deploy to a fresh IIS website and empty database I get the following exception:

No language defined in this application.

with a call stack as as below. As the database was a brand new one, I can see that the migrations have run and that the database structure has been created. However there is no data any of the tables. I don't want to migrate any data from my development machine, so I don't believe I have to run the migration tool provided as I am using the EF migrations.

What have I missed here?

Line 50: <body class="corporate">
Line 51: 
Line 52:     @Html.Action("Header", "Layout", new { currentPageName = ViewBag.CurrentPageName })
Line 53: 
Line 54:     <div class="main">
[AbpException: No language defined in this application.]
   Abp.Localization.LanguageManager.GetCurrentLanguage() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Localization\LanguageManager.cs:29
   StartupRealm.Web.Controllers.LayoutController.Header(String currentPageName) in E:\DataSyncPoint\DJE\Natiki\Clients\StartupRealm\Development\Platform\StartupRealm.Web\Controllers\LayoutController.cs:41
   lambda_method(Closure , ControllerBase , Object[] ) +139
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.&lt;InvokeActionMethodFilterAsynchronouslyRecursive&gt;b__3d() +72
   System.Web.Mvc.Async.&lt;&gt;c__DisplayClass46.&lt;InvokeActionMethodFilterAsynchronouslyRecursive&gt;b__3f() +386
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.&lt;&gt;c__DisplayClass2b.&lt;BeginInvokeAction&gt;b__1c() +38
   System.Web.Mvc.Async.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__1e(IAsyncResult asyncResult) +186
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.&lt;BeginExecuteCore&gt;b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.&lt;BeginProcessRequest&gt;b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +15
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +27
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1737

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

    Hi,

    Actually, seed data should fill the AbpLanguages table, as it works in your development machine. This is the seed code: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.EntityFramework/Migrations/Seed/Host/DefaultLanguagesCreator.cs">https://github.com/aspnetzero/aspnet-ze ... Creator.cs</a> How did you run migrations? Can you try again and we also will try same to see what happens.

  • User Avatar
    0
    theedge created

    Hi Halil,

    I just did a web deploy and ran up the application. I assumed that the EF migrations would kick in to fill the database with whatever is needed.

    I will add those records manually and see what happens, but I assume that there is other seed data that is missing?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Normally EF migrations should fill the tables as you said. Can you re run migrations on the same database ? Once I had an issue that languages table is not filled for the first time when I run the EF migrations.

  • User Avatar
    0
    theedge created

    I will come back and do some more testing. As I was in a rush for demo purposes I restored the DB on the test server from my development box.

  • User Avatar
    0
    ismcagdas created
    Support Team

    We will be very happy if you do :). Good luck with the demo.