如何实现node.js是ASP.NET Web应用程序 [英] How to implement node.js is ASP.NET web application

查看:84
本文介绍了如何实现node.js是ASP.NET Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我是node.js的新手,因为我正在学习如何在我的实时网络应用程序项目中实现node.js。

我很开心对node.js的强烈怀疑,因为我学会了如何在.net应用程序中安装和使用node.js.

我的疑问是如何在我的asp.net应用程序中使用node.js脚本。 />
我在几个站点中搜索过node.js,但是在所有站点中,node.js应用程序可以单独创建,并且没有像web应用程序中的jquery,angular.js脚本那样使用node.js脚本。需要一个很好的解释这个doudt.Please为我做必要。

我需要在我的.net Web应用程序中使用node.js脚本完全使用node.js脚本创建一个网页。 。



我尝试了什么:



我搜索了几个关于node.js的站点,但是在所有站点中,node.js应用程序可以单独创建,并且它们没有使用像jquery,angular.js脚本这样的node.js脚本。

Hi
Am new to node.js as Am learning it to implement node.js in my real time web application project.
Am having very strong doubt with node.js as I learnt how to install and use node.js in .net application.
My doubt is that How to use node.js script in my asp.net application.
I have searched in several sites regarding node.js, but in all sites node.js application can be created separately and they have not used node.js script like jquery,angular.js scripts in web application.I need a some good explanation for this doudt.Please do the needfull for me.
I need to use node.js script in my .net web application to create a web page fully with node.js script..

What I have tried:

I have searched in several sites regarding node.js, but in all sites node.js application can be created separately and they have not used node.js script like jquery,angular.js scripts.

推荐答案

就像在ASP.NET中一样,你运行的是IIS,它正好服务于某些页面,同样地,Node.JS是一个能够运行服务器的框架,它将服务于页面(或请求是更具体)。



可以集成两者的示例场景:

1.假设你的.Net应用程序想要读取一个非常大的文件。那么很可能你会保留一个文件控件并接受该文件。现在,您可以通过ajax请求将该文件发送到特定的URL(Web方法),这将在NodeJS中配置说通过Express模块​​并返回读取的字节。



2.假设您要在SQL和MongoDB中保存一些记录,然后单击aspx按钮,您将再次点击将在NodeJS中配置的URL,然后NodeJS模块将内容保存到MongoDB。当然你需要照顾对象转换



希望你至少有一些想法:)
Just like in ASP.NET you have IIS running which serves some pages right, in the same way Node.JS is a framework capable of running a server which will serve pages (or requests to be more specific).

Sample scenarios where you can integrate both:
1. Suppose your .Net application wants to read a very large file. Then most probably you would keep a file control and accept that file. Now instead you can send that file via ajax request to a particular URL (web method) which will be configured in NodeJS say via the Express module and return the bytes read.

2. Suppose you want to save some records in SQL as well as MongoDB, then on click of aspx button, you will again hit a URL which will be configured in NodeJS and in turn that NodeJS module will save the contents to MongoDB. Off course you will need to take care of object conversion

Hope you atleast got some idea :)


这篇关于如何实现node.js是ASP.NET Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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