I would like to put my windows form application to be online, where by it will connect to a webserver and get data from the database on the webserver. Are there any sites or ebooks I can get on windows app going online

Dani AI

Generated

You can keep a Windows Forms UI and still work “online” without exposing your database. The pattern is: WinForms client calls your own HTTPS service; the service talks to the database. is right that if you want pure browser access, build a web app. But if you prefer a desktop client, host an ASP.NET Core Web API (or gRPC) and call it from WinForms. Also, skip WebClient; it is obsolete in modern .NET. Use HttpClient instead. (learn.microsoft.com)

Quick start workflow:

  1. Server: create a minimal Web API with endpoints like GET /api/customers and secure it (JWT/Bearer). (learn.microsoft.com)
  2. Client: reuse a single HttpClient instance and (optionally) the System.Net.Http.Json helpers.
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;

static readonly HttpClient http = new HttpClient { BaseAddress = new Uri("https://api.example.com/") };

public async Task<List<Customer>> LoadAsync(string token)
{
    http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
    return await http.GetFromJsonAsync<List<Customer>>("customers");
}

If you liked @Ramy Mahrous’s WCF idea in 2009, note today’s options: WCF server hosting is not part of modern .NET; you can either migrate existing WCF servers to CoreWCF or switch to gRPC, which is first‑class in ASP.NET Core and cross‑platform. (learn.microsoft.com)

Deployment and updates: for installed desktop clients, ClickOnce is available again for .NET 5+/.NET 6+ and integrates with modern CI/CD, or package with MSIX. ClickOnce remains the easiest path for auto‑updates. (devblogs.microsoft.com)

For ’s “access through a browser” scenario without rewriting the UI, consider publishing the app via the Remote Desktop Web Client (HTML5). Users hit a URL and stream the desktop app; just remember this is remoting, not embedding the EXE in a page. (learn.microsoft.com)

Tip: never connect the WinForms client directly to an internet‑facing DB. Put an API in the middle, use HTTPS, and require tokens.

Recommended Answers

All 12 Replies

You would be best off creating an ASP.NET application and moving your logic to a web project. There are software products out there to get form applications online but they're obviously not native and performance/usability suffers. Is there any reason you don't want to do a web project?

The reason why I ask is because i have used an application that connected to an online server to get data from a database on a webserver and there was no use of web browser.I don't want to create my application using a web browser I want a windows form application.Are there any technologies I need to look into references would be great

Use classes from System.Net namespace ; System.Net.WebClient.

I would like to put my windows form application to be online, where by it will connect to a webserver and get data from the database on the webserver. Are there any sites or ebooks I can get on windows app going online

same question. the only difference is my windows application will be accessed through a browser. Is it possible to get windows application online?

thanks!

What do you mean with online? Internet or Intranet?

What do you mean with online? Internet or Intranet?

I mean internet. Kind of booking system.

The only applicable scenario is everyone (clients) install client application (.exe) and all the functionalities in it; talk directly to webservice which handles requests and responds back to the client.
What you need to know is
Host webservices on domain like any web application.
Talk to webservices from any client application.

All about webservices http://msdn.microsoft.com/en-us/library/ms996507.aspx

Another alternative is to use WCF, I personally recommend it http://msdn.microsoft.com/en-us/netframework/aa663324.aspx

The only applicable scenario is everyone (clients) install client application (.exe) and all the functionalities in it; talk directly to webservice which handles requests and responds back to the client.
What you need to know is
Host webservices on domain like any web application.
Talk to webservices from any client application.

All about webservices http://msdn.microsoft.com/en-us/library/ms996507.aspx

Another alternative is to use WCF, I personally recommend it http://msdn.microsoft.com/en-us/netframework/aa663324.aspx

Thanks for the quick reply!

I don't want everyone to install the application in their PC I just want them access a website where Windows Application is embedded.
So, I am thinking whether to use C# or ASP.Net

All my replies were on direction to use Windows-based application.
SURE THE LOGICAL SOLUTION is to use Web-based application (ASP.NET), it's very easy and you'll go through it quickly. Best of luck

Thanks for the post Ramy. you were on point on the client install the client app.going to try it out the webservice thanks again

thank you Ramy,

I think I might ask some more questions in the near future!

Cheers!

You are welcome, mundetas, Donish
Your questions are welcome :)
Please mark it as solved, mundetas

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.