0

How or is it possible to send a request from a website to a c# program/service/server, work the request and send back the information to the website?

E.G.:

I click on a website on a button to request the remaining disksize of a server patition, the website send the request to the c# program, it works the request and sends back the information to the website. The website noticed the data(with an event or something) and displays it.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
typ1804
  • 47
  • 1
  • 6
  • One way is to define web services. Refer WCF – now he who must not be named. Sep 10 '13 at 12:00
  • Where will be your website locate and you need to check the disk space of any other server or the server where you website hosted? – Tejas Vaishnav Sep 10 '13 at 12:01
  • 2
    If you need to check that thing, with the website hosted server, than you can do that just simple ASP.NET web pages, having button and its code behind side you can write code to check the disk space.. – Tejas Vaishnav Sep 10 '13 at 12:02
  • OR if you need to check other server space than you can write Web service and host that service over server for which you need to check the disk space.. than simply call that web service using jQuery or code behind side using service reference. – Tejas Vaishnav Sep 10 '13 at 12:04
  • TCP Sockets between your webserver and the "c# program/service/server" might also be a solution. – Deblaton Jean-Philippe Sep 10 '13 at 12:04
  • Is the website an apache / IIS server or do you mean the browser? If it is a server then use any of the network communication protocols such as TCP sockets, web services, named pipes, etc to communicate with C# program. Whichever option you choose will depend on the location of the c# program relative to the web server. If you mean the browser querying a web server then this is just a standard ASP.NET web server. – acarlon Sep 10 '13 at 12:09

1 Answers1

0

Well, it depends on your architecture.

I can give you same advices in order to better define the project.

Your despription refers to a web client (so capable of doing HTTP requests), a web server (capable of receiving such requests). You do not give much details about the backend, i.e. the servers you want to enquire.

Are the web server and the enquired server the same machine?

You also do not give much info about the refresh rate of the info. I mean, do you need a real time picture of the enquired resources or the resources can be sampled (in a db, by polling the target server for example) and then exposed through a web service?

Have a look at this article Get pc (system) information on windows machine - C# script.

Community
  • 1
  • 1
Alberto De Caro
  • 5,147
  • 9
  • 47
  • 73
  • the idea is to create a projectmanager...therefore i would create a website in our intranet. but as far as i know i can´t get access to the harddrive to read files, etc. so i thought about a c# service to get information and so and use the website for displaying and control – typ1804 Sep 10 '13 at 12:24