File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66* .user
77* .userosscache
88* .sln.docstates
9+ web-user-tokenized.config
910
1011# User-specific files (MonoDevelop/Xamarin Studio)
1112* .userprefs
Original file line number Diff line number Diff line change 1+ function XmlDocTransform ($xml , $xdt )
2+ {
3+ if (! $xml -or ! (Test-Path - path $xml - PathType Leaf)) {
4+ throw " File not found. $xml " ;
5+ }
6+ if (! $xdt -or ! (Test-Path - path $xdt - PathType Leaf)) {
7+ throw " File not found. $xdt " ;
8+ }
9+
10+ Add-Type - LiteralPath " $PSScriptRoot \Microsoft.Web.XmlTransform.dll"
11+
12+ $xmldoc = New-Object Microsoft.Web.XmlTransform.XmlTransformableDocument;
13+ $xmldoc.PreserveWhitespace = $true
14+ $xmldoc.Load ($xml );
15+
16+ $transf = New-Object Microsoft.Web.XmlTransform.XmlTransformation($xdt );
17+ if ($transf.Apply ($xmldoc ) -eq $false )
18+ {
19+ throw " Transformation failed."
20+ }
21+ $xmldoc.Save ($xml );
22+ }
23+
24+ Copy-Item " $PSScriptRoot \web-user.config" " $PSScriptRoot \web-user-tokenized.config" - Force
25+
26+ XmlDocTransform " $PSScriptRoot \web-user-tokenized.config" " $PSScriptRoot \web-user-transform.xml"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ environment:
1818
1919before_build :
2020 - ps : .\CopySonarTarget.ps1
21+ - ps : .\GenerateTokenizedConfig.ps1
2122 - nuget restore
2223 - cmd : if defined SonarToken (SonarQubeScanner\SonarQube.Scanner.MSBuild.exe begin /k:"IisRemoteUserTokenAuthentication" /v:0.4 /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=%SonarToken%" /d:"sonar.verbose=true")
2324
@@ -50,11 +51,15 @@ after_test:
5051 - cmd : copy "%APPVEYOR_BUILD_FOLDER%\web-scanner.config" "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-scanner\web.config"
5152 - cmd : copy "%APPVEYOR_BUILD_FOLDER%\ConfigureServer.ps1" "%APPVEYOR_BUILD_FOLDER%\Staging\ConfigureServer.ps1"
5253 - 7z a RutaHttpModule.zip "%APPVEYOR_BUILD_FOLDER%\Staging\"
54+ - cmd : copy "%APPVEYOR_BUILD_FOLDER%\web-user-tokenized.config" "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-user\web.config"
55+ - 7z a RutaHttpModule-Tokenized.zip "%APPVEYOR_BUILD_FOLDER%\Staging\"
5356 - cmd : if defined SonarToken (SonarQubeScanner\SonarQube.Scanner.MSBuild.exe end /d:"sonar.login=%SonarToken%")
5457
5558artifacts :
5659 - path : RutaHttpModule.zip
5760 name : RutaHttpModule
61+ - path : RutaHttpModule-Tokenized.zip
62+ name : RutaHttpModule-Tokenized
5863
5964deploy :
6065 release : $(APPVEYOR_REPO_TAG_NAME)
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!-- For more information on using transformations
3+ see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
4+ <configuration xmlns : xdt =" http://schemas.microsoft.com/XML-Document-Transform" >
5+ <applicationSettings >
6+ <RutaHttpModule .Properties.Settings>
7+ <setting name =" DowncaseGroups" serializeAs =" String" xdt : Transform =" Replace" xdt : Locator =" Match(name)" >
8+ <value >__DowncaseGroups__</value >
9+ </setting >
10+ <setting name =" AppendString" serializeAs =" String" xdt : Transform =" Replace" xdt : Locator =" Match(name)" >
11+ <value >__AppendString__</value >
12+ </setting >
13+ <setting name =" AdUserBaseDn" serializeAs =" String" xdt : Transform =" Replace" xdt : Locator =" Match(name)" >
14+ <value >__AdUserBaseDn__</value >
15+ </setting >
16+ <setting name =" AdGroupBaseDn" serializeAs =" String" xdt : Transform =" Replace" xdt : Locator =" Match(name)" >
17+ <value >__AdGroupBaseDn__</value >
18+ </setting >
19+ </RutaHttpModule .Properties.Settings>
20+ </applicationSettings >
21+ </configuration >
You can’t perform that action at this time.
0 commit comments