4

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.

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

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

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

5 Answers 5

4

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

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.

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.

1
  • What I successfully do for one app, is to use ILMERGE to create a single executable that is directly runnable "from the web" by clicking the link. Of course it downloads locally, but it then requires no installation and no administrator privileges.
    – Uwe Keim
    Dec 30, 2010 at 10:50
2

You could at least deploy it via the web using ClickOnce

ClickOnce deployment enables you to publish Windows-based applications to a Web server or network file share for simplified installation. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce technology.

http://msdn.microsoft.com/en-us/library/t71a733d(v=VS.90).aspx

1
  • I agree with @frou. That is the way to go. Or I think if the current winforms application is a 3-tier application and is designed correctly, you should be able to put a web ui quickly. Here you just need to build your presentation layer, rest all layers will remain same.
    – P.K
    Dec 30, 2010 at 11:24
1

You can deploy your application through the network using click-once and support updates trough it but I don't know any way to transform a winform application into a web-based application and I really doubt there is one considering the fundamental architecture changes between the two plaforms.

1

I would recommend investing some time and modify the architecture to adopt SOA.

You should restructure your code and create a web service that would expose methods to the clients. These methods would take input from the client, perform operations and give back the data to display to the UI. You can pick your core business logic classes from the existing solution and reuse them as is. There might some amount of effort involved to separate out presentation logic from the business logic, but it would well worth the effort.

Once you have your web service` hosted, you can use it with either a desktop application, or a web application. Of course, you would need to code the UI for Web application, but it would be much easlier than writing it from scratch.

1
  • This is definitely what I would suggest. Even though it may be some work to restructure the architecture, this seems like the least intrusive approach in terms of time/effort and will possibly give you greater flexibility in maintaining the application in the future. Dec 30, 2010 at 17:40
0

If you are using a database application in Windows then you can do one thing. You can deploy the database on the server, but you want to design a front-end application in ASP.NET for it, so that you can use your Windows application on the machine where you installed your application, and all others can also access it through the web.

1
  • It is a database application. Masters are in one of the web application and transactions are in the other web application.
    – Ravikumar
    Aug 14, 2020 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.