Hi Experts,
We have hosted our asp.net zero web application(.net core + angular) on AWS Beanstalk-LINUX based node.js environment. It is working fine. We would like to modify the cache-control settings. To do the same we are trying to introduce the attached web.config file.
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <staticContent> <remove fileExtension=".json" /> <mimeMap fileExtension=".json" mimeType="application/json" /> <mimeMap fileExtension="woff" mimeType="application/font-woff" /> <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> </staticContent> <!-- IIS URL Rewrite for Angular routes --> <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="Strict-Transport-Security" value="max-age=31536000" /> <add name="X-Frame-Options" value="sameorigin" /> <remove name="X-Powered-By" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>
We would like to know where to deploy/place this web.config file in the hosted folder structure.
Thanks
Hi Experts,
We want to remove/override the cache-control properties from the response header. Please see the attached escreenshot below.
. Could you please help us how can we acheive following:
Any help would be much appreciated.
Thanks,
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I have downloaded the version 10.3 and running successfully in localhost. I am unable to get the real time notification. Am I doing something wrong or missing some configuration.
Steps:
Please advise if am doing something wrong.
Regards, Mahendra
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Hi Expert,
There is a CreateOrUpdateDto having Datetime property say CreationTime. Return a NEW instance of this Dto From AppService. Once the Dto returned from AppService, evaluate the following in Chrome Developer Console and below is the result:
`JSON.stringify(result.creationTime)
//While using moment 0001-01-01T00:00:00.000Z
//While using luxon 0001-12-31T23:58:45.000+8759:58`
While posting this Dto back to appService without any change in the above Dto, in case of moment it saves the creationTime correctly but in case of luxon the backend method is not getting called and complain that the data in the creationTime is not valid.
Please advise...
Regards, Mahendra
Hi We were using version ASPNetZero Version 8.0 where moment library was being used. In that when evaluate new Date().toJSON() it was giving the output as 2021-06-03T14:31:55.575Z.
Now we upgraded ASPNetZero to version 10.3 where luxon library is being used. In this when evaluate new Date().toJSON() it gives the output as 2021-06-03T20:03:07.373+05:30.
While debuging why such difference in the output we observed that in version 10.3 in AppPreBootstrap.ts file in configureLuxon function the toISOString and toString function has been overwritten.
While we see our 8.0 version the toJSON and toISOString function of moment has been overwritten that too in the else part of the following if condition: **if (abp.clock.provider.supportsMultipleTimezone) **
whereas in version 10.0 I don't see any else condition.
Could you verify and confirm if the code inside configureLuxon function of AppPreBootstrap.ts file is correct. or there is a mistake of else condition and it should be there.
Regartds, Mahendra
Hi,
We followed your below document to upgrade our project version from 8.0 to 10.3 https://docs.aspnetzero.com/en/common/latest/Version-Updating
The issue that we are facing after upgrade is: GraphQL is not sending the AuthToken in the Authorization Header of the Http Request (see the below screen shot). and hence the call is not entertained by the AppService as the AppService class is decorated with [AbpAuthorize] attribute.
Could you please give me a hint what would have went wrong....and I should double check...
Regards, Mahendra
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
We have about 5000 tenants created in our software. Each of the tenants can scheudle the various jobs in the application using the interface that we have provided. Each job needs to execute a mentod and then geneate and send email to the customer. The scedhule set by each tenant could be different.
I need a suggestion. Should we use the Hangfire to schedule each job. What if we have about 2000 tenants schedule the report for the same time. Will hangfire will be able to execute all jobs in parallel and send the report output the all the customers. What is best suited solution for this case.
Hi Support,
As per your previous suggestions to implement the custom audit log to extend the current default auditlog to have our own additional logging in the new custom table, we have implemented IAuditingStore interface, to store all the audit log records in our custom table (i.e OEAuditLog).We are successfully able to log all the audit records in our custom table which includes default framework audit log and our own custom audit log.
Scenario:
Now, we want to analyze the recorded auditlog for better support to the end customer and smooth operations for our tech support staff.
We are planning to use the ‘CustomData’ field to group the auditlog records because we do not see any other field, which can by default help us to group the auditlog entries.
Please see below the function how we are saving the audit log:
Issue:
In the current function “SaveAsync”, param: auditInfo does not give us any info about the originator of the log. We mean to say that if we get the screen URL, or any custom identifier to identify from where this log entry is originated. We understand that we do get the “ServiceName” and “MethodName” in the auditInfo object. But, this is insufficient because the same service and the method is being called from many places in the whole project.
Therefore, imagine if an error occurs on the screen, then we would like to group the audit log records for this operation done by the user, which leads to an error.
We were thinking if we could pass or override something, which allow us to identify the originator of the log(s) and record the value in the custom data field. This way we inform the ASPNetZero framework that we are currently on XYZ module or screen or entity.
In addition, all the logs, which are generated because of this particular operation in the application, should be grouped with some common identifier, which will help eventually to fetch the relevant records and analyse it better for quick resolutions instead of going through thousands of records to find an issue.
Any help would be much appreciated.
Thanks,
Hi Experts,
We want to show the Exception/Message on frontend with the new line/ break functionality.
For example, we have following entry in the iHub.xml:
<text name="ErrorInProvisioningMessage">Error encountered while provisioning.\r\n We are working to bring the system up for you. Please wait or retry..</text>
We tried to put the \r\n for new line, but L("ErrorInProvisioningMessage") function returns the string like below.
And it does not show the message with the new line.
Please see the attached screenshot for your reference.
Could you please let us know how can we acheive this..
Note : User can also change the language text from GUI..which well be saved in the AbpLanguageTexts table.
Thanks in advance
Best Regards
Hi Expert,
I was doing API load testing through JMeter. When I call RegisterTenant API with load of 10 threads i.e. calling of RegisterTenant 10 times in one go, I keep getting below error.
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call. ---> Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 90) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:feeb5bd9-541f-4497-8a32-ac9d97f1930d Error Number:1205,State:51,Class:13 --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificat...
I tried adding EnableRetryOnFailure() as recommnded in the above error message. See below code:
public static class iVendDbContextConfigurer { public static void Configure(DbContextOptionsBuilder<iVendDbContext> builder, string connectionString) { builder.UseSqlServer(connectionString, option => option.EnableRetryOnFailure()); }
public static void Configure(DbContextOptionsBuilder<iVendDbContext> builder, DbConnection connection)
{
builder.UseSqlServer(connection, option => option.EnableRetryOnFailure());
}
}
But when I add the above the back end does not run and throws following error in the log file:
ERROR 2021-04-07 19:16:52,943 [9 ] e.Diagnostics.ExceptionHandlerMiddleware - An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The configured execution strategy 'SqlServerRetryingExecutionStrategy' does not support user initiated transactions. Use the execution strategy returned by 'DbContext.Database.CreateExecutionStrategy()' to execute all the operations in the transaction as a retriable unit.
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.OnFirstExecution()
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func
3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext() at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable
1 source)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression
1 predicate)
at Abp.Domain.Repositories.AbpRepositoryBase2.FirstOrDefault(TPrimaryKey id) at Castle.Proxies.Invocations.IRepository
2_FirstOrDefault.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation)
at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.IRepository1Proxy.FirstOrDefault(Int32 id) at Abp.MultiTenancy.TenantCache
2.GetTenantOrNull(Int32 tenantId)
at Castle.Proxies.TenantCache2Proxy.GetTenantOrNull_callback(Int32 tenantId) at Castle.Proxies.Invocations.TenantCache
2_GetTenantOrNull.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation)
at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.TenantCache2Proxy.GetTenantOrNull(Int32 tenantId) at Abp.MultiTenancy.TenantCache
2.<>c__DisplayClass7_0.<GetOrNull>b__0()
at Abp.Runtime.Caching.TypedCacheExtensions.<>c__DisplayClass0_02.<Get>b__0(TKey k) at Abp.Runtime.Caching.TypedCacheWrapper
2.<>c__DisplayClass16_0.<Get>b__0(String k)
at Abp.Runtime.Caching.AbpCacheBase2.Get(TKey key, Func
2 factory)
at Abp.Runtime.Caching.TypedCacheWrapper2.Get(TKey key, Func
2 factory)
at Abp.Runtime.Caching.TypedCacheExtensions.Get[TKey,TValue](ITypedCache2 cache, TKey key, Func
1 factory)
at Abp.MultiTenancy.TenantCache2.GetOrNull(Int32 tenantId) at Castle.Proxies.TenantCache
2Proxy.GetOrNull_callback_1(Int32 tenantId)
at Castle.Proxies.Invocations.ITenantCache_GetOrNull.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation)
at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.TenantCache2Proxy.GetOrNull(Int32 tenantId) at Abp.MultiTenancy.TenantStore.Find(Int32 tenantId) at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() at Abp.MultiTenancy.TenantResolver.ResolveTenantId() at Abp.Runtime.Session.ClaimsAbpSession.get_TenantId() at Abp.Domain.Uow.UnitOfWorkBase.SetFilters(List
1 filterOverrides)
at Abp.Domain.Uow.UnitOfWorkBase.Begin(UnitOfWorkOptions options)
at Abp.Domain.Uow.UnitOfWorkManager.Begin(UnitOfWorkOptions options)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler.HandleAuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.
Can you please help me here.
Regards, Mahendra