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

BasicHttpSecurity.Message missing in NuGet package #4694

Closed
NKnusperer opened this issue Aug 13, 2021 · 3 comments
Closed

BasicHttpSecurity.Message missing in NuGet package #4694

NKnusperer opened this issue Aug 13, 2021 · 3 comments
Assignees
Milestone

Comments

@NKnusperer
Copy link

Describe the bug
The BasicHttpSecurity.Message property is not accessible when consuming System.ServiceModel.Http via NuGet but the implementation exist in the code base:

To Reproduce
Given this .csproj:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net5.0</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="System.ServiceModel.Http" Version="4.9.0-preview1.21220.1" />
    </ItemGroup>
</Project>

and this code:

using System.ServiceModel;

namespace TestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var basicHttpsBinding = new BasicHttpsBinding(BasicHttpsSecurityMode.TransportWithMessageCredential);
            basicHttpsBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
        }
    }
}

when trying to compile (Windows 10):
Program.cs(10,40): error CS1061: 'BasicHttpsSecurity' does not contain a definition for 'Message' and no accessible extension method 'Message' accepting a first argument of type 'BasicHttpsSecurity' could be found (are you missing a using directive or an assembly reference?)

Additional context
The reference assembly (system.servicemodel.http\4.9.0-preview1.21220.1\ref\netcore50\System.ServiceModel.Http.dll) is missing the stub for this property and the type itself (BasicHttpMessageSecurity).

When digging into system.private.servicemodel\4.9.0-preview1.21220.1\lib\netstandard2.0\System.Private.ServiceModel.dll they exist.

No idea whats going on here. Maybe an issue with the build system when generating the reference assembly ?

@HongGit
Copy link
Contributor

HongGit commented Sep 27, 2021

Thanks for raising this issue with us!

While we are trying to get the fix into an upcoming release, you could try BasicHttpBinding which support https addresses.

@HongGit HongGit added this to the 6.0 milestone Sep 27, 2021
@HongGit
Copy link
Contributor

HongGit commented Sep 27, 2021

@imcarolwang could you please see if you could get a PR ready this week?

@HongGit
Copy link
Contributor

HongGit commented Oct 13, 2021

Closing as this is fixed in the GA release/

@HongGit HongGit closed this as completed Oct 13, 2021
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

3 participants