Ngx-admin: How to add integration layer for aspnet / signalr

Created on 18 Jul 2018  路  6Comments  路  Source: akveo/ngx-admin

I need to add an integration layer to provide socket connection with @ aspnet / signalr, but is there anybody who can share the current example with this

question

Most helpful comment

@oguzzaydin,

Can you provide more info?

"I have established the connection but the connection type is with ServerEvents and HttpLonPooling. The connection type is not webSocket"

Where do you see this, can you provide a screenshot?

Can you copy/paste your code that makes the call to your webapi? you can obfuscate your server address, if needed.

"and this is a problem with ngx admin"

Not necessarily. It depends on your code.

"I have not tried ngx admin project"

You got me confused. You say "and this is a problem with ngx admin." How do you know that if you have not used ngx-admin.

To my knowledge ngx admin does not provide an interface or library for SignalR/Hub connections. You will either be using http or a third party library to manage that for you.

My guess is that your Web Api is running on IIS. If so, did you enable websockets on you IIS server?

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

All 6 comments

Hi @oguzzaydin,

That's fairly easy. Integrate a library similar to https://github.com/JustMaier/angular-signalr-hub into ngx-admin.

That one is for AngularJS but google and choose the one you like for Angular 6.

I recommend you do not use SignalR from ASP.Net Core in your Web API, because it's not matured yet. Instead use SignalR 2 from ASP. Net.

https://www.asp.net/signalr

https://github.com/SignalR/SignalR

Have a look at the samples.

Hi @Prefix1802

I have established the connection but the connection type is with ServerEvents and HttpLonPooling. The connection type is not webSocket and this is a problem with ngx admin. I have not tried ngx admin project

@oguzzaydin,

Can you provide more info?

"I have established the connection but the connection type is with ServerEvents and HttpLonPooling. The connection type is not webSocket"

Where do you see this, can you provide a screenshot?

Can you copy/paste your code that makes the call to your webapi? you can obfuscate your server address, if needed.

"and this is a problem with ngx admin"

Not necessarily. It depends on your code.

"I have not tried ngx admin project"

You got me confused. You say "and this is a problem with ngx admin." How do you know that if you have not used ngx-admin.

To my knowledge ngx admin does not provide an interface or library for SignalR/Hub connections. You will either be using http or a third party library to manage that for you.

My guess is that your Web Api is running on IIS. If so, did you enable websockets on you IIS server?

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

@Prefix1802

I am using ngx admin, so I tried it in the zero project. I tried ngx project but it was not connected with websocket connection type but it was opened with an empty angular project connection with Websocket is not a problem with IIS. I will take a photo photo

I removed pace-js and it works.

Thank you it works @ouzian 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dreamerleolioa picture dreamerleolioa  路  4Comments

PatrickHuetter picture PatrickHuetter  路  3Comments

tal-shahar picture tal-shahar  路  3Comments

fabltd picture fabltd  路  3Comments

yanyim picture yanyim  路  3Comments