c# – Running Windows Forms Through In the Browser – Education Career Blog

I wrote a client/server program using windows form application in visual studio. Now i want to put this program onto a web page, so on the client side they can just go onto any browser and and access the server.

Can i just embed the program i already hav onto a webpage or do i need to rewrite it using visual studio web application or maybe web services?? If so, will it be any different than a regular windows form application?


Sorry, you’ll have to rewrite it. Your windows forms application runs on the client, but you want to run it through the browser, where it would have to run on the server.


If you’ve followed good design principles, the core functionality of your app will not be in the forms, but in classes (hopefully in a class library) that are not specifically tied to the UI. If that is the case, you’ll just need to create a web front end (UI), and you can reuse the existing C# classes.

If, however, like many inexperienced developers, you’ve coupled the underlying logic tightly to the UI – a good example is putting code in the form’s .cs file that’s not really UI-centric – you’re looking at a lot of refactoring, and THEN writing a web front end.


Perhaps you should have a look at ClickOnce deployment. I believe you can utilize it to download the WinForm app from a website.

Leave a Comment