Hi DW

I'm creating a program in vb.net which is an aspx but I think the solution to my problem as I'm using vb.net can be as vb.net because most of the codes in this web application I wrote it via vb.net, I have a server it a wamp server installed and running well on my computer and what the program or web application does is register the user to the server and now the problem is that once the user has registered the domain the domain won't be accessible until I restart the wamp server so my question or problem is how can I restart the wamp server or isn't there other way of doing so because by the time I restart the server the server shutdown and then restart but we all know that the websites can't be accessed when the server is down so this will make other websites to be invaluable each and every time there is a user registering the domain so I don't know if it possible to restart the server but not putting the webserver down because what if there was other site client who maybe was processing or downloading a file from that site and on the other side on the server there is a new user who is registering the domain and the system then restarts the server and while the server is down the connection to the other site client that was processing or downloading will loose the connection and will have to restart again what ever service he/she was processing. I haven't written any code for restarting the server as I have no clue on how can I start by doing so but now I want to restart the server so that it will start to handle the requests to this domain and link it with the correct web pages. My problem is only restarting the server using VB.NET.

Thank you

Do u want to restart the server from vb.net ? I dont really understand that. But anyway why dont u stop and start the server again ? Or try to restart the server from administrator tools in control panel.

I don't want to keep on restarting it manually but as my application deals with processing online domain registration so as soon as the user click Register button under domain page it then register the domain to the server conf files and host and then create a file which is index.php inside the online user then now the domain is ready but in order for the online user who had registered the domain to test or verify that the domain has been registered by typing a domain in the WebBrowser the server must be restarted so that it will recorgnise the domain so what I want is to automatically restart the server let say once the online user had clicked the register button after creating and registering the user I want to restart the server so that when the online user click test my domain button the program will then open a WebBrowser and past the online user domain and navigate it to view the index.php file that tells the user that this domain has been successfully registered so in order to do this the server must be restarted so I want to do it systematically after the user has been registered and the domain has been registered to the server files.

The link is broken but I googlished but I didn't get what I'm looking for, and when I was just scrolling on my wamp server files I came across a file called ApacheMonitor.exe which is located 'C:\wamp\bin\apache\apache2.2.22\bin' and I double clicked this file and it run and showed an icon and when I go to this icon and click it it shows the status of the server and open an option panel which have start,stop and restart so I think I have to get a way of using or incorporate this file in my web app so that when the user click register after his/her domain has been registered the system will fire instructions to this file to restart so now I don't know how can I go about doing that. Any help with that?

Hi,

Your going to have to use the process class There is an example here of starting a process (in this case notepad,) then getting it's ID and then stopping it. You'll have to do something simliar to Apache i.e get its ID then stop and start it again.

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.