Click here to Skip to main content
15,886,632 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Friends i am developing program Visitor Log System

we have nfc id of visitors i have develop desktop app which will run on background to capture the nfc id of the visitors ...

now i have to send nfc id to my mvc web application (.net) which i have already get it from my background running app so kindly tell me how to send id from my background app to MVC web application ??
kindly help me please

What I have tried:

websockets , signalr,visual studio ,websockets , signalr,visual studio
Posted
Updated 13-Feb-19 23:24pm
Comments
F-ES Sitecore 14-Feb-19 5:13am    
Google "c# call url problematically" and you'll find all sorts of ways to make a call to your MVC site's URLs, such as WebClient etc. Keep in mind security implications though, you'll probably want https as well as some way to encrypt the parameters you send.

Don't send the id to the application, send it via a REST call to the the server. If you need to see this in the client, have a SignalR setup that sends this information over from there.
 
Share this answer
 
Quote:
i have develop desktop app which will run on background to capture the nfc id of the visitors ...
Right, and that will simply just connect and capture the value. At this point, you have the NFC ID for that person.
Quote:
my mvc web application (.net)
Where is it hosted? Online, or on the same machine? Does it have an API, or it requires a form submission?

There are so many ways in which you can submit the data to the web application, but web application dictates how you can upload the data. It does not matter from where you are sending the data—service can use the HttpClient object and upload the data to the web application. At the web application you have to support and provide an endpoint where data can be uploaded, and then web application can take it from there.

Take a look at following of my articles, that discuss a similar situation,
ASP.NET 5 Web API RESTful CRUDs and Windows 10 native application[^]
A Tip for Ajax Developers in ASP.NET MVC Framework[^]

Here are some other links that can help you out,
Call a Web API From a .NET Client (C#) | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900