我有一个C#Windows窗体应用程序.我可以将其部署在Web上,以便用户可以通过Web访问吗? [英] I have a C# Windows Forms application. Can I deploy it on web, so that users can access through web?

查看:301
本文介绍了我有一个C#Windows窗体应用程序.我可以将其部署在Web上,以便用户可以通过Web访问吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经使用C#(.NET 2.0,Visual Studio 2005)完成了基于Windows的应用程序.现在,基于Web重做该应用程序是一个耗时和资源的过程,对我来说几乎是不可能的.

We have done a Windows based application useing C# (.NET 2.0, Visual Studio 2005). Now redoing this application web based, is a time and resource consuming process and which is next to impossible for me.

我们需要托管它,以便用户可以通过Internet访问.

We need to host this, so that the user can access through the Internet.

通过 RDP ,用户可以访问Windows应用程序,但是这里的问题是更多的用户可以不能同时运行.

Through RDP the user can access the Windows application, but the issues here is more users can not operate simultaneously.

它可以作为Web应用程序托管,以便用户可以通过浏览器访问它吗?

Can it be hosted as a web application, so that the user can access it through browser?

推荐答案

否,您不能像在网站上那样直接通过Web使其可用,Windows Forms应用程序直接在客户端计算机上运行.

No, you cannot make it available directly via the web as you would a website, Windows Forms applications run directly on the client machine.

您可以做的是将其打包为MSI安装程序,以便最终用户可以轻松地安装它,然后可以通过Internet访问资源(例如数据库)(公开这些资源的最简单方法是通过网络服务).如果您选择使用此机制,则只需重构应用程序的一部分,前提是您已经将其很好地构造为

What you can do is package it up as an MSI installer, so that the end user can easily install it, and then have access resources such as a database via the Internet (the simplest way to expose these resources is as a web service). If you choose to use this mechanism then you will only have to refactor part of your application, assuming that you have already structured it nicely into an n-tier application.

请注意,尽管如此,用户不必通过Internet访问这些资源-您提到的使用RDP的用户将建议您将其放在Intranet上,这意味着您可以托管"诸如以下的服务:所有客户端都可以通过网络查看(和访问)的计算机上的数据库.在这种情况下,所需要做的就是更改应用程序配置文件中可能存在的所有连接字符串或路径.

Note that the user doesn't have to access these resources via the Internet though - your mention of users employing RDP would suggest that you have it sitting on an intranet, which means you may be able to "host" services such as a database on an machine that all the clients can see (and access) across the network. In this case all that may be required is to change any connection strings or paths you may have sitting in the configuration file of the application.

这篇关于我有一个C#Windows窗体应用程序.我可以将其部署在Web上,以便用户可以通过Web访问吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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