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

Activities of "sparkyjr"

Thanks for your reply ismcagdas!

Could you please give me a working example of a complete request (with request header and body)? Because I tried, and (passing Abp.TenantId in the request header or request body or request query string) it is not working for me. My method is not authorized.

Thanks and regards, SparkyJr

Hello Alper,

Thanks for your reply!

As I said in my original post:

Problem is, I cannot pass the authentication token in the request header. PowerApps uses the Authorization request header key to pass their own token.

It's not possible to add Authorization key in the request header. That's the problem! Is there any way I can fetch data of specific tenant, if I have Tenancy Name with me?

Thanks and regards, SparkyJr

Hi,

I need to call a Web API (App Service) from PowerApps. Problem is, I cannot pass the authentication token in the request header. PowerApps uses the Authorization request header key to pass their own token. How can I pass my authentication key? Also, is there any other way to fetch records of specific tenant if I can't pass my token into Authorization key?

Thanks in advance!

Regards, SparkyJr

jTable that is used in this framework has the ability to show hide columns. But it does so using a right click on the column header which is not very obvious to the user. Is there any way I can show it as a separate dropdown with normal click( i.e left click).

Thanking you in advance!!!

I am not able to understand why the function CssRewriteUrlWithVirtualDirectoryTransform() is written in MpaBundleConfig.cs. What does that function do? And it has come to my notice that if I don't pass that function as an argument in .Include()(ex .Include(StylePaths.FontAwesome, new CssRewriteUrlWithVirtualDirectoryTransform())) it does not give me .woff errors.

Please explain to me the purpose of the above mentioned function.

My requirement is to update only certain columns of an Entity. The primary key, and any no of other columns from that entity will be supplied by the user, and I have to update this entity with these new values.

One solution for this is using the DBContext as mentioned [https://stackoverflow.com/a/21350893/2313371])

public static void Update(int id, string name, string family)
{
    var _person = new Person() { Id = id , Name = name };

    using (var newContext = new MyDbContext())
    {
        newContext.Persons.Attach(_person);
        newContext.Entry(_person).Property(X => X.Name).IsModified = true;
        newContext.SaveChanges();
    }
}

And the same can be made in a Generic fashion as described here [http://patrickdesjardins.com/blog/how-to-update-specific-field-of-your-entity-with-a-generic-method-and-entity-framework])

public int Update(T entity, Expression<Func<T, object>>[] properties)
{
      DatabaseContext.Entry(entity).State = EntityState.Unchanged;
      foreach (var property in properties)
      {
           var propertyName = ExpressionHelper.GetExpressionText(property);
           DatabaseContext.Entry(entity).Property(propertyName).IsModified = true;
      }
      return DatabaseContext.SaveChangesWithoutValidation();
}

and use it as

...Update(Model, d=>d.Name); //or ...Update(Model, d=>d.Name, d=>d.SecondProperty, d=>d.AndSoOn);

How can we achieve this in our ABP framework?

One way is to fetch the entity, and update necessary columns as described below

int id = 10;
string newName,newAge;
var _person = _personRepository.Get(id);

if(nameColumnModified())
  _person.Name = newName;

if(ageColumnModified())
  _person.Age = newAge;

_personRepository.Update(_person );

I want to know if there is a better way to do this, like the one mentioned above using the DBContext method?

The above fix did not work. Please keep suggesting on how to get rid these error.

We have not upgraded to the latest ASPNetZero version yet. We are still running on ABP Version 0.8.3.0 (from package config) and the ASPNETZero version reported is v1.9.0.1.

Are there other ASPNetZero applications that are running without hiccups on Azure? Other than adding new pages and business logic, the only thing we are using is the Background Jobs feature of ASPNetZero. I have been facing problems with ASPNetZero and Azure for more than a month now and almost always it appears to be sporadic and hence difficult to chase down.

Hi,

Our ABP module seem to be constantly re-initializing in production. It seems to be happening every couple of minutes. I haven't been able to pin point it to a particular trigger, but I do see this happening as frequently at once every 2 - 3 minutes. Sometimes there is as much as 20 minutes delay between log entries.

I don't see this happening every time. First time when I load the app, I see log entry of 19 ABP modules getting loaded, but then I see log entries for 18 ABP modules getting loaded over and over, followed by automapping and web api controller recreation each time.

We have a background service running and there is a call to stop it before each reload. Any ideas what would be triggering reloading of modules and remapping. I suspect this could be the reason for the slow performance I am seeing on Azure.

Here is the truncated logs, similar entries are showing up every so many minutes.

DEBUG 2017-05-08 08:43:09,228 [48   ] Abp.BackgroundJobs.BackgroundJobManager  - Stop background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:09,228 [48   ] BackgroundWorker.ActualUpdationDueWorker - Stop background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
DEBUG 2017-05-08 08:43:09,228 [48   ] Abp.BackgroundJobs.BackgroundJobManager  - WaitToStop background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:09,228 [48   ] BackgroundWorker.ActualUpdationDueWorker - WaitToStop background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
DEBUG 2017-05-08 08:43:10,684 [58   ] Abp.Modules.AbpModuleManager             - Loading Abp modules...
DEBUG 2017-05-08 08:43:11,309 [58   ] Abp.Modules.AbpModuleManager             - Found 18 ABP modules in total.
DEBUG 2017-05-08 08:43:11,324 [58   ] Abp.Modules.AbpModuleManager             - Loaded module: PlanQube.Web.PlanQubeWebModule, PlanQube.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

.............
DEBUG 2017-05-08 08:43:11,340 [58   ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Hangfire.AbpHangfireModule, Abp.HangFire, Version=0.8.3.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-05-08 08:43:11,496 [58   ] Abp.Modules.AbpModuleManager             - 18 modules loaded.
DEBUG 2017-05-08 08:43:11,621 [58   ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted PlanQube (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:15,543 [58   ] Abp.Localization.LocalizationManager     - Initializing 4 localization sources.
DEBUG 2017-05-08 08:43:15,590 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: Abp
DEBUG 2017-05-08 08:43:15,606 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpWeb
DEBUG 2017-05-08 08:43:15,606 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpZero
DEBUG 2017-05-08 08:43:15,621 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: PlanQube
DEBUG 2017-05-08 08:43:15,731 [58   ] Abp.BackgroundJobs.BackgroundJobManager  - Start background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:16,981 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - Found 149 classes defines auto mapping attributes
DEBUG 2017-05-08 08:43:16,981 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - PlanQube.Web.Areas.Mpa.Models.Users.UserPermissionsEditViewModel

....

DEBUG 2017-05-08 08:43:17,605 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - PlanQube.Authorization.Users.Dto.UserListDto+UserListRoleDto
DEBUG 2017-05-08 08:43:17,621 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.Tenants.Dashboard.ITenantDashboardAppService' with service name 'app/tenantDashboard'.
DEBUG 2017-05-08 08:43:17,637 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.Sessions.ISessionAppService' with service name 'app/session'.

......

DEBUG 2017-05-08 08:43:17,918 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.ApplicationServices.ImportData.IImportDataAppService' with service name 'app/importData'.
DEBUG 2017-05-08 08:43:40,135 [58   ] BackgroundWorker.ActualUpdationDueWorker - Start background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
WARN  2017-05-08 08:43:58,713 [37   ] Abp.Auditing.WebAuditInfoProvider        - Could not obtain web parameters for audit info.

Hi ismacagdas, any updates on this?

We are still seeing this happen and are at a loss on how to fix it.

Showing 31 to 40 of 71 entries