I\'m a C#, ASP.NET newbie.
Let\'s say I have an existing C# project (from a \"Console Application\" template; I work with Visual Studio). I want to be able to start a si
You can use the 'net' command to start or stop services, including the service used by IIS (the web server on windows).
Make sure IIS is installed and your site works like a normal ASP.Net site. Then set the "World Wide Web Publishing" service startup type to manual instead of Automatic. Now you can start it at any time by issuing a command like this at the console (and from your program via Process.Start()
):
net start w3svc
Now you'll have some issues with this if you're thinking more about just dumping this app on any old computer. But if the app is intended to help manage a specific system you'll be fine.