Base solution for your next web application

Activities of "nikkariman025"

Question

Hi,

First of all, I would like to express my gratitude for upgrading both angular to v8 and metronic to v6.

I just want to know, will you release the source code for metronic v6 like you did for v5? If you do, when is the eta?

Thank you, Cheers.

Hi,

I'm plan to create 2 web projects using Angular with different project name. These project with share single API project. My question is, what is the best approach to generate the project without utilize my project download limit?

Thanks Nik

Hi, any news regarding Angular Universal for AspnetZero? https://support.aspnetzero.com/QA/Questions/4218

Hi, I've encountered an issue with session when I joint with the table license into TenantManager. I managed to get the value that I needed(licenseTypeId) but the session itself cannot be stored when I login through swagger and logout as soon as I logged into web app. Any idea what is the issue and how to solve it? Here's my code:

if (AbpSession.TenantId.HasValue)
            {
                
                output.Tenant = ObjectMapper
                    .Map<TenantLoginInfoDto>(await TenantManager
                        .Tenants
                        .Include(t => t.Edition)
                        .FirstAsync(t => t.Id == AbpSession.GetTenantId()));

                var license = await _licenseRepository.GetAll()
                    .FirstAsync(a => a.TenantId == AbpSession.GetTenantId());

                output.Tenant.LicenseTypeId = license.LicenseTypeId;

                return output;

            }

Your guidance is much appreciated. Thank you.

I'm deploying my Angular and Web application on production server using Ms IIS (windows server). Both web service (Angular and Web API) deploy on same server with different port but the Angular web app having problem to access the web service with this error:

" Failed to load <a class="postlink" href="http://sst01.abc.gov:22742/AbpUserConfiguration/GetAll">http://sst01.abc.gov:22742/AbpUserConfiguration/GetAll</a>: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://sst01.abc.gov, *', but only one is allowed. Origin 'http://sst01.abc.gov' is therefore not allowed access. "

Web.config setting at Angular Web App

<rewrite> <rules> <rule name="Angular Routes" stopProcessing="true"> <match url="." /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /> </conditions> <action type="Rewrite" url="/" /> </rule> </rules> </rewrite> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Headers" value="" /> <add name="Access-Control-Allow-Methods" value="" /> <add name="Access-Control-Allow-Origin" value="" /> </customHeaders> </httpProtocol>

appconfig.json config at angular

{ "remoteServiceBaseUrl": "http://sst01.abc.gov:22742",

"appBaseUrl": "http://sst01.abc.gov", "localeMappings": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" } ] }

Web.config setting at Web API

<httpProtocol> <customHeaders> <remove name="X-Powered-By" />

    &lt;add name=&quot;Access-Control-Allow-Headers&quot; value=&quot;*&quot; /&gt;
    &lt;add name=&quot;Access-Control-Allow-Methods&quot; value=&quot;*&quot; /&gt;
    &lt;add name=&quot;Access-Control-Allow-Origin&quot; value=&quot;*&quot; /&gt;
  &lt;/customHeaders&gt;
&lt;/httpProtocol&gt;

Appsettings.json at Web API

"App": { "ServerRootAddress": "http://sst01.abc.gov:22742/", "ClientRootAddress": "http://sst01.abc.gov/", "CorsOrigins": "http://sst01.abc.gov,http://*" }

Thanks Nik

Thanks Alper...

I'm just created multiple primeng table on same page with different name for table and paginator. My problem are the data only can be refreshed on single table at one time during page load and when I change the page for one table its will affect other table also.

Thanks

Showing 1 to 7 of 7 entries