Skip to content

HttpSys Not Support IPv4-mapped IPv6 addresses #42549

@li-zhixin

Description

@li-zhixin

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

  1. Using HttpSys to listen http://*:5274.
  2. Access site using IPv4-mapped IPv6 addresses.
  3. The browser cannot access, prompting HTTP Error 400. The request hostname is invalid.

Expected Behavior

I hope it can be accessed normally.

Steps To Reproduce

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.WebHost.UseHttpSys();
builder.WebHost.UseUrls("http://*:5274");
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();

Access this url: swagger

Exceptions (if any)

No response

.NET Version

6.0.400-preview.22301.10

Anything else?

WinVer: Win11 22H2(OS Build 22621.105)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.ExternalThis is an issue in a component not contained in this repository. It is open for tracking purposes.Status: Resolvedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-httpsys

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions