Skip to content

Commit

Permalink
less crashy signalR?
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Aug 28, 2023
1 parent 45fb240 commit 2e05dc4
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/web/Client/Features/Chat/ChatClientHub.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@page "/"
@using Microsoft.AspNetCore.SignalR.Client
@inject NavigationManager Navigation
@implements IAsyncDisposable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceGroupName": {
"type": "string",
"defaultValue": "Jordnaer",
"metadata": {
"_parameterType": "resourceGroup",
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
}
},
"resourceGroupLocation": {
"type": "string",
"defaultValue": "uksouth",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource group. Resource groups could have different location than resources."
}
},
"resourceLocation": {
"type": "string",
"defaultValue": "[parameters('resourceGroupLocation')]",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
}
}
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"name": "[parameters('resourceGroupName')]",
"location": "[parameters('resourceGroupLocation')]",
"apiVersion": "2019-10-01"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('jordnaer', subscription().subscriptionId)))]",
"resourceGroup": "[parameters('resourceGroupName')]",
"apiVersion": "2019-10-01",
"dependsOn": [
"[parameters('resourceGroupName')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"sku": {
"name": "Free_F1",
"tier": "Free",
"size": "F1",
"capacity": 1
},
"location": "[parameters('resourceLocation')]",
"name": "jordnaer",
"type": "Microsoft.SignalRService/SignalR",
"apiVersion": "2018-10-01"
}
]
}
}
}
],
"metadata": {
"_dependencyType": "signalr.azure"
}
}
10 changes: 5 additions & 5 deletions src/web/Server/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7116;http://localhost:5235",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ConnectionStrings_JordnaerDbContext": "Server=localhost,1433;Database=jordnaer;User ID=sa;Password=6efe173b-3e33-4d6c-8f50-3e5f7cadd54c;Persist Security Info=False;TrustServerCertificate=true;",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.Azure.SignalR"
}
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ConnectionStrings_JordnaerDbContext": "Server=localhost,1433;Database=jordnaer;User ID=sa;Password=6efe173b-3e33-4d6c-8f50-3e5f7cadd54c;Persist Security Info=False;TrustServerCertificate=true;",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.Azure.SignalR"
}
}
}
}
5 changes: 2 additions & 3 deletions src/web/Server/Properties/serviceDependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"dynamicId": null
},
"signalr1": {
"type": "signalr",
"connectionId": "ConnectionStrings:AzureSignalR",
"dynamicId": null
"type": "signalr",
"connectionId": "ConnectionStrings:AzureSignalR"
}
}
}
11 changes: 5 additions & 6 deletions src/web/Server/Properties/serviceDependencies.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@
"dynamicId": null
},
"signalr1": {
"serviceConnectorResourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.ServiceLinker/locations/swedencentral/connectors/AzureSignalRConnectionString_4B4C9F2617",
"secretStore": null,
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.SignalRService/SignalR/jordnaer",
"type": "signalr.azure",
"connectionId": "ConnectionStrings:AzureSignalR",
"dynamicId": null
"serviceConnectorResourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.ServiceLinker/locations/swedencentral/connectors/ConnectionStringsAzureSignalR_33750E4577",
"secretStore": null,
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.SignalRService/SignalR/jordnaer",
"type": "signalr.azure",
"connectionId": "ConnectionStrings:AzureSignalR"
}
}
}

0 comments on commit 2e05dc4

Please sign in to comment.