1

I work on a web server that runs as a console application. It is based on HttpListener. When I start the project in Visual Studio 2012 it opens console.

In addition to starting the console I need to open a web browser.

I know that there is a possibility to start multiple projects in VS. However my requirement is to keep this application as a single project (this is a sample VS project provided with a product SDK, it should be simple).

tshepang
  • 12,111
  • 21
  • 91
  • 136
IT Hit WebDAV
  • 5,652
  • 12
  • 61
  • 98

1 Answers1

0

In your process, after you've started your listener, simply Process.Start("http://localhost:12345"); this will start the default web browser at the same time as the application.

You can make this optional based on a command-line switch or other configuration setting.

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380