I want to develop website ( aspx Page ) using Signalr technology. ( not MVC architecture )
can anybody help me out how to interact the db with Signalr. ( like Edit, update, delete )
Thanks.!
SignalR is used for real time communication between client and server. As for communicating with a database, that's no different than in any other asp.net application.
You can utilize SignalR to have a client call into a server method which then in turn communicates with a database but I'd be weary of that approach due to security concerns.
Related
Im beginer With Blazor , we work on system with back office and front users system that we done with MVC 5 but we want to upgrad to blazor with .Net5 , can i used Blazor Server Side as system back office and WebAssembly as Client user app if so can i set webAssembly with deferent Identify Autherntication from server side.
What you need to understand that there are two flavors of Blazor.
Server side blazor -
Where the browser is just a thin client and the user interactions are send over SignalR.
Blazor WebAssembly -
The client application and the server is separated instances. For example you can create the client side as Blazor and the server side with php, node.js, asp.net core or what ever the requirement is. Just use the communication technology that both, server and client side can understand like REST API with json.
This is something you will need to decide what to pick mostly depending on the requirements. A good point for using server side blazor if your users are not having a larger ping than 200 ms from the server. Also the number of concurent users is a great factor. More than 5000 users at the same time can overload the server, this of course depends on the server hardware.
(Server side blazor is good for intranet projects where the net lag can be keep low.)
You can read more in the official documentation.
I need to create a high-frequency realtime web application and I would like to know the best way for doing it!
A WCF Service hosted in a Windows Service needs to refresh browser clients (ASP.NET application) each seconds with fresh data (often with IE8).
I've think about 2 solutions :
1. WCF Callback from WCF Service to Asp.Net Application server side and SignalR from ASP.NET Application server side to ASP.NET Application client side.
SignalR from WCF service to Asp.NET Application client side but is it possible??? If yes, how because I just found tutorials with communication between Asp.net server side and cient side and never with signalR as server hosted in a WCF.
Documentation I found is :
http://blog.maartenballiauw.be/post/2011/12/06/Using-SignalR-to-broadcast-a-slide-deck.aspx
http://www.asp.net/signalr/overview/getting-started/tutorial-server-broadcast-with-aspnet-signalr
http://www.asp.net/signalr/overview/getting-started/tutorial-high-frequency-realtime-with-signalr#serverloop
Thks
I think this post can help: SignalR as WCF web socket service :
...
You can self-host the SignalR server:
Taken from (https://github.com/SignalR/SignalR/wiki/QuickStart-Hubs):
I have asp.net mvc application, it uses linq to sql to connect to database.
How to stop handling all requests to application when there is many database connection erors?
There will be when database is down or there is wrong connection string. Will be good to stop application and show for all users simple message for all requests during some period.
You can use app_offline, if you want to close access to the website during maintenance work etc.
I have a silverlight application that uses wcf service. This application is shown from a link in an existing project of asp.net web application type. There is a userid session found in the project that i want to transfer it to the silverlight application. I thought of query string but its not a secure thing to do it. so is there a way to transfer the asp session object to the wcf application which the silverlight application communicate with?
You could write a web service that you could use in Silverlight and with which you could get and set single values from and to the current session.
If you want to transfer the whole session to Silverlight, this is of course also possible by a query parameter or the like.
Concerning security, it depends on your scenario. There is no way around that, you do have to send the data over the wire to the client in some way. You can encrypt it, but the Silverlight client will have to know how to decrypt it. Silverlight client code can of course always be inspected in reflector by anyone who has access to the application.
What you can do is set everything up to use SSL for communication, it might be sufficient for your scenario if you never send more information to a client than a client is allowed to know.
If you can run WCF services in ASP.Net compatibility mode then you would be able to share all of the ASP.Net Runtime Objects such as Session, Cache etc.
I was thinking about integrating some instant messaging function into an existing ASP.NET web application, e.g:
the web application can display the online-status of users (are they currently logged in with their IM client)
users can send messages from the web application to the IM client of other users
users can initiate a IM chat from the web application (without having to know the other user's IM identification beforehand)
Does anyone know about some existing libraries, sample applications or other resources that might help implementing such a feature?
Thanks a lot for sharing your knowledge.
You should try Jabber. Demo client avaiable here.
There is an architectural overview, the main concept looks like this:
(source: webta.net)
And some citation from the site:
1. Goal
Create an multi-service instant messaging AJAX-based web application with internal accounting.
2. Main problem
We need to connect to IM servers from HTTP client (browser).
HTTP is a stateless protocol. This means that, theoretically, each HTTP request is being proccessed by separate http daemon proccess.
Once request proccessed (data sent to client), server fogets about client.
All IM services protocols are stateful.
When client connects to IM server, socket connection being created and connection much remain open for succesfull communication.
There's a list on the ASP.net site.
http://www.asp.net/Community/Control-gallery/browse.aspx?category=54
You might want to look at the .net implementation of jabber:
http://code.google.com/p/jabber-net/