0

I have a solution consisting of two projects. One project is an ASP.NET website, and the other project is a set of WCF data services that the website communicates with.

When the solution is opened, IIS Express starts serving the data services on localhost, as shown below:

WCF running on localhost in IIS Express

Given that this project only rarely modifies the data services/runs them locally (usually the data services are published to a remote server): is it possible to prevent a WCF project from automatically being hosted on IIS Express when its solution is loaded, so that CPU/memory isn't wasted?

Clicking "Stop Site" in the tray icon works temporarily, but it seems like the services are always running the next time you check back.

Daniel Neel
  • 1,197
  • 13
  • 28
  • 1
    Possible duplicate of [How to Prevent Visual Studio launch WcfSvcHost.exe in Debuggin?](http://stackoverflow.com/questions/283145/how-to-prevent-visual-studio-launch-wcfsvchost-exe-in-debuggin) – Daniel Neel Feb 24 '17 at 17:43

2 Answers2

1

Right click on the solution in the solution explorer, click set startup projects, and choose which ones you want to start or not start.

However, your ASP.NET site may not function properly without the local WCF service running...

Dan Field
  • 20,885
  • 5
  • 55
  • 71
1

Your solution starts both projects. You can change your solution's settings and start just one project.

Here are the steps:

  1. In 'Solution Explorer', right click on your solution and select 'Set Startup Projects'
  2. You can either select 'Single startup project' option and set the start up project to the one that you use

    OR

    Select 'Multiple startup projects' and set the 'Action' for your WCF project to 'None'

Sparrow
  • 2,548
  • 1
  • 24
  • 28