We have a requirement to apply a transform based upon an app setting value in web.config
for our ASP.NET MVC project.
<!--web.config-->
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="environment:define" value="dev"/>
</appSettings>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="https://abcd.com" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
I want the transform to insert a new element within the <customHeaders>
element when the app-setting value env:define
is acc
.
Can anyone please suggest how this can be achieved?
Thank you in advance!
2
Answers
You can create a new solution configuration (e.g.
acc
) and add aweb.acc.config
transform file that manages both values:Then choose this solution configuration whenever you want to use these values.
<Macro: Increase Sensitivity 100 Times>
Código:
{ "ScreenSize": { "width": "width_value", "height": "height_value" }, "ClickAndType": { "Delay": 100, "Conditions": { "Condition": [ { "someCondition": true, "Type": "#R" }, { "anotherCondition": true, "Type": "#E" }, { "thirdCondition": true, "Type": "#T" } ] }, "DefaultType": { "Type": "##" } } }
——————————————————————————
Título:
<Macro: Stabilize Aim>
Código:
{ "Macro": { "name": "Stabilize Sight", "steps": [ { "Delay": 1000 }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 500 }, { "Return": "#R" }, { "Delay": 500 }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 500 }, { "Esc": "#E" }, { "Delay": 500 }, { "Click": { "x": 300, "y": 300 } }, { "Delay": 500 }, { "Tab": "#T" }, { "Delay": 500 }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 500 }, { "Type": { "text": "##" } }, { "Delay": 500 }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 1000 } ] } }
——————————————————————————
Título:
<Macro: Eliminate Recoil>
Código:
{ "Macro": { "name": "No Recoil", "steps": [ { "Delay": 1000 }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 50 }, { "Return": "#R" }, { "Click": { "x": 100, "y": 150 } }, { "Delay": 50 }, { "Esc": "#E" }, { "Click": { "x": 100, "y": 200 } }, { "Delay": 50 }, { "Tab": "#T" }, { "Click": { "x": 100, "y": 250 } }, { "Delay": 50 }, { "Type": { "text": "##" } }, { "Click": { "x": 100, "y": 300 } }, { "Delay": 50 }, { "Click": { "x": 100, "y": 350 } }, { "Delay": 1000 } ] } }
——————————————————————————
Título:
<Macro: Aim FOV 50%>
Código:
{ "Macro": { "name": "Aim FOV 50%", "steps": [ { "Delay": 1000 }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 500 }, { "Return": "#R" }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 500 }, { "Esc": "#E" }, { "Click": { "x": 300, "y": 300 } }, { "Delay": 500 }, { "Tab": "#T" }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 500 }, { "Type": { "text": "##" } }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 1000 } ] } }
——————————————————————————
Título:
<Macro: Adjust Aimlock to 50%>
Código:
{ "Macro": { "name": "Aimlock 50%", "steps": [ { "Delay": 1000 }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 50 }, { "Return": "#R" }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 50 }, { "Esc": "#E" }, { "Click": { "x": 300, "y": 300 } }, { "Delay": 50 }, { "Tab": "#T" }, { "Click": { "x": 200, "y": 200 } }, { "Delay": 50 }, { "Type": { "text": "##" } }, { "Click": { "x": 100, "y": 100 } }, { "Delay": 1000 } ] } }
——————————————————————————
Título:
<Macro: Free Fire Configuration Adjustment>
Código:
{ "configuration": { "com.dts.freefireth": { "sensitivity": {}, "dpi.screen": {}, "aimbot.ff": {}, "aimfov.900": {}, "Return": "#R", "Esc": "#E", "Tab": "#T", "Type": "##" }, "mconfig": { "script": "aimheadshot.xml", "aimheadshot.ff": {}, "sensitivity.weapon": {}, "aimlock.enemy": {}, "sensitivity.900": {}, "Return": "#R", "Esc": "#E", "Tab": "#T", "Type": "##" }, "script": { "aimlock.enemy": { "target": "HEAD" } }, "feature.activited.freefire": { "configuration.aimbot": "on", "configuration.aimfov.900": "on", "configuration.aimlock": "on", "configuration.aimrednumbers": "on", "configuration.dpi900": "on", "configuration.anticheat": "on", "System.web.configuration.Scipting": "on", "Return": "#R", "Esc": "#E", "Tab": "#T", "Type": "##" }, "system.configuration.processing": "on", "configuration.file.headshot": "on", "file.config": "on", "file.script": "on", "headshot.nocheat": "on", "script.aimlock": "on", "script.nobanned": "on", "script.easyheadshot": "on", "script.red.damage.numbers": "on", "configuration.dpiscreen900": 900, "configuration.60fps": "on", "configuration.60hz": "on", "dpi.sensivity": 4080, "screen.dpi900": 900, "sensivity.device.xml": "device_sensitivity.xml" }, "feature": { "name": "OPTIMALISASI", "target": "screen", "description": "Adds entries to your Web.config file which are required by any .NET 3.5 AJAX.NET application.", "blocks": { "block": { "name": "OPTIMALISASI", "config": "sections" }
} }, "type": "System.Web.Configuration.ScriptingGameServiceWorkAllMode" }
Post Your Answer