# Ideasway deployment [TOC] ## Old Servers - Stop the `Default Web Site` in IIS - Copy`BankIdeas.API` to `wwwroot/IDEASWAY/API` and replace the content. > Keep the `appsettings.json` in place - Copy`IdeasBankDist` to `wwwroot/IDEASWAY/Site` and replace the content. > Keep the `web.config` in place - Update connection string in `DbUpCore/DbUpCore.dll.config` - Run `DbUpCore/DbUpCore.exe` - Open the `wwwroot/IDEASWAY/API/appsettings.json` and add/update the following options ```json { "PasswordPolicy": { "RequiredDigit": true, "RequiredUppercase": true, "RequiredLowercase": true, "RequiredNonAlphanumeric": true, "MinLen": 8 }, "SystemSettings": { "JwtSettings": { "JwtSecretKey": {{keep-old-value}}, "JwtIssuer": "JwtRoleBasedAuth", "JwtAudience": "JwtRoleBasedAuth", "ExpireInValue": 15, "ExpireInUnit": "Minutes" }, ... }, "AuthenticationSettings": { "Enable2FA": true, "EnableUserRegisteration": true, "RegisterationDomainsWhiteList": {{keep-old-value}}, "MaxOtpAttempts": 5 }, ... } ``` - open `wwwroot/IDEASWAY/Site/web.config` add the following inside `<system.webServer>` ```xml <httpProtocol> <customHeaders> <add name="X-Frame-Options" value="DENY" /> <add name="X-Xss-Protection" value="1; mode=block" /> <add name="X-Content-Type-Options" value="nosniff" /> <add name="Referrer-Policy" value="no-referrer" /> <add name="X-Permitted-Cross-Domain-Policies" value="none" /> <add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" /> <add name="Permissions-Policy" value="accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" /> <add name="Cross-Origin-Embedder-Policy" value="require-corp" /> <add name="Cross-Origin-Resource-Policy" value="same-origin" /> <add name="Cross-Origin-Opener-Policy" value="same-origin" /> </customHeaders> </httpProtocol> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> ``` - copy the attached file to `wwwroot/IDEASWAY/web.config` - Start the `Default Web Site` in IIS ## New Servers ### Application Server - Stop the `Default Web Site` in IIS - Copy`BankIdeas.API` to `wwwroot/IDEASWAY/API` and replace the content. > Keep the `appsettings.json` in place - Open the `wwwroot/IDEASWAY/API/appsettings.json` and add/update the following options ```json { "PasswordPolicy": { "RequiredDigit": true, "RequiredUppercase": true, "RequiredLowercase": true, "RequiredNonAlphanumeric": true, "MinLen": 8 }, "SystemSettings": { "JwtSettings": { "JwtSecretKey": {{keep-old-value}}, "JwtIssuer": "JwtRoleBasedAuth", "JwtAudience": "JwtRoleBasedAuth", "ExpireInValue": 15, "ExpireInUnit": "Minutes" }, ... }, "AuthenticationSettings": { "Enable2FA": true, "EnableUserRegisteration": true, "RegisterationDomainsWhiteList": {{keep-old-value}}, "MaxOtpAttempts": 5 }, ... } ``` - Start the `Default Web Site` in IIS ### Web Server - Stop the `Default Web Site` in IIS - Copy`IdeasBankDist` to `wwwroot/IDEASWAY/Site` and replace the content. > Keep the `web.config` in place - open `wwwroot/IDEASWAY/Site/web.config` add the following inside `<system.webServer>` ```xml <httpProtocol> <customHeaders> <add name="X-Frame-Options" value="DENY" /> <add name="X-Xss-Protection" value="1; mode=block" /> <add name="X-Content-Type-Options" value="nosniff" /> <add name="Referrer-Policy" value="no-referrer" /> <add name="X-Permitted-Cross-Domain-Policies" value="none" /> <add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" /> <add name="Permissions-Policy" value="accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" /> <add name="Cross-Origin-Embedder-Policy" value="require-corp" /> <add name="Cross-Origin-Resource-Policy" value="same-origin" /> <add name="Cross-Origin-Opener-Policy" value="same-origin" /> </customHeaders> </httpProtocol> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> ``` - add the same to `wwwroot/IDEASWAY/web.config` - Start the `Default Web Site` in IIS