0

I have published my Blazor application to local IIS using Release configuration settings.

I have an appsettings.Release.json file which is included in the published folder, but the values in appsettings.Release.json are not being used in the published application.

I have already added ASPNETCORE_ENVIRONMENT value to Release for ApplicationHost.Config in the respective IIS Website.

enter image description here

How do I set the published application to "Release"?

2
  • Is there even appsettings.Release.json needed? Just checked one of my projects - there are appsettings.json and appsettings.Development.json for debugging Commented Oct 2, 2020 at 11:44
  • @xakz I have published mine to local IIS with 'Release' configuration, hence that setting. Commented Oct 2, 2020 at 11:47

1 Answer 1

4

Arghhh... In IIS I had configured my variable name with a space at the end...

ASPNETCORE_ENVIRONMENT was changed to ASPNETCORE_ENVIRONMENT and now all is working correctly.

[Facepalm]

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.