I'm having an issue where methods called in a signal R hub are returning camel cased. I see in the boilerplate documentation there is a section in signalR on how to override the default behavior
[https://aspnetboilerplate.com/Pages/Documents/SignalR-Integration#pascalcase-vs-camelcase])
I can't figure out how to implement this correctly. I've added the below snippet in the Startup.cs before and after app.MapSignalR(). I've added it to the Pre-initialize of the web module, I've added all of my assemblies; I'm out of ideas.
AbpSignalRContractResolver.IgnoredAssemblies.Add(typeof(MyWebModule).Assembly);
Please advise, thanks!
6 Answer(s)
-
0
Do you want to return PascalCase or camelCase?
-
0
Pascal case please
-
0
For all methods or just SignalR Hub?
-
0
Just the Signal R hub. I need to keep the camel case resolver for the prebuilt ASPNetZero stuff, and I already have an Action filter I add to the IAppService interfaces that replaced the contract resolver on a per action basis, but the SignalR hub is overriding that behavior. I tried to tie in to the HubPipeline with a module that tried to catch OnBeforeOutgoing but that didn't seem to work as I expected. Since there is a block of text in the documentation referring to this very issue, I assumed there would be some 'correct' way of doing what I'm trying to do in ABP.
-
0
It turns out we were using the feature correctly, but the type that wasn't getting pascal cased was a wrapper in a third party library, which wasn't getting ignored. Adding that to the block of assemblies to ignore worked perfectly.
-
0
Thanks for letting us know!
Resolved here: https://stackoverflow.com/questions/48445953/overriding-signalr-contract-resolver-in-asp-net-boilerplate