Skip to content

app.UseRequestLocalization overwritten on deployed IIS #58440

Open
@Schoof-T

Description

@Schoof-T

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In Blazor Server, when setting the app.UseRequestLocalization("en-GB"); I was under the assumption that your application should always use the "en-GB" culture.

This works correctly locally in my Visual Studio, I can switch the "en-GB" to any other locale and the whole app will switch.
However, I notice that after deploying my application to a local IIS server, the culture is still "en-GB" but for example the decimal seperator is different. (locally the decimal seperator is ".", deployed it's a ",")

It is still using the culture settings of the Windows user that is set as the identity of your application pool.

Image

Expected Behavior

  • Set app.UseRequestLocalization("en-GB");
  • Application always uses the same "en-GB" culture.

Steps To Reproduce

  • Create Blazor Web App (Server)
  • Add app.UseRequestLocalization("en-GB");
  • Build application self contained and for win-x64 (--self-contained true --runtime win-x64)
  • Deploy application to IIS
    Application pool is as follows:
    Image
    The Identity is a an account, with limited access.

Exceptions (if any)

No response

.NET Version

8

Anything else?

ASP.NET CORE 8
Blazor Server
Visual Studio 2022

cc: @guardrex dotnet/AspNetCore.Docs#33847

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-iisIncludes: IIS, ANCM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions