question

JeffDege-0308 avatar image
0 Votes"
JeffDege-0308 asked SamWu-MSFT commented

How do we manage per-site parameters, in asp.net 5.0?

We're trying to move a fairly complicated set of web applications from .NET 4.5 to .NET 5.0, hosted in IIS.

One problem we need to figure out is how to manage the per-environment configuration, during deploys.

With .NET 4.5 we are using web deploy packages. The production team already has hundreds of xxx.SetParameters.xml files for the many customers and environments.

In dev and test, we're using appsettings.%ASPNETCORE_ENVIRONMENT%.json, but that's not going to work for our production deploys.

The production team would like to continue using web deploy packages with xxx.Parameters.xml and xxx.SetParameters.xml files, so they don't have to reconstruct them in some new mechanism.

We're fine with telling them they have to change, if they really do have to change.

How are per-environment configuration settings usually managed, in asp.net 5.0?

Is there a way of telling asp.net to look to the web.config files, instead of appsettings.json?

windows-server-iis
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ASP.NET Core is not ASP.NET 4.x, so there isn't that kind of compatibility. You can hack the source code (as everything is open source, but the best way is to adapt to the new paradigm.

0 Votes 0 ·

But there's the question - what is the new paradigm?

What is the canonical way of injecting environment-specific settings into a website deploy, an asp.net 5.0?

Not just connection strings, but feature flags, etc.?

0 Votes 0 ·

@JeffDege-0308 There is no asp.net 5.0, only .net 5.0. please post more details information about your requirement.

0 Votes 0 ·
Show more comments

@JeffDege-0308 Is your .NET 4.5 hosted on iis? If it is, then you can try to migrate the web.config file directly. If not, I suggest you try to migrate .NET 4.5 to .NET 5.0 first to see if it works properly, and then publish to iis.

0 Votes 0 ·

0 Answers