C# Connecting Web Page with Winform No ws - c#

Is there any way to connect my web application (in a server) with a winform (or console) application that is in another computer in the same network?
Will it be enough with knowing the IP?
THanks!

Yes, just make a request from the winForm app to the web site using the WebClient class
More info here http://www.codeproject.com/Articles/33798/HTTP-GET-with-NET-WebClient

Related

Create a web page to control a C# windows form application

I have developed a C# windows application with Visual Studio 2013. It runs on a server and communicates with some devices around the world through a Apache server(txt files which contains commands). Now I would need to create a web page(accessible via the internet) which allows my customers to log in and change some parameters which are in my windows application.What would be the best way to do it?
Thank you in advance for your help!
Create a web page to save customer settings in database
Expose a webservice or Web API that can be called from the desktop application in a different thread to access the customer data from the web

WCF Service hosted in internet

I have a desktop app with WinForms.
Now I need to create an app that could collect data from my desktop app via internet. I mean that it is shuld be hosted somewhere in inetrnet
For example data is: is app online/ofline, and some information about computer where desktop client is launched.
And also I will need to develop a site where I can look throught this data.(think it will be ASP.NET)
I'm going to use WCF.
Is it good idea?
Maybe there are some other technologes?
WCF is good idea. but if your application will use only http protocol then you should gave preference to web api.

Read/send data in android and c# Bluetooth Communication : c# <-> Android

I have developed a web application in C# and an android app. Web app(c#) is acting as a server and attached to SQL server 2008 R2 while android is acting as client and it communicates with web app(C#) via bluetooth( bluetooth coding is done in c# winforms).
Now one thing I know is that android cannot directly communicate with SQL database for it I have to utilize web service. I wanted to authenticate my android app login/register from web app(C#)
My winform(C#) in which bluetooth(using feet32 library) functionality is implement should act as an agent between client(android) and server(C#).
Now I wanted to know that:
How my winform application will act as an agent to communicate with client and server both and read/send data to and fro.
If I need web service to implement then in which application I should write in webapp or winform?
I wanted to authenticate my android app login/register from web app(C#). I f I have to write for it webservice then whether I will write it in web app or winform?
I am just a beginner and its my final project. Please help me to understand the complete scenario and my knowledge is too little and also if there is any good tutorial for any of these functionality please do mention the link ..
Thanks
Edited: After little Research I come to know about SOAP http web service, What you guys think where to implement this web service according to above questions.
To establish communication between two devices by using Web services you don't have to use winform application.
You can establish a connection via web services, just create a new ASP.NET project using visual studio then add a Web service and folloe the template it gives you.
Right click on the service, click on view in browser, verify there is no any error. The address of this browser is the address of your service just connect to this service from the second device.
Please check out this guideline: CodeProject Web Service
Try ICE, It got excellent cross platform support and is open source. I have been using it for last four years to communicate between c++ and C# applications.
ICE for .Net
ICE for Android

Share program variable values with Javascript running on browser

I'm developing a C# windows form application which scan passports in a client PC
in the same client PC user is going to open a webpage with which has some textboxes.
Is there any way to share some values of windows form application with the browser page?
(IS there anyway to invoke some functions in Windows App through RPC from the browser JavaScript, or any mechanism of share or send these values)
.
You can use the web server as a mutually accessible resource. The c# application can send data to the server, and the web browser can poll/listen for updates from the web server using AJAX. If the Windows application is also connected to the server, it could receive updates from the web page.
Alternatively, if you want to do a one-time sharing of data between the Windows app and the website, you could:
collect data in Windows app
send it to server
receive a unique ID
launch a web browser with the unique ID in the query string
website finds the data which was just sent by the Windows app.
Certainly there are other ways to do it as well. My goal would be to avoid having to have any knowledge of the web browser in use, e.g. requiring a plugin to be downloaded to facilitate the communication between the browser and the Windows application.
You'll want to implement a small http server in your C# app that can respond to http requests. Your web page can then make a GET request to the appropriate URL to fetch the data to populate the fields.

Cross server webservice using ajax

Hi stackoverflow users.
My server setup is the following:
A webserver with access on http/80 running www.domain.com
A app server with access to the internal network (db etc.) running a webservice
I have this simple little server setup problem.
Now I want to call my webservice from a ajax script from a website on my webserver. But since my application server does not have access to the internet this will (in my mind) not be possible since the javascript (running in the end-users browser) shoud have access to that webservice.
I came up with the solution by inventing a webservice on the webserver calling the webservice on my application server, but thats a odd solution, does any of you have a idea how to solve this?
I don't think you can do this. You will have to provide some thing on WebServer using which end user can access your App Server.
You have multiple options for this
PageMethods
Web Services on WebServer which will relay ajax calls to the App Server
Hope this info helps you.
If I understand correctly, you are just just using a webservice as a proxy through some network firewalls. There are tools that will do this for you, however, if you are running a simple service, then I don't see a problem with your setup.
One such tool for IIS is Application Request Routing

Categories

Resources