Base solution for your next web application

Activities of "pankajmathur"

Hi,

I have downloaded the Module Zero (5.4) having ABP (3.6.1) with MVC and JQuery Template project for .Net Core 2.0. I am following the document <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/SignalR-AspNetCore-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a> for implementing SignalR.

I installed the Nuget packet Abp.AspNetCore.SignalR in the .Web.Core Project. Then in the .Web.Mvc project, startup.cs file I wrote the first line as #define FEATURE_SIGNALR

Now the below line (after using statements )(these lines were already there in the project) throwing errors... #if FEATURE_SIGNALR using Owin; using Abp.Owin; using Microsoft.AspNet.SignalR; using Microsoft.AspNet.SignalR.Hubs; using Abp.AspNetZeroCore.Web.Owin; using Owin.Security.AesDataProtectorProvider; #endif

Also following line in Configure method of Startup.cs is not compiling. #if FEATURE_SIGNALR //Integrate to OWIN app.UseAppBuilder(ConfigureOwinServices); #endif

Also following line of code is not compiling....

#if FEATURE_SIGNALR private static void ConfigureOwinServices(IAppBuilder app) { GlobalHost.DependencyResolver.Register(typeof(IAssemblyLocator), () => new SignalRAssemblyLocator()); app.Properties["host.AppName"] = "iVend365";

        app.UseAbp();
        app.UseAesDataProtectorProvider();

        app.MapSignalR();
    }

#endif

Please help me what should I fix to proceed and complete the SignalR implementation.....

Regards, Mahendra

Question

Hi,

I am using

  1. ASPNetZero 4.5 (MVC with Jquery)
  2. ABP 3.6.1
  3. .Net Core 2.0

I was following this document to implement SignalR <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/SignalR-AspNetCore-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a>

Following the above document section "Client-Side (jQuery)", When I install the package "Abp.Web.Resources", it does not copy the following file "~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js"

What I noticed: In the Web Project Dependencies, I see the attached error (See the attachment). The error message in the attachment is : "Package Abp.Web.Resources 3.6.1" was restored using '.NETPortable, version=v4.0, Profile=Profile259, .NetFramework, Version=4.6.1' instead of the project target '.NetCoreApp, Version=v2.0'. This package may not be fully compatible with your project.

My question is Can I even use the signalR in the project template that I have downloaded? If yes, what is the way to proceed?

Regards, Mahendra

Question

Hi,

Till the time we were on ABP version 3.0.0, everything was fine. Recently we upgraded all the Nugets of ABP from 3.0.0 to 3.6.0 and today again updated all the ABP Nugets to 3.6.1 along with the associated nugets to the latest version..

Now in the SessionAppService.cs class, I am getting the AutoMapper Error in the code written inside the If block.

if (AbpSession.TenantId.HasValue) {

            output.Tenant = ObjectMapper
                                .Map&lt;TenantLoginInfoDto&gt;(await TenantManager
                                    .Tenants
                                    .Include(t => t.Edition)
                                    .FirstAsync(t => t.Id == AbpSession.GetTenantId()));
        }

I am getting following error. Please help me to resolve this error....

Mapping types: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto

Type Map configuration: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto

Property: Edition AutoMapper.AutoMapperMappingException: Error mapping types.

Mapping types: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto

Type Map configuration: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto

Property: Edition ---> AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters

Edition -> EditionInfoDto (Destination member list) Abp.Application.Editions.Edition -> CitiXsys.iVend365.Sessions.Dto.EditionInfoDto (Destination member list)

Unmapped properties: TrialDayCount MonthlyPrice AnnualPrice IsHighestEdition IsFree

at AutoMapper.ConfigurationValidator.AssertConfigurationIsValid(IEnumerable1 typeMaps) at lambda_method(Closure , Tenant , TenantLoginInfoDto , ResolutionContext ) --- End of inner exception stack trace --- at lambda_method(Closure , Tenant , TenantLoginInfoDto , ResolutionContext ) at lambda_method(Closure , Object , Object , ResolutionContext ) at AutoMapper.Mapper.AutoMapper.IMapper.Map[TDestination](Object source) at CitiXsys.iVend365.Sessions.SessionAppService.<GetCurrentLoginInformations>d__0.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Application\Sessions\SessionAppService.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() in D:\Github\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 120 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at CitiXsys.iVend365.Web.Session.PerRequestSessionCache.<GetCurrentLoginInformationsAsync>d__3.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Core\Session\PerRequestSessionCache.cs:line 33 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at CitiXsys.iVend365.Web.Views.Shared.Components.TenantChange.TenantChangeViewComponent.<InvokeAsync>d__2.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Mvc\Views\Shared\Components\TenantChange\TenantChangeViewComponent.cs:line 18 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.<InvokeAsyncCore>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.<InvokeAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.<InvokeCoreAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at AspNetCore._Views_Account__Layout_cshtml.__Generated__TenantChangeViewComponentTagHelper.

Hi, I am trying to delete 4 records, followed by insert 4 records. Both operations are happening inside UnitOfWork. See Code below. using (var unitOfWork = UnitOfWorkManager.Begin()) {

                            //Delete existing settings
                            _AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthToken");
                            _AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthTokenSecret");
                            _AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthExpiresIn");
                            _AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthExpiresAt");

                             //Insert new settings
                            AddXeroIntegrationSetting("OAuthToken", oauth_token);
                            AddXeroIntegrationSetting("OAuthTokenSecret", oauth_token_secret);
                            AddXeroIntegrationSetting("OAuthExpiresIn", oauth_expires_in);
                            AddXeroIntegrationSetting("OAuthExpiresAt", oauth_expires_at.ToString());


                            unitOfWork.Complete();
                        }

But, its not committing into the database. Could you please advise, what is wrong here?

Regards, Mahendra

Question

Hi,

I have added, AbpAuthorize attribute as follows on my ProductGroup Controller class. [AbpAuthorize(AppPermissions.Pages_Products_ProductGroup)]

Now when a user who do not have permission on ProductGroup, type in the URL of <a class="postlink" href="http://localhost:62114/Mpa/ProductGroup">http://localhost:62114/Mpa/ProductGroup</a>, then instead of throwing the error page of UnAuthorized Access (i.e. Error403.cshtml), it throws him to the login page.

Could you please advise what am I doing wrong. I want the user to show the Unauthorized Page (i.e. Error403.cshtml). How can I achieve this?

Regards, Mahendra

Question

How can I get all the permission for a user on which the permission has been granted.

Hi there,

My first question is how can I find out on which version of ASPNetZero and ABP my current project is?

Secondly, I was waiting for the signalR since long. I recently went to the page <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents">https://aspnetboilerplate.com/Pages/Documents</a> and I saw that ABP has now come up with signalR. But when I am trying to install the nuget package using Package Manager, it fails. See the below error (The same is attached in the word file). Please advice whats wrong in installing the "Abp.AspNetCore.SignalR" Nuget Package.

Regards, Mahendra

PM> Install-Package Abp.AspNetCore.SignalR -Version 3.4.0-preview2 GET <a class="postlink" href="https://api.nuget.org/v3/registration3-gz-semver2/abp.aspnetcore.signalr/index.json">https://api.nuget.org/v3/registration3- ... index.json</a> GET <a class="postlink" href="https://nuget.telerik.com/nuget/Packages(Id='Abp.AspNetCore.SignalR',Version='3.4.0-preview2'">https://nuget.telerik.com/nuget/Package ... -preview2'</a>) OK <a class="postlink" href="https://api.nuget.org/v3/registration3-gz-semver2/abp.aspnetcore.signalr/index.json">https://api.nuget.org/v3/registration3- ... index.json</a> 1097ms Error finding repository for 'https://nuget.telerik.com/nuget': An error occurred while retrieving package metadata for 'Abp.AspNetCore.SignalR.3.4.0-preview2' from source 'telerik.com'. A task was canceled. Restoring packages for D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Mvc\CitiXsys.iVend365.Web.Mvc.csproj... GET <a class="postlink" href="https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.signalr/index.json">https://api.nuget.org/v3-flatcontainer/ ... index.json</a> GET <a class="postlink" href="https://nuget.telerik.com/nuget/FindPackagesById(">https://nuget.telerik.com/nuget/FindPackagesById(</a>)?id='Microsoft.AspNetCore.SignalR' OK <a class="postlink" href="https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.signalr/index.json">https://api.nuget.org/v3-flatcontainer/ ... index.json</a> 1160ms OK <a class="postlink" href="https://nuget.telerik.com/nuget/FindPackagesById(">https://nuget.telerik.com/nuget/FindPackagesById(</a>)?id='Microsoft.AspNetCore.SignalR' 2933ms Install-Package : Unable to find package Microsoft.AspNetCore.SignalR with version (>= 1.0.0-preview1-28189)

  • Found 3 version(s) in nuget.org [ Nearest version: 1.0.0-alpha2-final ]
  • Found 0 version(s) in Microsoft Visual Studio Offline Packages
  • Found 0 version(s) in telerik.com At line:1 char:1
  • Install-Package Abp.AspNetCore.SignalR -Version 3.4.0-preview2
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.Inst 
    allPackageCommand
    
    

Package 'ZohoBooks 1.0.0' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. Install-Package : Package restore failed. Rolling back package changes for 'CitiXsys.iVend365.Web.Mvc'. At line:1 char:1

  • Install-Package Abp.AspNetCore.SignalR -Version 3.4.0-preview2
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.Inst 
    allPackageCommand
    
    

Time Elapsed: 00:00:08.6100766

Question

Hi,

We have a requirement to not display all services and service methods that I have in my application. I found a setting on internet that decorating the service class with the following attribute hides the complete service and decorating the service class method with the same attribute hides the service method.

[ApiExplorerSettings(IgnoreApi = true)]

after decorating with above attribute thought its not showing in the Swagger (as desired), but it fails my application.

What is failing:

From the javascript the follwoing code (which works well without decorating with above attribute) always returns undefined (after decorating with above attribute)

var _Service = abp.services.app.goodsReceipt;

Please help, how to hide service and/or service methods from swagger.

Regards, Mahendra

Hi,

While we create a new tenant on azure it takes almost 3 to 5 minutes to create a new tenant. While analyzing where exactly it is taking time, we found that the following statement in the TenantManager.cs class takes too much of time to finish execution. _abpZeroDbMigrator.CreateOrMigrateForTenant(tenant);

Any idea what must be wrong? Please advice how can we increase the performance of creating a new tenant?

Regards, Mahendra

Question

Hi, We have a requirement that whenever a new tenant database is created it should automatically be added to a SQL Elastic Pool. Has anyone implemented the same?

Showing 11 to 20 of 44 entries