Questions tagged [web-config-transform]

Web.config transformation lets you easily transform .NET application configuration files.

Filter by
Sorted by
Tagged with
0 votes
1 answer
122 views

How to overwrite a web.config file with custom content in ASP.NET Core?

I'm trying to extend my web.config file with custom server configuration that is necessary for IIS. But I'm not sure how to do this as there is already a web.config file auto-generated at publish time....
Gabriel Weidmann's user avatar
2 votes
0 answers
66 views

Why does the name of my Publish Profile affect the transformation of my Web.config?

I think I have encountered a strange interaction where the name of my Publish Profile is affecting the contents of the published Web.config. For context, I have 2 solution configurations; Release &...
Stephen Patane's user avatar
0 votes
0 answers
57 views

.NET rewrite rules on web.release.config

We have a .NET webapp with the follwing rewrite rules for redirect: <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">...
huco's user avatar
  • 11
1 vote
2 answers
385 views

How to use xdt-transform when the Web.config element already contains a different xmlns

Using Visual Studio Web.Config Transforms, I want to include the following line in Web.Debug.Config: <add source="*.amazonaws.com" /> This is my Web.config <configuration> <!...
Hooman Bahreini's user avatar
0 votes
1 answer
262 views

Web.config for multiple environment in TFS pipeline

I have a web project which deployed over 50+ servers as per client and regions, each webconfig have 600+ values which are specific for each client and environment. means WebConfig have 600+ appsetting ...
Saad Awan's user avatar
  • 586
0 votes
1 answer
136 views

Transform Default Document attribute from web config in ASP.NET

How can I transform DefaultDocument in ASP.NET. I was able to transform other tags using Key. But in my Web.config "Key" attribute is not allowed in web config. Web.Config <...
AK47's user avatar
  • 3,747
0 votes
0 answers
216 views

XDT Transformation in the Target Web config file

After applying transformation rules on the below target config file and target config file has the output printed in one line continuously but not one line after another. Any help would be greatly ...
Dev7867's user avatar
  • 61
1 vote
1 answer
725 views

ASP.NET: xdt:Transform does not insert new section in web.config file

I am working with ASP.NET 4.7.2. I have the following web.config file: <?xml version="1.0"?> <configuration> <connectionStrings> <add name="foo" connectionString="value"/&...
Zizzipupp's user avatar
  • 1,311
0 votes
1 answer
561 views

Web.config Transform not working for SessionState or OutputCache elements

My original web config: <sessionState mode="Custom" customProvider="SessionStateStore" timeout="5"> <providers> <add name="SessionStateStore" throwOnError="false" type="...
shadowmaster13's user avatar
-1 votes
1 answer
289 views

I want to change XML to Webconfig use Powershell

i want to know how to change XML and Save for example,this is test1.xml <AAA_KEY> <Account_key> 123AA03 </Account_key> <KEY ID = "User10036"> <key1> #...
misliu's user avatar
  • 1
0 votes
1 answer
265 views

Get all config files (which created using Transformation under web.config) into VSTS CI Build Artifacts

I have a web project which has one web.config and other three web configs. web.Debug.config, web.Staging.Config and web.Release.config. I want these three config files into my VSTS CI Build Artifacts. ...
Ashish-BeJovial's user avatar
1 vote
1 answer
1k views

transform web.config using msbuild command line

Looking to setup jenkins to deploy my web app I'm using the script msbuild WEB.csproj /p:Configuration=stage /t:Build /p:PrecompileBeforePublish=true /p:OutputPath=c:\test /p:DeployOnBuild=true /p:...
Josh Hoffman's user avatar
3 votes
2 answers
4k views

Understanding ASP.NET Web.config transformations - Web.Debug.config

I've been strugling with this for one hour and can't find to simple explanation or at least some Microsoft documentation that states this. I want to understand behaviour of next files: Web.config ...
broadband's user avatar
  • 3,316
1 vote
0 answers
50 views

redirect https url without www to https url with www in web.config

Can any one tell me about how to redirect https url without www to https url with www in web.config file. Here is some code that I have tried but I didn't meet my requirement. <rule name="...
tlz alphateam's user avatar
1 vote
0 answers
55 views

how to update a section in Web.Config using transforms?

In my Web.Config I have the following <configuration> <configSections> /*some code*/ </configSections> <appSettings> <add key="KeyName" value="KeyValue"/> ...
Raju Donthula's user avatar
0 votes
1 answer
150 views

How can i use 2 connection string using OR condition Web.config in asp.net

How can i use 2 connection strings with same connection string name but differ in IP using OR condition Web.config in asp.net when any one fails other should respond. First Connection string: ...
Vignesh D's user avatar
6 votes
2 answers
1k views

How avoid *.<Environment>.config transformations being deployed on server

I'm using VSTS to deploy at several environments. And as usual, some parameters on config files need to be different depending the environment, hence I will use config transformations to deploy it at ...
OriolBG's user avatar
  • 2,049
3 votes
1 answer
7k views

ASP.NET Core 2.0 how to increase IIS Express request timeout in launchSettings.json

I have an ASP.NET Core 2.0 API that I am trying to debug using VS2017 / IIS Express on my local Win10 dev computer and I am running into an issue with IIS Express in that it is hitting the response ...
whiskytangofoxtrot's user avatar
0 votes
0 answers
96 views

Can't transform XML when deploying to VSTS

For a VSTS worker role, I'm trying to build configuration transforms so I can change settings based on the environment. I created two files in my solution directory, App.dev.config and App.prod....
Slothario's user avatar
  • 2,890
0 votes
0 answers
726 views

How to handle Web.*.config transform in Octopus Deploy when the config has duplicate keys

In Octopus Deploy, I'm trying to have my Web.config be transformed using my Web.Debug.Config and I'm getting the following error: Found multiple target elements, but the 'Replace' Transform only ...
Alex's user avatar
  • 972
-3 votes
1 answer
35 views

Using VSTS web transformations with third party web services

I am trying to implement the web transformations in VSTS. Is there a way to add third party web services to my parameters and setparameters xml files?
sschlosser's user avatar
2 votes
2 answers
972 views

Web.config transformation change path to appsettings

I have a web.config file that has the connectionstring & appsettings in a debug file like so: <connectionStrings configSource="config\connectionStrings-debug.config" /> <appSettings ...
Eman's user avatar
  • 1,140
1 vote
0 answers
2k views

How to use the xdt:locator by condition in Web.config Transformation

I am trying to insert a dependentAssembly element into my config where the child assemblyIdentity element doesn't already exist. However, I'm getting the following error No element in the source ...
PatrickNolan's user avatar
  • 1,731
0 votes
1 answer
1k views

Is it possible to use the web.config transformations for app.config files within a VSTS release template?

I'm aware that you can use web.config transformations as part of the build for app.config files, but in my case, I'm trying to do this for a little scheduled task that gets deployed to an on-premise ...
Rowland Shaw's user avatar
  • 37.8k
3 votes
1 answer
1k views

slowcheetah not working for app.config

Im using slowcheetah to transform my web.config file for various environments and this all works as expected. I want to do the same on app.config files but despite having slowcheetah available for ...
proteus's user avatar
  • 545
1 vote
0 answers
175 views

Web.config Transform - Overwrite a commented out field

We have a Continuous Deployment system which allows us to deploy to different environments. In the default Web.config, we have the following xml line commented out: <!--<add key="EventLogger....
Max's user avatar
  • 808
1 vote
0 answers
124 views

Is there any way to transform the web.config while pressing F5?

Is there any way that works integrated with the visual studio that makes a transformation on the web.config based on different profiles and when you press F5? I understand that slowcheetah so far don'...
Heinrich's user avatar
  • 836
1 vote
1 answer
3k views

Web.config transform not transforming VS 2017

I have literally uncommented the boilerplate code and tried to publish to the file system to check if the "transform" works. However, it does not transform the web.config file. I have look at the ...
Harry's user avatar
  • 3,058
0 votes
2 answers
2k views

Adding static content in web config transform

I have a Web.Config file for local testing and i have a web.Release.Deploy.config transform that i want to include static content into. I am not very familiar with web config transforms. I have added ...
Leonardo Wildt's user avatar
0 votes
0 answers
3k views

How to avoid adding httpruntime tag to web.config at deploy

I get the error Config section 'System.web/httpRuntime' already defined when I deploy our application to our development environment. After deploying, if I push the Authentication button on the IIS ...
Jesper Baltzersen's user avatar
0 votes
0 answers
49 views

Asp.net web.config for dev/release without transforms

I would like to have distinct and complete web.debug.config and web.release.config files - instead of partials that transform into complete file on build or publish. How to I associate the ...
DFBerry's user avatar
  • 1,838
3 votes
1 answer
12k views

What is the proper way to add rewrite rules in an Azure App Service

I want to add re-write rules to my Azure app service, but if I even try create a web.config with a simple rewrite as shown below, the site returns an HTTP 500. <?xml version="1.0" encoding="UTF-8"?...
Kirk Liemohn's user avatar
  • 7,783
1 vote
1 answer
3k views

Web.Debug.config vs. Web.Release.config running web app in localhost

I have a Web.config file with some entries in there but depending on whether I am in Debug or Release mode when I execute my Web Application locally, I want to take different appSettings. For ...
user3587624's user avatar
  • 1,331
0 votes
1 answer
165 views

Trouble with Web.Config Transform

I have a multiple projects with the same issue and I have even started an empty web project and have the same issues. I am using VS Professional 2015 update 3. I can use Configuration Manager to ...
OgedeiSechen's user avatar
0 votes
0 answers
159 views

Web.config Builds? Should I be using SlowCheetah?

I have a web api project and I want have different web.config build when I switch to say "release" and build. In the past for window services I used on the app.config SlowCheetah and when I would ...
chobo2's user avatar
  • 83.7k
1 vote
0 answers
116 views

Invalid xmlns:xdt schema URL in web.config

I'm using a nuget package that added xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" into the configuration node of my web.config, which caused my application to break. I resolved this ...
Jacob Stamm's user avatar
  • 1,710
0 votes
1 answer
72 views

azure adding weird characters when transforming config

I have a Web.config and and a transform called Web.AzureDev.config I have the following section in both: web.config: <elmah> <security allowRemoteAccess="1" /> <errorLog ...
Riz's user avatar
  • 6,496
16 votes
4 answers
8k views

How to rename web.config transforms

I am working in an ASP.net MVC 5 solution in Visual Studio 2015. I have the following web.config How do I rename those to be Web.Integration.config Web.Staging.config Web.Production.config When I ...
J86's user avatar
  • 14.5k
1 vote
0 answers
109 views

web config transform How to transform two connection strings into one using config transform?

I have two databases in my MVC 5 application. One is the memmbership database and the other is the application database. I want to merge the databases into one database and set the destination ...
Ashenafi Semu's user avatar
1 vote
0 answers
97 views

Web Config Transformed Multiple Times

I am using MSBuild command line to build and I used Configuration as Release but all configurations are applied. I am unable to find that what the issue could be. I have three configurations under ...
prashant's user avatar
  • 470
1 vote
2 answers
75 views

Do web transforms published to production pose a security risk

Our asp mvc is published automatically using octopus deploy. We use web config transformations and we always end up with additional environment specific files in the installation folder. Eg Web....
Kye's user avatar
  • 5,979
1 vote
1 answer
270 views

Which config transform is applied when running in Visual Studio?

Which config transform is applied when running in Visual Studio? We have a web config and a series of config transforms that set the connection string value for Dev/Test/Live environments. These ...
SteveC's user avatar
  • 16k
0 votes
0 answers
109 views

HttpHandler Not Found in Production

I am using an HttpHandler to dynamically determine the correct logo to show for a white-label site. This works perfectly when I run locally, but when we deploy the site to our test environment, calls ...
Nat Webb's user avatar
  • 679
5 votes
2 answers
3k views

Inserting Rewrite rule in release config

Hi i want to insert a rewrite rule for "Redirect to HTTPS" but only on my release config This is how the rewrite rule looks <system.webServer> <rewrite> <rules> ...
DrGimpfeN's user avatar
0 votes
1 answer
1k views

Web.Release.Config does not work

I have a web site I just took over and am wanting to get web transformations working. I have always had success with MVC projects doing this for debug and release but this ASP web pages application ...
Paul's user avatar
  • 5,757
0 votes
1 answer
123 views

Modifying external configuration section using Web.config transformation

Let's suppose I have a configuration section on an external file, with the following element: <my-config> <!-- ... --> <file value="XXX" /> <!-- ... --> </my-...
Matias Cicero's user avatar
0 votes
1 answer
364 views

Web.config - T4 Transformation - SMTP section

Hey Guys I'm trying to do a transformation of the SMTP section of a web config file. This is what I have got so far: <mailSettings> <smtp> <network host="smtp.sendgrid.net" port=...
Ayo Adesina's user avatar
  • 2,241
10 votes
1 answer
3k views

Transforming included configuration files using configSource

This question is kind of a two parter. In VS2015 my MVC project has multiple different build configurations, Test, UAT, Live etc. With my web.config I can simply right click it and select Add Config ...
MrDeveloper's user avatar
  • 1,041
1 vote
1 answer
1k views

ASP.Net Web.Config transform naming issues

I have an ASP.Net project which utilizes the web.config transforms. To facilitate this I have built a structure like so: web.base.config web.debug.config web.QA.config web.release.config ...
Robert Petz's user avatar
  • 2,724
2 votes
0 answers
59 views

web.config transform - insert file contents

We're working with web.config files in a fairly complex Visual Studio solution, I'd like to be able to insert the contents of a file (that is not a web config) into the web.config, is this possible to ...
eugenekgn's user avatar
  • 1,672