The Oqtane Framework allows developers to create external modules.
- Get familiar with the Oqtane Framework.
- Clone the Oqtane Github Repository in Visual Studio Team Explorer.
- Create a new branch of the Oqtane 1.0.1 release and check it out.
- Clone the Oqtane ChatHub Module in VS Team Explorer and build in debug and release mode.
- get it work somehow good luck
Edit startup.cs:
services.AddScoped<BlazorAlertsService, BlazorAlertsService>();
services.AddFileReaderService();
services.AddSignalR()
.AddHubOptions<ChatHub>(options =>
{
options.EnableDetailedErrors = true;
options.KeepAliveInterval = TimeSpan.FromSeconds(15);
options.ClientTimeoutInterval = TimeSpan.FromMinutes(60);
})
.AddJsonProtocol(options =>
{
options.PayloadSerializerOptions.PropertyNameCaseInsensitive = false;
options.PayloadSerializerOptions.PropertyNamingPolicy = null;
});
endpoints.MapHub<ChatHub>("/chathub", options =>
{
options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling;
});
Edit TenantResolver.cs (workarround for signalr hub http context multiple tenant resolving):
string[] segments = accessor.HttpContext.Request.Path.Value.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
if (segments.Length > 1 && (segments[1] == "api" || segments[1] == "pages") && segments[0] != "~")
{
aliasId = int.Parse(segments[0]);
}
else if (segments[0] == "chathub")
{
aliasId = 1;
}
Here's a little peek of the ChatHub module: