It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
i have Delphi application and i added service to it , how can i install and start and stop it by Main Form buttons ?
i can do it in separate project service , but my goal is make interface for service to control it .
Thanks
You have to use the Win32 API Service Control functions - CreateService(), OpenService(), StartService(), ControlService(), etc. A service cannot display its own UI while it is running, the UI needs to be run as a separate process. But you can host the Service code and UI code in the same executable if you want to, using command-line parameters to know when to run as a service and when to run as a UI. But that is more of a code management issue. You could just as easily host the two codebases in separate executables instead.
You can't have a visual interface to your service in the same application any longer.
As of Windows Vista and above, services run in a different desktop than the user and can't visually interact with the user. You need to write a separate application that communicates with your service via named pipes, mailslots, or some other form of interprocess communication, or through one of the service control functions available through the Windows API.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to write a program for transferring files and documents between a network computers. Many files may have been transferring at moment. every computer can receive and send files, it means system have to be ready to send files and listening to receive files.
I can configure program on each system as i want (for example give a list of connected computers' ip to program to choose target system for transfer file into)
Do i have to make Server-Client type applications or i can have JUST one program running on computers? I know question is vast but helping me to choose the best way will be appreciated.
>
I want to write this program by Delphi 2010 and network computers os is Windows 7.
You can do it peer-to-peer. The very same program can both listen for requests to transfer or receive files from other computers and issue its own requests to transfer or receive files to other computers.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How to publish or deploy .NET website without delays?
I have look for websites that are build over .NET technologies, like StackOverflow, and I never saw them down because an update is being made. For my web sites, I got down time in minors updates, like correcting some bugs on my Controllers (I use MVC), not by doing something bigger like database or server movements.
So how can I prevent site loading delays due to ASP.NET Startup?
I know that it require "ASP.NET worker process" to compile the code, but how can I prevent the traffic issues.
The typical way of doing this is creating a farm of multiple web servers and, when you want to update the site, take each server offline and update them one at a time. Investigate How to create an ASP.NET web farm?.
It's all about the server setup. Most companies have at least 2-3 server: 2 Frontend servers and a backend server. Then you can take one of the frontend servers down, point all traffic to the other one, upgrade the server which is down, and then take that server up, and continue the process with the other.
In some cases you would use load balancing to make sure the two servers are synchronized.
You will notice that sometimes you cannot post here on Stackoverflow because of updates. That's because the database is a shared server, which "can be down", if you need an upgrade. Yes, there are also options against this, but it can gives problems if everyone writes to the database while the site is up, hence the "readonly mode" from time to time.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a potential client that wants to build a platform agnostic application. Initially it'll run on a windows 7 tablet and will expand. Its a roofing business, so they're going to take pictures with the camera, fill out some forms, and then generate a report from it. The first thing I can think of is making an API call to a web service I create that does some crystal reports magic them returns to the client.
Problem is, they aren't always guaranteed internet access. What can I do here? My thoughts right now are building the app in rails or MVC 4.
It is pretty hard to answer your question since it won't be an exactly answer, but my thougths are:
1° - Build a Windows Phone app that will fill out everything that is
needed and store locally
2° - Do a background process that will send this via rest calls to a
service
3° - Build the service to receive the requests and a rails app to the
client to login and have access to the reports this can be made in
rails
This is a possibility if they need to access reports from anywhere. Otherwise the reports could be made in the tablet itself.
Just some thoughts, the solution may take a very different path, since you were not accurate enough to a definitive answer.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I hope there is someone that can help me.
I am writing a software that users can fill in information into a database, but I want to install that same software that I created on multiple computers. When a other user is inserting new information into the software and click save then it must show on his/her computer and at the same time on the other PC's in the network.
I think this is a difficult one to crack, but I hope some one can help me.
Greetings
There are many ways to solve this. I recommend to use a server-side application (installed on the database server system for example) which receives a notification from the inserting app. Then, the server side app will send either a UDP broadcast or use a TCP connection to the clients to notify them.
The clients then just need to listen for server messages in a background thread. The messages will be 'pushed' from the server to the client.
An example which can be used as a starting point is the Indy Telnet client component which has a listener thread for server messages. You do not have to open the client firewall for incoming connections to work this way.
There are also complete messaging solutions available, but maybe they would be to heavyweight for your requirements. If you like, I can provide some links.
I would not recommend
database polling (too expensive and unflexible)
database events (run in the server process, could block operation or crash)
A standard which can be used for this messaging system is WebSocket. There are commercial and open source Delphi implementations for the client and server side.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to implement a Web Service that will allow users to store arbitrary data in my home computer and execute arbitrary batch programs to manipulate said data. In order to keep things simple, so I will not deal with priority queues and concurrent processes yet. My process request queue will be a simple FIFO queue.
So, I know how to implement Web Services, and obviously I know how to implement a FIFO queue, but I do not know how to implement a system service that runs in the background, waiting for requests. Where could I find learning resources on how to develop a Windows service?
I already know Windows development using the Windows API, MFC and even some ATL/WTL. (I also know .NET, but I do not like it very much, because it gets in the way how I design programs.) But I would rather not have to deal with COM.
Since you're developing a service on Windows and you want to use web services chances are that you will want to host your solution in IIS which is already the type of always-on, background application that you want. E.g. runs all the time regardless of login or UI.
If you use the .NET framework then your implementation will become especially easy due to all the project templates available in Visual Studio.
Here's some CodeProject tutorials:
http://www.codeproject.com/KB/WCF/WCFPart1.aspx
http://www.codeproject.com/KB/WCF/WCFWebService.aspx