Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "maharatha"

Any update on how to troubleshoot ?

o 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 50: <body class="corporate"> Line 51: Line 52: @Html.Action("Header", "Layout", new { currentPageName = ViewBag.CurrentPageName }) Line 53: Line 54: <div class="main">

Source File: d:\home\site\wwwroot\Views\Layout_Layout.cshtml Line: 52

Stack Trace:

[AbpException: No language defined in this application.] Abp.Localization.LanguageManager.GetCurrentLanguage() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Localization\LanguageManager.cs:29

Note : It works fine when I debug from my Visual Studio and connect to Azure DB

For Redis Cache just buy the Microsft Redis Cache and it will provide you with a connection string which you can use.

The error which you are getting is data connection issue NOT redis cache issue

This is what my experience in Azure since the last two days, I started getting the error which you are getting now.

I solved it by this way :

Go to your web app and then go to the mobile settings and add the data connection there and name the data connection as Default. Once you do that it automatically appears in theapplication setting.

Then I removed all the resource to make sure I know what I am doing. At this point I am able to connect to the azure DB from my local host and work. But somehow the trick I mentioned you above doesn't work for me now.

Now I am stuck with error :

@Html.Action("Header", "Layout", new { currentPageName = ViewBag.CurrentPageName })

The database is fine becuase it works when I connect my local system to the database.

So I am not sure what could be causing this issue

There is just one word that describe you :: Awesome !!!!

Thank You

to add to it :

I was using SQL Server 2016 and Windows Srver 2016. Now I tested with a SQL 2012 and Windows Server 2012 and it works fine

to add to this I was able to make it work on my laptop where IIS and DB are on the same machine . The moment I moved it to our development server where IIS and DB are in different server I start getting the issue discussed here.

I tried all possible troubleshooting but still unable to resolve.

FYI : The firewall is disabled.

Hi Hilkan -

Thanks for coming to rescue again. I had gone through the documentation. The migration script also generated the following code :

DropForeignKey("dbo.XYZ_Settings", "TenantId", "dbo.XYZ_Tenants");

So when I dug deep I realized the ForeignKey constraint wasn't getting dropped though the migration script was working fine.

So I had to alter the migration script and add the SQL Script to drop the foreign key constraint

Sql(@" if exists (select 1 from sys.objects where name = 'FK_dbo.AbpSettings_dbo.AbpTenants_TenantId' and type='F') begin alter table XXX_Settings drop constraint [FK_dbo.AbpSettings_dbo.AbpTenants_TenantId] end");

Have no clue why this is happening.

Is it because I am renaming the tables ? Just a wild guess

But everything works for me now.

Thank you so much for being so patient

Weird Issue :

I am almost there :

  1. When I try to create a tenant in a separate database I am able to do it but once the database is created I am facing foreign key violation issue so the Tenant record is not getting save though the database is created :

System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_dbo.AbpRoles_dbo.AbpTenants_TenantId". The conflict occurred in database "ert", table "dbo.XXX_Tenants", column 'Id'. The statement has been terminated. at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__167_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult() at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.<ExecuteAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult() at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.<UpdateAsync>d__0.MoveNext() --- End of inner exception stack trace --- at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.<UpdateAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown ---

Showing 161 to 170 of 206 entries