Saml2: ToHttpRequestData extension method shows as ambiguous to itself.

Created on 18 Jun 2020  路  3Comments  路  Source: Sustainsys/Saml2

I believe you have a a problem with the ToHttpRequestData extension method as defined.

You should remove:
public static HttpRequestData ToHttpRequestData(this HttpRequestBase requestBase)
{
return requestBase.ToHttpRequestData(false);
}

and change the signature of:
public static HttpRequestData ToHttpRequestData(
this HttpRequestBase requestBase,
bool ignoreCookies)

To

    public static HttpRequestData ToHttpRequestData(
        this HttpRequestBase requestBase,
        bool ignoreCookies=false)

Otherwise you will get an ambiguous error:
Capture2

question

All 3 comments

@cccsdh , I have the same issue, but how is it that this reference resolves without issue in the code of SustainSys itself? See
HttpModule.RequestBaseExtensionsTests.cs line 48

var actual = request.HttpRequestData();
which compiles fine in this project. I'm still trying to figure this out... some project property?

I got to the bottom of this, and I don't think it's a bug. And since it's a support issue, I've posted a Q and A in stackoverflow:

https://stackoverflow.com/questions/62603855/compile-error-call-is-ambiguous-using-sustainsys-saml2-extension-method-tohttp/62603856#62603856

Thanks for documenting your solution to this.

Was this page helpful?
0 / 5 - 0 ratings