From a1988489e2c3d9c646b33a20dcde90e47e9c99ea Mon Sep 17 00:00:00 2001 From: "CGI\\franck.cornu" Date: Wed, 2 Nov 2016 13:57:07 -0400 Subject: [PATCH] Added a prerequisite step for the Add-AzureAccount cmdlet. Sometimes, the script may not run correctly (resources not found) if you have the wrong subscription saved in your PS session profile. Added a warning in the deployment script if the service bus namespace is not found in the subscription. Added debugging options in the iisnode.yml configuration file. --- samples/react-real-time/Deploy-Solution.ps1 | 11 +++++++++-- samples/react-real-time/README.md | 1 + samples/react-real-time/server/iisnode.yml | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/samples/react-real-time/Deploy-Solution.ps1 b/samples/react-real-time/Deploy-Solution.ps1 index 3921636fc..a06c51682 100644 --- a/samples/react-real-time/Deploy-Solution.ps1 +++ b/samples/react-real-time/Deploy-Solution.ps1 @@ -36,7 +36,7 @@ Write-Host -ForegroundColor Green "Done!" # ----------------------------------------------------- Write-Host -ForegroundColor Magenta "Login to Azure..." -Login-AzureRmAccount +Login-AzureRmAccount $GitPublishingUserName = "tempdeployuser" + [Guid]::NewGuid(); $GitPublishingUserPassword = "socketio123!" @@ -82,13 +82,20 @@ Try { # Check if the namespace already exists or needs to be created if ($CurrentNamespace) { - # Set the Web Applicatio settings + + Write-Host -ForegroundColor Magenta "Set application settings for service bus connection..." + + # Set the Web Application settings $AppSettings = New-Object Hashtable $AppSettings["AZURE_SERVICEBUS_ACCESS_KEY"]=$CurrentNamespace.ConnectionString # Set application settings and enable WebSockets Set-AzureWebsite -Name $AzureWebAppName -AppSettings $AppSettings + } else { + + Write-Warning "Azure Service Bus namespace '$AzureSBNamespace' not found. Make sure you've selected the right Azure subscription (forgot to run the Add-AzureAccount cmdlet?)" } + Write-Host -ForegroundColor Green "Done!" # Deploy the code to the Web Application using Local Git diff --git a/samples/react-real-time/README.md b/samples/react-real-time/README.md index db3a6290c..e9c95f06c 100644 --- a/samples/react-real-time/README.md +++ b/samples/react-real-time/README.md @@ -33,6 +33,7 @@ Here is the solution overview: Before starting, you'll need to install some prerequisites: - Install the [Azure PowerShell SDK](https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/). Make sure you've installed the AzureRM module as well. + Run the `Add-AzureAccount` cmdlet and optionaly select the correct Azure subscription to work with by running the `Select-AzureSubscription` cmdlet. - Install the latest release of [PnP PowerShell cmdlets 'SharePointPnPPowerShellOnline'](https://github.com/OfficeDev/PnP-PowerShell/releases) or a version compatible with the 201605 PnP schema version. - Install [Node.js](https://nodejs.org/en/) on your machine. - Install [Git for Windows](https://git-scm.com/download/win). diff --git a/samples/react-real-time/server/iisnode.yml b/samples/react-real-time/server/iisnode.yml index 55578cea0..b87dfa37c 100644 --- a/samples/react-real-time/server/iisnode.yml +++ b/samples/react-real-time/server/iisnode.yml @@ -1 +1,3 @@ -debuggingEnabled: true \ No newline at end of file +debuggingEnabled: true +loggingEnabled: true +devErrorsEnabled: true \ No newline at end of file