We are using ASP.NET Zero 10.2. ASP.NET Core 5 and Angular 11.
I would like to be able run a Domain Service method only when the app is started.This method needs a unit of work so that I can work with my repositories. Is this possible?
I was trying to call it from <projectname>CoreModules.cs
ie like this
public override void PostInitialize() { IocManager.RegisterIfNot<IChatCommunicator, NullChatCommunicator>(); IocManager.Resolve<ChatUserStateWatcher>().Initialize(); IocManager.Resolve<AppTimes>().StartupTime = Clock.Now; IocManager.Resolve<IMyDomainService>().Run(); }
But the UnitOfWork attribute I used for the Run() method would not work. ie
[UnitOfWork] public void Run() { DoSomething(); }
I kept getting the following exception:
Abp.AbpException: Unknown filter name: MayHaveTenant. Be sure this filter is registered before. at Abp.Domain.Uow.UnitOfWorkBase.GetFilterIndex(String filterName) at Abp.Domain.Uow.UnitOfWorkBase.SetFilterParameter(String filterName, String parameterName, Object value) at Abp.Domain.Uow.UnitOfWorkBase.SetTenantId(Nullable1 tenantId, Boolean switchMustHaveTenantEnableDisable) at Abp.Domain.Uow.UnitOfWorkBase.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkManager.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobs(Int32 maxResultCount) at Abp.BackgroundJobs.BackgroundJobManager.DoWork() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Threading.BackgroundWorkers.PeriodicBackgroundWorkerBase.Timer_Elapsed(Object sender, EventArgs e)
Many thanks for you help.
Hi,
I want to set up data APIs to be consumes by my Reporting WebApp like this: https://demodata.grapecity.com/swagger/index.html?urls.primaryName=Restful%20NorthWind
This may be a dumb question, BUT, in ASP.NET Zero it appears that I have to do the following to generate my GETs:
public ListResultDto<OrderDataDto> GetOrders()
public OrderDataDto GetOrder(EntityDto input)
What I really want to do is:
public ListResultDto<OrderDataDto> Orders()
public OrderDataDto Orders(EntityDto input)
ie
GET /api/services/app/Data/Orders
GET /api/services/app/Data/Orders/{id}
But this ends up with an error in Swagger. How can I use REST HTTP verbs properly with Data Object names such as with: https://demodata.grapecity.com/swagger/index.html?urls.primaryName=Restful%20NorthWind???
Many thanks
Product Version: v9.2.1 Product Type: Angular Framework: .NET Core
Issue: when I go to https://cc-api-svc-p-aue.azurewebsites.net/ it keeps redirecting to Error?statusCode=404.
I have just deployed server side to Azure. I have done this before with oyther ASP.NET Zero webapps, but this time I just cant get it to work. The database connection is fine. Nothing is being written to log.txt
I have a har file but I cant see how to attach it to this issue.
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I have downloaded and am using your latest version. But am seeing some weird problems. For now I will just report one that is easy to see:
In the Chat bar Component you have:
<div *ngIf="message.side === 1" class="d-flex flex-column mb-5 align-items-start">
<div class="d-flex align-items-center">
<div class="symbol symbol-circle symbol-40 mr-3">
<a target = "_blank" rel="noopener noreferrer" title="" href="{{profilePicture}}"><img src="{{profilePicture}}" alt=""></a>
</div>
<div>
<a href="#"
class="text-dark-75 text-hover-primary font-weight-bold font-size-h6">{{currentUser.userName}}</a>
<time
class="text-muted font-size-sm timeago">{{ getFixedMessageTime(message.creationTime) | momentFromNow }}</time>
{{message.readStateCheck}}
</div>
</div>
</div>
But if you look at ChatMessageDto - ReadStateCheck is not a property.