Skip to content
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

owin.RequestId always empty guid string #520

Open
luiz-soares opened this issue Feb 2, 2024 · 3 comments
Open

owin.RequestId always empty guid string #520

luiz-soares opened this issue Feb 2, 2024 · 3 comments

Comments

@luiz-soares
Copy link

luiz-soares commented Feb 2, 2024

Hi,

We are trying to use owin.RequestId from the environment dictionary, but it's an empty guid all the time, is there anything we are missing?

I understand it's an optional field according to the standard, but I'd expect it to be either not present or have a non-empty value

I also checked using a brand new .NET Framework empty web project like:
image

using Microsoft.Owin;
using Owin;
using WebApplication1;

[assembly: OwinStartup(typeof(Startup))]

namespace WebApplication1
{
    public class Startup
    {
        public void Configuration(IAppBuilder appBuilder)
        {
            appBuilder.Use((context, next) =>
            {
                var requestId = context.Environment["owin.RequestId"];
                return next();
            });
        }
    }
}

Thanks

@Tratcher
Copy link
Member

Tratcher commented Feb 2, 2024

That's odd. Can you attach the debugger and step into that call? You should end up here:

string AspNetDictionary.IPropertySource.GetRequestId()

@luiz-soares
Copy link
Author

This is it running in my machine using IIS Express, got empty guid in IIS10 as well.

image

@Tratcher
Copy link
Member

Tratcher commented Feb 7, 2024

This is coming from IIS, it's not an OWIN specific issue. I'm told the value is only available when ETW tracing is enabled in IIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants