C# Web api duplex web socket - c#

I need a structure for send data
i use asp.net mvc 5 and i want to send data to mobile device and wait return response.
how can it ?
(Web api or Mvc) <-----> Mobile Device

Related

Implement Fingerprint Login To .NET MVC WebApp

How can I implement a fingerprint login to my .NET MVC Web Application?
I want to:
Click a button in my MVC web application.
The button will open some application in my cell phone that will allow me to
insert my fingerprint.
Then the result (success or failure) will be returned back to my web app.
Is it possible?
All I've found is solutions that use the fingerprint device that is connected to the computer, or mobile apps that connect to the cell-phone fingerprint app.
I want to connect my web application to some mobile app and do the fingerprint authentication via that mobile app.
You need a client app for your phone to perform biometric, then api client on computer to receive login validation.
What type of phone?
You need to create an api or at min a socket/port client/server to recieve and send your packets between pc and phone. So two applications.

How to use SignalR in ASP.NET Webforms (C#) & Web API for user based notification when Inser/Update/Delete in SQL Server like Facebook?

I am new to SignalR. I've a ASP.NET web form application & Web API project (Not Core), both are different projects. I need to get notification in web form app when there is any change in a table (SQL Server) like in Facebook. Web app is a user login based so I need to send notification to a specific user.
Should I use SignalR Self Host solution to get notification in website & mobile app or other solution?

Communicate web app and api project using SignalR & StackExchangeRedis

I'm working with a project built with ASP.NET Core 2.2. The main solution contains multiple projects, which includes API, web and other class libraries.
We've used SignalR to displaying shared messages/notifications between the API project and the web project. For example, adding a new employee record from an API should call SignalR Hub and all the web client should received the notification.
To make it communicate, we have used Radis with SignalR
// SignalR Configuration
services.AddSignalR(option =>
{
option.EnableDetailedErrors = true;
option.KeepAliveInterval = TimeSpan.FromSeconds(3);
}).AddStackExchangeRedis(options =>
{
options.Configuration.ChannelPrefix = "TestChannel";
options.Configuration.EndPoints.Add("127.0.0.1", 6379);
options.Configuration.ClientName = "ClientNameSignalR";
options.Configuration.AllowAdmin = true;
});
When I try to get client list in Radis,
Now, how to sending and receiving messages from web app and API?
The code you share is used to set up a Redis backplane for scaling out your ASP.NET Core SignalR app.
how to sending and receiving messages from web app and API?
To achieve above requirement, you can do:
For your API project and Hub server, you can inject an instance of IHubContext in your API controller, then you can access to an instance of IHubContext in controller action and push message/notification to client(s).
Access a SignalR IHubContext to send notifications to clients from outside a hub
For your web app, you can built and implement SignalR JavaScript client functionality to receive notifications.
SignalR JavaScript client

Web API upload to a storage service stream request bytes

I am trying to create a Web API controller to post a file to a storage service like Azure storage for example. The web api client is an AngularJS web page. The issue now is the progress bar on the file upload is showing 100% without sending any bytes to the backend storage service. I did turn off the buffering on uploads. Is there a way send the bytes to the backend storage as we receive them from the web api client? Is this possible with HttpClient in .NET 4.5?

Send Data from aspx to C# windows app

I want to send data from my Windows form to client wep page(.aspx).Pls help me.
You could use Web Services within your ASP .NET application and consume them them from your WinForms app.
Give a look to these articles:
Web Services with ASP.NET
Using ASP.NET Web Services
Walkthrough: Calling XML Web Services from Windows Forms
I would say use httpwebrequest and httpwebresponse to do this. it will be easy to do also.check the link below
http://www.codeproject.com/KB/IP/httpwebrequest_response.aspx
You can use .NET Remoting for doing this. Your desktop app can act as a remoting server, whereas your web app will be the remoting client.
The marshalled object exposed by your server (Windows app) will be accessed by the web application, which will call a method for getting the data. Your windows app will provide the data as a serializable object to your web application, which it will deserialize and process.
ther are several ways,
1) If you want to send data from window app to Web App then Use Query String.
2) If you want to send data from Web App to Windows app then you can User Either Remoting or Webservice.
3) You can user Biztalk Server for Integration.(this would be quite expensive).
4) You can build your own messaging mechanism, write all you information into a file and ask you application to read the file.

Categories