如何通过我的桌面APP将变量发送到我的MVC应用程序 [英] How to send variable to my MVC app through my desktop APP

查看:80
本文介绍了如何通过我的桌面APP将变量发送到我的MVC应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friends我正在开发程序访客日志系统



我们有访客的nfc id我开发的桌面应用程序将在后台运行以捕获nfc id访客...



现在我必须将nfc id发送到我的mvc web应用程序(.net),我已经从我的后台运行应用程序中获取它告诉我如何从我的后台应用程序发送id到MVC网络应用程序?

请帮助我



我有什么试过:



websockets,signalr,visual studio,websockets,signalr,visual studio

解决方案

< blockquote>不要将id发送到应用程序,通过REST调用将其发送到服务器。如果你需要在客户端看到这个,请设置一个SignalR设置,从那里发送这些信息。


引用:

我开发了桌面应用程序,它将在后台运行以捕获访问者的nfc id ...

对,这只是连接和捕获值。此时,您拥有该人的NFC ID。

Quote:

我的mvc web应用程序(.net)

托管在哪里?在线,还是在同一台机器上?它是否有API,或者需要提交表单?



您可以通过多种方式将数据提交到Web应用程序,但Web应用程序决定了如何上传数据。从发送数据服务的位置无关紧要,可以使用 HttpClient 对象并将数据上传到Web应用程序。在Web应用程序中,您必须支持并提供可以上载数据的端点,然后Web应用程序可以从那里获取数据。



看一下我的文章,讨论类似的情况,

ASP.NET 5 Web API RESTful CRUD和Windows 10本机应用程序 [ ^ ]

提示ASP.NET MVC框架中的Ajax开发人员 [ ^ ]



以下是一些可以帮助你的其他链接,

从.NET客户端调用Web API(C#)| Microsoft Docs [ ^ ]


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

解决方案

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.


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[^]


这篇关于如何通过我的桌面APP将变量发送到我的MVC应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆