web.config-transform

Web config transforms not working with Visual Studio online, VS2013 and Azure

感情迁移 提交于 2019-12-10 13:55:58
问题 I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS). I have followed this blog post Continuous Delivery to Azure Websites with git using custom deployment script I have even added the build that is required to build to my publish profiles. ie. stagingbuild | any cpu . note : this was not mentioned in the above mentioned blog post. The sites deploy ok using by VS2013 build but the configs are not

Set web.config transform in Asp.NET Core

强颜欢笑 提交于 2019-12-10 04:17:08
问题 I've just came across with problem of web.config transformation in asp.net core. There are two files: base web.config and web.prod-zone-a.config. My aim is to use transformation inside web.prod-zone-a.config when publishing my project. I have the following "prod-zone-a" configuration settings in .csproj: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'prod-zone-a|AnyCPU' "> <IntermediateOutputPath>obj\Debug\netcoreapp1.1</IntermediateOutputPath> <DebugSymbols>true</DebugSymbols>

web.config transformation + msdeploy - keeping production passwords out of source control

醉酒当歌 提交于 2019-12-08 07:00:19
问题 Our web.config needs a database password. How can we specify this password while building the msdeploy (aka Web Deploy) package or when actually deploying? We build the msdeploy package using msbuild (/p:DeployOnBuild=true) and web.config transformations for environment-specific details. 回答1: Web.config transformations are, by design, build time transformations. I tend to only use them for "everything but debug" changes. What you want is an MSDeploy parameter. Assuming you are using a pubxml

Transform appSettings from external file after merge

做~自己de王妃 提交于 2019-12-07 12:44:26
问题 What I'm trying to do is transform one of appSettings which is in external file: Here is external.config <?xml version="1.0"?> <appSettings> <add key="SomeKey" value="some value" /> </appSettings> Web.config <?xml version="1.0"?> <configuration> <appSettings file="..\..\external.config"> <add key="SomeKey1" value="some value 1" /> </appSettings> </configuration> Web.Debug.config <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <appSettings>

Network path was not found error during site access

雨燕双飞 提交于 2019-12-06 07:29:06
问题 I just migrated my asp.net website from one host to another. It was working fine with the old host but with the new host there is this error: Server Error in '/' Application. The network path was not found Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ComponentModel.Win32Exception: The network path was not found

Web config transform for custom section

旧时模样 提交于 2019-12-06 00:26:47
问题 I have numerous different Web.configs in my MVC 5 Application for different environments - e.g. Test/Prod I have web transforms in place to change values for the different environments. So for example I have the following app setting in my web.config file: <appSettings> <add key="DevDisplayPanel" value="true" /> </appSettings> Then in my Web.Test.config and Web.Prod.config using a web transform to change the value as below: <appSettings> <add key="DevDisplayPanel" xdt:Transform="Replace" xdt

Transform appSettings from external file after merge

霸气de小男生 提交于 2019-12-05 19:50:40
What I'm trying to do is transform one of appSettings which is in external file: Here is external.config <?xml version="1.0"?> <appSettings> <add key="SomeKey" value="some value" /> </appSettings> Web.config <?xml version="1.0"?> <configuration> <appSettings file="..\..\external.config"> <add key="SomeKey1" value="some value 1" /> </appSettings> </configuration> Web.Debug.config <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <appSettings> <add key="SomeKey" value="some changed value"xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>

Relationship between solution configuration, publish profile, and web.config transforms

≯℡__Kan透↙ 提交于 2019-12-04 09:29:38
问题 I have the following setup in a Visual Studio 2013 ASP.NET Web API 2 project. Web.Develop.config web transform to set an app settings key value Web.Release.config web transform to remove an app settings key Develop.pubxml to map to the Web.Develop.config transform Release.pubxml to map to the Web.Release.config transform Details for each are found below. <!-- Web.Develop.config (Web Config Transform) --> <appSettings> <add key="ReportInputPath" value="DevelopPath" xdt:Transform="SetAttributes

Web config transform for custom section

本小妞迷上赌 提交于 2019-12-04 04:46:54
I have numerous different Web.configs in my MVC 5 Application for different environments - e.g. Test/Prod I have web transforms in place to change values for the different environments. So for example I have the following app setting in my web.config file: <appSettings> <add key="DevDisplayPanel" value="true" /> </appSettings> Then in my Web.Test.config and Web.Prod.config using a web transform to change the value as below: <appSettings> <add key="DevDisplayPanel" xdt:Transform="Replace" xdt:Locator="Match(key)" value="false" /> <appSettings> However in my Web.config I also have my own custom

Change connection string from development to production when publishing

不问归期 提交于 2019-12-04 03:48:48
问题 I want to know how to change automatically the connection string of my app so when I'm working on it in my pc, it uses my local SQL Server and once I publish it then uses the SQL Server I have hosted on azure. Right now I'm just commenting out the connection string depending of what I want, I saw that the Web.Config file has 2 dependencies, Web.Debug.config and Web.Release.config which is where I guess I have to do something but I don't know what. This is my web.config file so far