Skip to content

Commit

Permalink
Configuring web.config for CSETUI IIS URL Rewrite Module
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus-Goectau committed Mar 4, 2022
1 parent 2e84383 commit 1f2df50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions setup_enterprise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ $serverescaped = $server.replace("\", "\\")
(Get-Content C:\inetpub\wwwroot\CSETUI\assets\config.json -Raw).replace('"port":"5000"', '"port":"5001"') | Set-Content C:\inetpub\wwwroot\CSETUI\assets\config.json -NoNewLine
(Get-Content C:\inetpub\wwwroot\CSETUI\assets\config.json -Raw).replace('"reportsApi":"http://localhost:44363/"', '"reportsApi":"http://localhost:5002/"') | Set-Content C:\inetpub\wwwroot\CSETUI\assets\config.json -NoNewLine

# Add IIS URL rewrite rules in system.webServer section of web.config
(Get-Content C:\inetpub\wwwroot\CSETAPI\web.config -Raw).replace("</system.webServer>", (Get-Content C:\inetpub\wwwroot\CSETAPI\IISUrlRewrite.xml -Raw) + "</system.webServer>") | Set-Content C:\inetpub\wwwroot\CSETAPI\web.config -NoNewLine

sqlcmd -E -S $server -d "MASTER" -Q "CREATE DATABASE CSETWeb ON (FILENAME = 'C:\CSETDatabase\CSETWeb.mdf'), (FILENAME = 'C:\CSETDatabase\CSETWeb_log.ldf') FOR ATTACH;"
sqlcmd -E -S $server -d "CSETWeb" -Q "CREATE LOGIN [${env:userdomain}\CSETUser] FROM WINDOWS WITH DEFAULT_DATABASE = CSETWeb; CREATE USER [${env:userdomain}\CSETUser] FOR LOGIN [${env:userdomain}\CSETUser] WITH DEFAULT_SCHEMA = [dbo];"
sqlcmd -E -S $server -d "CSETWeb" -Q "ALTER ROLE [db_owner] ADD MEMBER [${env:userdomain}\CSETUser];"
Expand Down
3 changes: 3 additions & 0 deletions zip_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

_versionNum=11012

start C:/src/Repos/CSETStandAlone/setup/WixInstaller/CSET_WixSetup/deprecateFAA.bat CSETWeb${_versionNum}

sed -i 's/\"EnterpriseInstallation\": \"false\"/\"EnterpriseInstallation\": \"true\"/g' CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/appsettings.json

cd CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Diagram/etc/build
Expand All @@ -22,6 +24,7 @@ mkdir dist/CSETUI
cp -r C:/src/Repos/cset/CSETWebNg/dist/. dist/CSETUI
cp setup_enterprise.ps1 dist
cp -r C:/src/Repos/CSETStandAlone/setup/WixInstaller/CSET_WixBootStrapperProject/redist/enterprise/. dist
mv dist/CSETUIweb.config dist/CSETUI/web.config
cp C:/Users/${USERNAME}/CSETWeb${_versionNum}.mdf dist/database
cp C:/Users/${USERNAME}/CSETWeb${_versionNum}_log.ldf dist/database

Expand Down

0 comments on commit 1f2df50

Please sign in to comment.