-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in GetOriginatingAssembly function inside HttpRequestHeadersExtensions #264
Comments
Hi @johnhydemtm365 , BTW: This functionality is meant for reusable plugins/extensions built on top of this SDK, I'd like to better understand your scenario. Are you building something like that? |
Hi, I added that attribute and it still does not work, this is because it's
failing before it gets to that line. Fails at line 133 track back on the
call stack and it will fail at line 94 so as you can see even if I add the
attribute it fails as that code is on line 96.
With regards to how we are using the delivery client, we are building a
website. And it works fine on memory caching, not sure why its tripping
into this code on distributed caching, as technically it should fail on
both...??
Hope that helps
Thanks
John
…On Fri, 5 Feb 2021 at 11:14, Petr Švihlík ***@***.***> wrote:
Hi @johnhydemtm365 <https://github.com/johnhydemtm365> ,
do you use the DeliverySourceTrackingHeaderAttribute in the code of your
project? Or the AssemblyAttribute in your csproj? ...as described at
https://github.com/Kentico/kontent-delivery-sdk-net/wiki/Developing-plugins
Otherwise, the source tracking logic should be skipped.
BTW: This functionality is meant for reusable plugins/extensions built on
top of this SDK, I'd like to better understand your scenario. Are you
building something like that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH2XYN2XOLQJDHBQHCHVTATS5PHK7ANCNFSM4XEJTPHQ>
.
--
*John Hyde*
Technical Operations Manager
*T:* +44 (0) 2380 215 399 | *W:* themtmagency.com
<https://themtmagency.com/?utm_source=mtm-email-footer>
------------------------------
Facebook <https://www.facebook.com/TheMTMAgency/> | Linkedin
<https://www.linkedin.com/company/mtmagency/> | Twitter
<https://twitter.com/themtmagency?lang=en>
*The MTM Agency* – Saxon House, Saxon Wharf, Lower York Street
Southampton, SO14 5QF
|
Thanks, I get you. We'll investigate what's going on. |
I was able to reproduce it...investigating |
Awesome. My only problem at the moment is I cannot seem to work around
it, and we are trying to get a site up and running using redis before we go
live.. in the next couple of weeks...
Thanks
John
…On Fri, 5 Feb 2021 at 13:30, Petr Švihlík ***@***.***> wrote:
I was able to reproduce it...investigating
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH2XYNYM6YOEP2I43IOMZATS5PXGFANCNFSM4XEJTPHQ>
.
--
*John Hyde*
Technical Operations Manager
*T:* +44 (0) 2380 215 399 | *W:* themtmagency.com
<https://themtmagency.com/?utm_source=mtm-email-footer>
------------------------------
Facebook <https://www.facebook.com/TheMTMAgency/> | Linkedin
<https://www.linkedin.com/company/mtmagency/> | Twitter
<https://twitter.com/themtmagency?lang=en>
*The MTM Agency* – Saxon House, Saxon Wharf, Lower York Street
Southampton, SO14 5QF
|
the origin of the error is rather mysterious to me and it requires further investigation. HOWEVER, this functionality is not critical in any way and it should never end up being blocking so a set of null checks is in order. |
Let's wait for the build: https://github.com/Kentico/kontent-delivery-sdk-net/releases/tag/15.0.0-alpha3 There are a few breaking changes you should know about. The named client registration has been extracted to a separate package If you use it, make sure you reference Autofac and add
|
here's the motivation for the breaking changes: #240 we decided that handling of named services is out of the scope of our responsibilities. |
Please drop a comment here stating if it works for you now. |
Hi, awesome got past the issue, however just logged the next issue, which
seems to be an issue with deserializing rich text. Not sure if it's because
of the alpha...?
Just out of interest, when do you expect version 15 to be Released
thanks
John
…On Fri, 5 Feb 2021 at 14:52, Petr Švihlík ***@***.***> wrote:
Please drop a comment here stating if it works for you now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH2XYNZMN5ZVW7O5LSHFEDLS5QA4FANCNFSM4XEJTPHQ>
.
--
*John Hyde*
Technical Operations Manager
*T:* +44 (0) 2380 215 399 | *W:* themtmagency.com
<https://themtmagency.com/?utm_source=mtm-email-footer>
------------------------------
Facebook <https://www.facebook.com/TheMTMAgency/> | Linkedin
<https://www.linkedin.com/company/mtmagency/> | Twitter
<https://twitter.com/themtmagency?lang=en>
*The MTM Agency* – Saxon House, Saxon Wharf, Lower York Street
Southampton, SO14 5QF
|
hi, thanks for submitting the other issue! let's continue the discussion about it in #265 Regarding v15, I expect approximately the following timeline: https://github.com/Kentico/kontent-delivery-sdk-net/milestones?direction=asc&sort=due_date&state=open |
Brief bug description
Using Kentico Kontent Delivery version 14.2.1
When running Dancing goat boilerplate sample and our own Kontent asp.net core implementation and turning on Redis caching we seem to get an error, when trying to set the source tacking header:
What went wrong?
Looking in the code in the project it seems to be failing on line 133 in the
HttpRequestHeadersExtensions
class. For some reason, it's not finding the assembly, and then because of that throwing an error.Weirdly if I just use memory caching it all works fine...
Repro steps
Download Dancing goat boilerplate, update NuGet packages to the latest version.
Configure Redis caching for distributed caching
Run the website
Suggested change...
Replace
https://github.com/Kentico/kontent-delivery-sdk-net/blob/2e1fe1380814072ec02b3dfea30df7c16af2ef91/Kentico.Kontent.Delivery/Extensions/HttpRequestHeadersExtensions.cs#L133
With:
var originatingAssembly = callerAssemblies.Any() ? callerAssemblies.Last() : null;
or
System.Reflection.Assembly.GetEntryAssembly().GetName()
Obviously, this might be being caused by a simple resolution as if I lift the code and dump it into a project that my website references it all works fine, but when the code is in the same assembly as executing assembly then it does not work as that would mean the executing assembly is referencing its self.
The text was updated successfully, but these errors were encountered: