Two projects running in IIS

Mar 10, 2015 at 3:40 PM
Edited Mar 10, 2015 at 3:41 PM
My setup is a regular MVC project, which depends on a shared MVC project, as described in the documentation. Everything works.

But, In IIS Express, I can see both sites running, instead of just the one. I only start my main MVC project, not the shared one. In fact, I don't understand why it's started at all. I can terminate that shared site (in IIS), and everything still works.

Why is this? How do I fix it. I hope it won't work this way in production as well.
Mar 10, 2015 at 3:54 PM
Nothing in your description relates to RazorGenerator, so I'm guessing you're in the wrong forum :)
Mar 10, 2015 at 4:40 PM
No I belive its a RG problem. Well, I think it is!

There is documentation how to get a shared MVC project working. The text starts with "Update (4/26/2012): the best approach is to actually create an MVC project for that library, instead of a library project. You'll never actually run it..."

When I do that, I have two MVC projects in my solution. Both are processed by RG.

When I run my main web/MVC project, it sometimes also runs the shared one. And so both appear under IIS Express as running sites.
Mar 10, 2015 at 4:52 PM
That's just VS behavior when you have multiple Web apps in a solution. Are you running or debugging? Try setting 'Always Start WHen Debugging' to false in the library project.
Mar 10, 2015 at 5:19 PM
Edited Mar 10, 2015 at 5:20 PM
Thanks! That sorted it out!

For others who stumble on this thread...

Choose the shared web project in Solution Explorer, go to the "Properties" panel (not to one of the menu options!), choose "false" for "Always Start When Debugging".

Then only the main web project is run.