Comments (12)
I added a parameterless constructor, please try again with v0.3.1, thanks.
from notificationservice.
This morning I downloaded the source code locally and added constructors to solve the JSON problem, but I found the following two problems:
- Subscription messages will fail if you do not inherit ITransientDependency
- The constructor I use to pass the message is
new CreateEmailNotificationEto(
CurrentTenant.Id,
userId,
"标题",
body)
Without the userId, I wonder if the two constructors have the same number of arguments?
from notificationservice.
Subscription messages will fail if you do not inherit ITransientDependency
Please check your module dependency.
from notificationservice.
I am using the 0.3.1 package directly now, and still can't receive messages. The error message is as follows
---> (Inner Exception #4) Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'EasyAbp.NotificationService.Provider.Mailing.CreateEmailNotificationEventHandler' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Volo.Abp.EventBus.IocEventHandlerFactory.GetHandler()
at Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, Object eventData, List`1 exceptions)
at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData, List`1 exceptions)
at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData)
at Volo.Abp.EventBus.Rebus.RebusDistributedEventHandlerAdapter`1.Handle(TEventData message)
at Rebus.Pipeline.Receive.HandlerInvoker`1.Invoke()
at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.ActivateHandlersStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleRoutingSlipsStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.DeserializeIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.DataBus.ClaimCheck.HydrateIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.FailFast.FailFastStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.Simple.SimpleRetryStrategyStep.DispatchWithTrackerIdentifier(Func`1 next, String identifierToTrackMessageBy, ITransactionContext transactionContext, String messageId, String secondLevelMessageId)<---
from notificationservice.
https://docs.abp.io/en/abp/latest/Module-Development-Basics#module-dependencies
from notificationservice.
Sorry, I read the documentation, but I still don't understand why. I knew I needed to introduce modules, so I did:
I don't think the TryAddTransient below needs to be added to my module either, but I tried it and it doesn't work either. Thank you for your help
from notificationservice.
Could you please try this code:
context.Services.AddTransient<CreateEmailNotificationEventHandler>();
from notificationservice.
Very good. After adding this sentence, emails can be sent normally, and parameters can also be passed normally. I hope it can be added to the document, so that other people will not encounter this problem
from notificationservice.
Very good. After adding this sentence, emails can be sent normally, and parameters can also be passed normally. I hope it can be added to the document, so that other people will not encounter this problem
from notificationservice.
There is another problem. I didn't mention a new issue. I just wrote it here.
I used SMS to send the notification, but after execution, the database notification table saved the data, but did not save the passed parameters:
Send method:
from notificationservice.
There is another problem
Please create a new issue, thank you.
from notificationservice.
There is another problem
Please create a new issue, thank you.
ok It's already created.
from notificationservice.
Related Issues (9)
- 这个模块会开发吗? HOT 2
- Will this module support Multitenancy? HOT 1
- Sending SMS notification table does not save the passed parameters HOT 3
- IDistributedEventHandler<CreateEmailNotificationEto> has not been registered.
- 升级到abp7 与发行版后报错 HOT 1
- Sample site not working HOT 1
- trust https in Web.Host project
- System.Collections.Generic.KeyNotFoundException: 'The given key 'PM' was not present in the dictionary.' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notificationservice.