web.config-transform

ASP.NET web.config encryption security

回眸只為那壹抹淺笑 提交于 2021-02-11 04:35:30
问题 I'm planning to encrypt the connection strings of a web configuration file belonging to an application which will be run in a server farm. I am aware of the aspnet_regiis command line tool to encrypt the sections using it. But I have some doubts, which I expect you guys can solve. My question is that if I encrypt the connectionstrings and the web.config file is stolen by some hacker, will he be able to decrypt it using the same command line with -pe switch? The same is shown below. My Servers

ApplicationHost.xdt in Azure Web Apps

丶灬走出姿态 提交于 2020-01-24 04:43:13
问题 How to change applicationHost.config in an Azure web app? I try: using (ServerManager serverManager = new ServerManager()) { Microsoft.Web.Administration.Configuration config = serverManager.GetApplicationHostConfiguration(); Microsoft.Web.Administration.ConfigurationSection webLimitsSection = config.GetSection("system.applicationHost/webLimits"); webLimitsSection["connectionTimeout"] = TimeSpan.Parse("00:00:10"); webLimitsSection["dynamicIdleThreshold"] = 150; webLimitsSection[

How to increase timeout of Azure App Service for my ASP.NET Core 2.0 API

為{幸葍}努か 提交于 2020-01-15 03:26:15
问题 I have an ASP.NET Core 2.0 API I am deploying to an Azure App Service. This has been working fine until recently when I had to process a request that took longer than 2 minutes to complete and I got a 502 Bad Gateway stating "The specified CGI application encountered an error and the server terminated the process". This consistently happens when I hit the 2 minute mark on this process. My diagnostic logfile says 018-05-25 02:07:01.462 +00:00 [Error] Microsoft.AspNetCore.Diagnostics

Unwanted changes in .csproj file on build

戏子无情 提交于 2020-01-06 14:08:12
问题 I'm trying to auto-detect web.configs as part of a transform pre-build event in one of my web application project files, this code goes up one folder level from my project file and gets all web.configs in every directory and sub directory: <ItemGroup> <WebConfigsRelativePath Include ="..\**\Web.config"/> </ItemGroup> This works great but everytime I build and exit Visual Studio, I get a prompt asking me if I want to save changes made to my solution file. If I select yes, and open the project

MSDeploy setParameter not working

£可爱£侵袭症+ 提交于 2020-01-01 08:36:05
问题 We are trying to integrate a 'build once, deploy anywhere' model in our build-deploy system. MSDeploy works wonders for this, cutting down build time dramatically with CRC checksum comparisons and ( for the most part ) it works just as well when using parameterisation to change applications web.configs depending on the environment we deploy to. I have the majority of these parameters nailed down, but a few elements and attributes never seem to change, no matter how many different ways I call

Tokenization based pattern replacement in web.config.token

时间秒杀一切 提交于 2019-12-24 08:10:07
问题 I am using Release Manager 2015 to deploy my application. I am using Microsoft's Extension Utilities pack to do this: Extension Utility Pack - Documentation This simply states: Tokenization based pattern replacement This task finds the pattern __<pattern>__ and replaces the same with the value from the variable with name <pattern>. Eg. If you have a variable defined as foo with value bar, on running this task on a file that contains __foo__ will be changed to bar. So in my web.config.token

Web.tt in VS 2013 MVC project causes error “value does not fall within the expected range”

狂风中的少年 提交于 2019-12-23 14:24:17
问题 Has anyone else encountered this in VS 2013? Any way of fixing? Create a new asp.net web application with visual studio 2013. Under "Add folders and core references for:", check MVC. Click OK. Open the web.config and copy the contents. Add a new text template to your project called "Web.tt" Paste in the contents of your web.config and change the output extension to be .config. all you need is this line (and then your web.config contents after it): <#@ output extension=".config" #> Make sure

xdt:Transform=“Insert” not working for <rewrite> in <system.webServer>

走远了吗. 提交于 2019-12-23 07:05:03
问题 I have the following transform written in the live config of my web.config. <system.webServer> <rewrite xdt:Transform="Insert"> <rules> <rule name="httpsrewrite"> <match url=".*" /> <serverVariables> <set name="SERVER_PORT" value="443" /> <set name="HTTPS" value="on" /> </serverVariables> <action type="None" /> </rule> </rules> </rewrite> </system.webServer> There is no element in my web.config. The transform just does not work. All my other transform (replace for elmah and connection string)

web config error: Unrecognized attribute 'xmlns:xdt'. Note that attribute names are case-sensitive

痞子三分冷 提交于 2019-12-23 06:56:55
问题 I am trying to deploy an application to AppHarbor and followed their instructions on how to modify my web.config, so it uses their instance auf Sql server. Upon running the solution I am getting the error mentioned in the topic: Unrecognized attribute 'xmlns:xdt'. Note that attribute names are case-sensitive. The only thread i found about this problem was this one. But adding the pre build lines and deleting the obj folder and rebuilding did not bring any solution. It keeps running into this

Add Config Transforms is not displaying, why?

若如初见. 提交于 2019-12-22 10:08:50
问题 I don't know if this is an environmental issue or something; however, I have been in Configuration Manager and I have added a new "Test" and "Release", now those appear along with Debug. I went to my Web.config and right clicked and I am not seeing the "Add Config Transforms". My end goal is to change the based on what environment I am publishing to. What are my options to make this work? 回答1: Is the project a Web Site? The web.config transforms seem to be only available for Web Application,