用于c#控制台应用程序的Web界面 [英] Web Interface for a c# Console Application

查看:410
本文介绍了用于c#控制台应用程序的Web界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我写了一个控制台应用程序正在执行不同的操作,

就像检查不同网络主机的状态一样。


我想实现一个WebInterface来显示这样的状态,也许

也会向我的应用程序发送一些命令。


可以在asp.net中完成吗?我虽然只需要通过我的

对象参考ASP页面,所以我可以访问它的属性...

但我不知道怎么做(如果有可能的话) )。


我看到很多关于WinForms到WebForms的帖子,但没有关于

ConsoleApp到Web的信息。


任何链接都会非常感激。

谢谢


Viashino

Hi,

I have written a Console Application that is doing different things,
like checking the status of different network Hosts.

I would like to implement a WebInterface to show such status, and maybe
also send some commands to my app.

It is possible to do it in asp.net ? I though I only need to "pass" my
object reference to the ASP page, so I can access its proprieties...
But I don''t know how to do it (and if it is possible).

I saw lots of threads about WinForms to WebForms, but none about
ConsoleApp to Web.

Any link would be very appreciated.
Thanks

Viashino

推荐答案

你好


通过事物的声音,你的所有逻辑都在控制台应用程序中。


你能做什么将所有这些放在一个类库中并使用

控制台或asp.net作为ui层


Sam


谢谢你的回答。


确实逻辑是在控制台应用程序中,因为这个程序需要运行

24/24。


我不知道将它放入类库是否可行,因为我需要

来访问对象而不是classe s。

我认为将它放在一个类库中意味着只输出

类...我错了吗? (班级图书馆对我来说很新)。


你能加点链接吗?


谢谢


samuelhon ha scritto:
Thank you for the answer.

Indeed the logic is in the console app, since this program needs to run
24/24.

I don''t know if putting it in a class library would work, since I need
to access the objects, and not the classes.
I think that putting it in a class library means only exporting the
classes... Am I wrong? (class library is pretty new to me).

Can you please add some link?

Thanks

samuelhon ha scritto:

你好


通过事物的声音,你的所有逻辑都在控制台应用。


您可以做的是将所有这些放在类库中并使用

控制台或asp.net作为ui层


Sam
Hi there

By the sounds of things, all your logic is in the console app.

What you could do is put all of this in a class library and the use the
console or asp.net as the ui layer

Sam





如果是这样的话那么一个控制台应用程序是一种错误的应用程序,你需要

一个获胜服务或一个网络服务,后来是我建议的方式去。


或者只是你可以在它周围实现一个网络应用


-

Ignacio Machin

machin AT laceupsolutions com


< vi ****** @ email.itwrote in message

news:11 **************** *****@k21g2000cwa.googlegro ups.com ...
Hi

If this is the case then a console app is the wrong kind of app, you need
either a win service or a web service, the later is my suggested way to go.

Or simply you could implement a web app around it

--
Ignacio Machin
machin AT laceupsolutions com

<vi******@email.itwrote in message
news:11*********************@k21g2000cwa.googlegro ups.com...




我写了一个控制台应用程序正在做不同的事情,

比如检查不同网络主机的状态。


我想实现一个WebInterface来显示这样的状态,也许

也会向我的应用程序发送一些命令。


可以在asp.net中完成吗?我虽然只需要通过我的

对象参考ASP页面,所以我可以访问它的属性...

但我不知道怎么做(如果有可能的话) )。


我看到很多关于WinForms到WebForms的帖子,但没有关于

ConsoleApp到Web的信息。


任何链接都将非常感激。

谢谢


Viashino
Hi,

I have written a Console Application that is doing different things,
like checking the status of different network Hosts.

I would like to implement a WebInterface to show such status, and maybe
also send some commands to my app.

It is possible to do it in asp.net ? I though I only need to "pass" my
object reference to the ASP page, so I can access its proprieties...
But I don''t know how to do it (and if it is possible).

I saw lots of threads about WinForms to WebForms, but none about
ConsoleApp to Web.

Any link would be very appreciated.
Thanks

Viashino



这篇关于用于c#控制台应用程序的Web界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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