-
Notifications
You must be signed in to change notification settings - Fork 165
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
Cannot get ${aspnet-request-cookie} to render any cookies #463
Comments
Hi Have you checked the internal log? I would expect some clues there. |
Not much I'm afraid:
|
Does other aspnet layout renders work? |
It does. If I replace the cookie layout with |
I see that CookieNames is required. That could be the issue. |
Oooh, you're right. Changing the layout to "A list of keys can be passed" But I guess the can there reference the possibility of using a comma-separated list. Any chance of me getting through with including properties on those layouts to render everything? |
Yes a list is supported.
I think it should be optional. Working on that. |
fixed with #465 |
That is awesome! I wonder if this is the case for other of the layout renderers too? I've seen Another thing. I noticed that there aren't a layout renderer for getting all server veriables (headers). Would you like me to do one or is that intentional? I also talked with Rolf about response layout renderers. Like a |
You are very welcome to create a PullRequest. There is already an issue to resolve: #355 |
fixed in 4.9 :) |
@ThomasArdal I'm Having this same issue using NLog.Web.AspNetCore 4.9 with a Core 2.2 application. It is logging a blank string to the database field. Which version of ASP.NET Core were you experiencing this issue with? Its not a big deal to get this the old fashioned way but since the library has the functionality I might as well implement it.
|
Pretty sure it was ASP.NET Core 2.1. I believe it was when creating this sample that I first experienced the problem: https://github.com/elmahio/elmah.io.nlog/tree/master/samples/Elmah.Io.NLog.AspNetCore21 |
I'm trying to extend my target with resolving of HTTP cookies using the
NLog.Web
and NLog.Web.AspNetCore` packages. I cannot seem to get NLog to render any cookies. Here is what I'm doing (highly simplified):I have created both an ASP.NET MVC and ASP.NET Core MVC project and tried to set up the target in both projects. When debugging through the code, the
WriteAsyncTask
is called, but therenderedJson
string is empty in both cases.I was thinking if this was caused by the target being implemented as a
AsyncTaskTarget
why I tried to port it back toTargetWithContext
. But doing so still produces the empty string representing the cookies.Can you help figuring out what is going wrong here?
The text was updated successfully, but these errors were encountered: