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

Activities of "maharatha"

I am getting the below issue in Azure:

@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.

is there any other place other than the Language table I should look for

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 !!!!

Hi Hilkan -

I am trying to implement Redis Cache looking at the way you have implemented UserPermissionCache. Basically I will be storing a table data into the Cache let's say "AutofillData" The table has ID, Name, few more fields

I have named my Cache to be AutofillCache and plan to store with the following key and value

Key : TenantID:OrganizationID:Autofill

Value : Should I use HashSet to store the data or do you have any other recommendations ?

I need to also update the values when items are added or modified in the table.

Could you help me in accomplishing this ?

Thank You

I want to seed some tenant related data when a Tenant is created.

This is where I think I should seed data :

protected override void Seed(EntityFramework.CORPACCOUNTINGDbContext context) { context.DisableAllFilters();

        if (SeedMode == SeedMode.Host)
        {
            //Host seed
            new InitialHostDbBuilder(context).Create();

            //Default tenant seed (in host database).
            new DefaultTenantBuilder(context).Create();
            new TenantRoleAndUserBuilder(context, 1).Create();
        }
        else if(SeedMode == SeedMode.Tenant)
        {
            // Here is where I plan to seed the data.
        }

        context.SaveChanges();
    }

But how do I get the tenant to insert data by Tenant

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

Showing 261 to 270 of 326 entries