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
  • 11,360
  • 21
  • 88
  • 132
IT Hit WebDAV
  • 5,435
  • 12
  • 56
  • 91

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
  • 85,268
  • 51
  • 226
  • 362