-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Alow bin\Web.config to override Web.config #4702
Comments
@vijayrkn should this be moved to websdk repo? |
Seconding this. SlowCheetah, which provides transformations during debug for App.config files, has proven to be immensely popular. Web applications should get this functionality too, one way or another.
|
@muratg - This will have to go to the developer community since this is a VS feature request for F5 experience. |
@vijayrkn What if it were just implemented in the web server, though? It needn't be baked in to Visual Studio because an extension like SlowCheetah could do the transform and output it to the |
Note only IIS reads the Web.Config, not ASP.NET Core. That makes this a Windows feature request. @shirhatti |
@Tratcher Is it recommended that a different mechanism be used for configuring a web app in ASP.NET core, then? |
@jez9999 ASP.NET Core is mostly code based configuration. There are some things you can set in configuration (like logger settings) but there's no transform step. It would be good to understand what problems you are trying to solve here. |
@davidfowl Things like transforming connection strings, passwords, IP addresses, etc. for the local developer machine setup. I am used to using config transforms for this for example when you publish your web application to a live or staging server. |
OK I see, you just want to provide general configuration. ASP.NET Core's templates have This really has nothing to do with the webserver but instead is just a deployment gesture (also storing settings in configuration is bad because you don't want secrets in source control). See this doc for the recommended flow for secrets in production and development https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.1&tabs=macos |
What I do is exclude my debugging settings files from source control and use transforms to insert the secrets for production ones, so I'm not actually storing secrets in source control. |
We periodically close 'discussion' issues that have not been updated in a long period of time. We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate. |
One major issue I continually have with ASP.NET is the inability to perform XDT transformations on my Web.config file when I debug. I want to hit F5 and get an XDT transformation that inserts config values appropriate for my debugging setup. It seems to me that a good way to do this would be for the web server to first search for bin\Web.config, which could be the output location for the base Web.config with XDT transformations applied (from a base
Web.Debug.config
file). If it finds that file, it uses it, otherwise it falls back to the base Web.config. Could this be implemented? Then we could press F5, VS does the XDT transformation for our Web.Debug.config, writes it to the bin directory, and the web server uses that when we're debugging.The text was updated successfully, but these errors were encountered: