Base solution for your next web application

Activities of "billyteng"

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 11.2
  • What is your product type (Angular or MVC) Angular
  • What is product framework type (.net framework or .net core)? .net core

Hi @ismcagdas,

We are developing Flutter mobile app via using aspnetzero as backend api. Now we want to add chat and push notification functions on flutter. Could you give us some suggestions or links to reference ? I would appreciate your assistance with this matter.

"version": "11.1.0", Angular net core

Hi Team, My service side is all ok. Swagger browsing is ok. Then I run refresh.bat in command prompt. It is also ok. I created entity using power tool is nice in service-proxies file. I try it again and again. It is showing same error. But after i run npm start in VS code, it is showing me the following bugs.

./src/app/shared/layout/nav/menu-search-bar/menu-search-bar.component.ts:47:35-52 - Error: export 'NameValueOfString' (imported as 'NameValueOfString') was not found in '@shared/service-proxies/service-proxies' ./src/app/shared/layout/notifications/UserNotificationHelper.ts:123:26-41 - Error: export 'EntityDtoOfGuid' (imported as 'EntityDtoOfGuid') was not found in '@shared/service-proxies/service-proxies' Error: src/app/admin/demo-ui-components/demo-ui-selection.component.ts:4:40 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.

4 import { DemoUiComponentsServiceProxy, NameValueOfString } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~ Error: src/app/admin/maintenance/maintenance.component.ts:4:31 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfString'.

4 import { CachingServiceProxy, EntityDtoOfString, WebLogServiceProxy } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~ Error: src/app/admin/organization-units/organization-tree.component.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'ListResultDtoOfOrganizationUnitDto'.

4 ListResultDtoOfOrganizationUnitDto, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: src/app/admin/tenants/tenants.component.ts:9:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.

9 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~

Error: src/app/admin/users/edit-user-permissions-modal.component.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.

4 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~ Error: src/app/admin/users/users.component.ts:7:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.

7 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~

Error: src/app/admin/webhook-subscription/create-or-edit-webhook-subscription-modal.component.ts:6:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.

6 NameValueOfString, ~~~~~~~~~~~~~~~~~

Error: src/app/shared/common/lookup/common-lookup-modal.component.ts:4:24 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'PagedResultDtoOfNameValueDto'.

4 import { NameValueDto, PagedResultDtoOfNameValueDto } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: src/app/shared/layout/nav/menu-search-bar/menu-search-bar.component.ts:2:10 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.

2 import { NameValueOfString } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~

Error: src/app/shared/layout/notifications/UserNotificationHelper.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfGuid'.

So that, i have been checked with service-proxies file of old project. Old file have export class NameValueOfString implements INameValueOfString { name!: string | undefined; value!: string | undefined; .. .. }

export interface INameValueOfString { name: string | undefined; value: string | undefined; }

Current file export class NameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e implements INameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e { name!: string | undefined; value!: string | undefined; .. .. }

export interface INameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e { name: string | undefined; value: string | undefined; }

Why its happen?

Please help me. Thanks all

"version": "11.1.0", Angular net core

I have a sql view which use old project. Now i use that sql server view in asp.net zero project. I wrote customize repository like you reference. Then I run project. It is ok in server. The server reterive datas depend view query. But there is showing "An internal error occurred" message in frontend angular. I have alreay debug on server side. Serverside is ok. Please help me. You can see my codes. I'm looking forward your answer.

application.shared layer public class viewReservationFolio : CreationAuditedEntity<Guid> {
...... }

 public class InputSearch : PagedAndSortedResultRequestDto
{       
   ....
}  

EntityFrameworkCore Layer

  public class ReservationRepository : BEZNgCoreRepositoryBase&lt;viewReservationFolio, Guid&gt;, IReservationRepository
{
    private readonly IActiveTransactionProvider _transactionProvider;

    public ReservationRepository(IDbContextProvider&lt;BEZNgCoreDbContext&gt; dbContextProvider, IActiveTransactionProvider transactionProvider)
        : base(dbContextProvider)
    {
        _transactionProvider = transactionProvider;
    }
    public async Task&lt;List&lt;viewReservationFolio&gt;> GetViewReservationFolio(InputSearch input)
    {
        var sqlText = QueryText(input);
        var result = new List&lt;viewReservationFolio&gt;();
        if ((input.IsCompany == false && input.IsGroup == false) || (input.IsCompany == true && input.IsGroup == true && input.IsCancel == false && input.IsPending == false && input.IsNoShow == false &&
            input.IsReservation == false && input.IsHouse == false && input.IsCheckOut == false))
        {
            result = new List&lt;viewReservationFolio&gt;();
        }           
        else
        {
            await EnsureConnectionOpenAsync();
            var arams = GetParameterValue(input);
            using (var command = CreateCommand(sqlText, CommandType.Text, arams))
            {
                using (var dataReader = await command.ExecuteReaderAsync())
                {
                    try
                    {
                        while (await dataReader.ReadAsync())
                        {
                            viewReservationFolio v = new viewReservationFolio();                                                            
                            ........                             
                            result.Add(v);

                        }
                        dataReader.Close();
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
            }
            await EnsureConnectionCloseAsync();
        }

        return result;

    }      

Core Layer public interface IReservationRepository : IRepository<viewReservationFolio, Guid> {
Task<List<viewReservationFolio>> GetViewReservationFolio(InputSearch input); }

Application Layer
[AbpAuthorize(AppPermissions.Pages_Reservations)]
public class ReservationAppService : BEZNgCoreAppServiceBase, IReservationAppService
{
    private readonly IApplicationLanguageManager _applicationLanguageManager;
..........................
    public ReservationAppService(
        IApplicationLanguageManager applicationLanguageManager,
     ...................)
    {
        _applicationLanguageManager = applicationLanguageManager;
       .....
    }

    public async Task&lt;List&lt;StayDateDto&gt;> GetStayDate()
    {           
        
    }              
    
    public async Task&lt;PagedResultDto&lt;GetReservationFolioDto&gt;> GetViewReservationFolioToday(InputSearch input)
    {            
        var vw = _reservationRepository.GetViewReservationFolio(input);
        var pagedAndFilteredRegistration = vw.Result.AsQueryable();
        pagedAndFilteredRegistration=pagedAndFilteredRegistration.OrderBy(input.Sorting ?? "CheckInDate,DocNo asc").PageBy(input);

        var totalCount = pagedAndFilteredRegistration.Count();

        var dbList = pagedAndFilteredRegistration.ToList();
        var results = new List&lt;GetReservationFolioDto&gt;();

        foreach (var o in dbList)
        {
            var res = new GetReservationFolioDto()
            {
                GetViewResFolio = ObjectMapper.Map&lt;viewReservationFolioDto&gt;(o)
            };

            results.Add(res);
        }

        return new PagedResultDto&lt;GetReservationFolioDto&gt;(
            totalCount,
            results
        );
        
    }

Note: results list incluse datas.

Log File

INFO 2022-05-23 01:20:11,930 [orker] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.0 initialized 'BEZNgCoreDbContext' using provider 'Microsoft.En ERROR 2022-05-23 01:20:21,678 [orker] Mvc.ExceptionHandling.AbpExceptionFilter - This SqlTransaction has completed; it is no longer usable. System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.

INFO 2022-05-23 01:20:21,691 [orker] c.Infrastructure.ControllerActionInvoker - Executed action BEZNgCore.Reservations.ReservationAppService.GetViewReservationFolioToday (BEZNgCore.Application) in 11899.6915ms INFO 2022-05-23 01:20:21,691 [orker] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'BEZNgCore.Reservations.ReservationAppService.GetViewReservationFolioToday (BEZNgCore.Application)' INFO 2022-05-23 01:20:21,691 [orker] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished HTTP/2 GET https://localhost:port/api/services/app/Reservation/GetViewReservationFolioToday?Filter=&StayDate=default&IsReservation=true&IsHouse=true&IsCheckOut=true&IsCompany=true&IsGroup=true&FirstName=&LastName=&RoomNo=&FolioNo=&CompanyName=&GroupName=&VoucherNo=&TelNo=&MobileNo=&Email=&Passport=&RateCode=&LoyaltyNo=&AccNo=&PostalCode=&GDS=&Group1Key=&Group2Key=&Group3Key=&Group4Key=&RateTypekey=&Sorting=&SkipCount=0&MaxResultCount=10 - - - 500 207 application/json;+charset=utf-8 11953.9042ms INFO 2022-05-23 01:20:23,974 [orker] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.0 initialized 'BEZNgCoreDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: None

Frontend https://localhost:port/api/services/app/Reservation/GetViewReservationFolioToday?.. {"result":null,"targetUrl":null,"success":false,"error":{"code":0,"message":"An internal error occurred during your request!","details":null,"validationErrors":null},"unAuthorizedRequest":false,"__abp":true}

  • 10.1
  • Angular
  • net core

Hi Sir,

I have to create new page layout. That layout same with login layout in angular. My layout must be left side is textboxs and so on, right side is show google map. Afte login, that layout page must be show. How do it? I created not only a newpage module but also newpage component in main module. But side-bar-menu and top-bar-menu still showing. I want to main layout like login page layout ( not need login form). Can it be?

Thanks AKL

  • version 10.1
  • Angular
  • .net core

Hi Support,

We developed with aspnet.zero angular and .net core ( ver 10.1 ) and now ready to deploy to our own IIS server. When we developed with VS 2019, everything is working fine. After we host local IIS or Server IIS. When we browser host service, we got this problem (" No XML encryptor configured. Key {b6b06ed3-7fee-4447-a4f5-4959b7e497cb} may be persisted to storage in unencrypted form. " )and we tried many ways to solve . Unfortunately we still cannot get the solutions. Could you please help publish and host attachement project on your local iis or server iis and find out the solutions for us? My boss forcing me to release the project.We are looking forward to hearing from you.

Thanks and Regards AKL

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 10.1
  • What is your product type (Angular or MVC)? angular
  • What is product framework type (.net framework or .net core)? .net core

If issue is about UI

  • Which theme are you using? Default

Hi support,

Please kindly suggest me that how to add PhoneNumber to register method and overwrite. I want to login with email or PhoneNumber also.

Thanks

  • 10.1.0
  • Angular
  • .net core

I'm thinking to extend columns in User Table (RoomNo,DocNo) Your default Login is (usernameORemail and Password). It check match (username column or email column) and password column in User Table. Then Login success or not result out. Now, I want to change that logic. My Login logic is (usernameOrEmail and roomnoOrdocno). It check match (username column or email column) and (roomno column or docno column) in User Table. Then Login success or not result out. Is that logic can be success? If so that, please guid me step by step. Which methods I have change? Which controller, class I have to need change? Please ......help me

At the moment, I have not extended above two columns in user table. In user table have username same multiple rows. when i login show 'Mvc.ExceptionHandling.AbpExceptionFilter - Sequence contains more than one element System.InvalidOperationException: Sequence contains more than one element'. So that i must to extend above two columns for user identity login. Is it login ok?

Thanks

  • What is your product version? 10.1.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net Core

I want to show datetime dd/MM/YYYY in <input class="form-control m-input" id="MinRequestDateFilter" name="MinRequestDateFilter" type="datetime" bsDatepicker datePickerLuxonModifier
placeholder="{{ l('From RequestDate') }}"
[(ngModel)]="minRequestDateFilter" />

I have type luxonFormat: "F" and luxonFormat: "dd/MM/YYYY". It is not ok. My project use dd/MM/YYYY format datetime. It is showing only MM/dd/YYY fomat.

  • What is your product version?
  • Product Version is 10.0.0
  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net core
  • What is ABP Framework version?
  • 6.1

I need some data to store in session which is reuse after logined. I had override CreateAsync(User user) method in UserClaimsPrincipalFactory.cs. Look it

public override async Task CreateAsync(User user)

{
var claim = await base.CreateAsync(user);
        var resObj = (from res in _reservationRepository.GetAll()
                      join gs in _guestRepository.GetAll() on res.GuestKey equals gs.Id
                      join r in _roomRepository.GetAll() on res.RoomKey equals r.Id
                      where (res.Status == 1 || res.Status == 2) && (gs.EMail == user.EmailAddress || gs.LastName == user.UserName)
                      select new 
                      {
                          DocNo = res.DocNo,
                          ReservationKey = res.Id,
                          GuestKey = gs.Id
                      }).FirstOrDefault();
        if (resObj != null)
        {
            claim.Identities.First().AddClaim(new Claim("Application_DOCNO", resObj.DocNo));
        }

        return claim;// it is ok. Docno value have in claims.
    }

Then I created MyAppSession Class folowing :

    public class MyAppSession : ClaimsAbpSession, ITransientDependency,IMyAppSession
{
    public MyAppSession(
    IPrincipalAccessor principalAccessor,
    IMultiTenancyConfig multiTenancy,
    ITenantResolver tenantResolver,
    IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) :
    base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider)
    {
    }
    public string DOCNO
    {
        get
        {
            var userDocClaim = PrincipalAccessor.Principal?.Claims.FirstOrDefault(c => c.Type == "Application_DOCNO");
            if (userDocClaim == null || string.IsNullOrEmpty(userDocClaim?.Value))
            {
                return null;
            }

            return userDocClaim.Value;
        }

    }

This is IMyAppSession Interface

public interface IMyAppSession
{
string DOCNO { get; }
}

This is session value retrive class

public class TokenAuthController : BEZNgCoreControllerBase
{
private readonly IMyAppSession \_p;
public TokenAuthController(IMyAppSession p)
{
\_p = p;
}
    public string GetSession()
    {
        return _p.DOCNO;// Here value is null. Why?
    }
}

Is there anything need to change? Please help me.

What is your product version? 10.1 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .net 5

After I downloaded latest version 10.1 and run Update-Database to create database, db is successfully created. Then I added modelBuilder.ChangeAbpTablePrefix<Tenant, Role, User>("") to remove abp prefix. I run Add-Migration "Remove_ABP_Prefix" first then run Update-Database. I got this screen shot errors. Do I need to change anything?

Showing 1 to 10 of 11 entries