Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:12:11+00:00 2026-06-14T02:12:11+00:00

An Visual Studio project, for ASP.NET or WCF, typically is assigned one-to-one with an

  • 0

An Visual Studio project, for ASP.NET or WCF, typically is assigned one-to-one with an IIS application. But what if, for example, I want two WCF projects to be hosted in the same appdomain within IIS? This implies that I would have two Visual Studio WCF projects assigned to a single IIS application.

I started to try this out, and ran into the first error message. I’ve seen comments suggesting how “not to do this.” But in my case, I actually want to do this. I don’t mind if this means having three web configs for the IIS application (one at the root of the IIS app, the other two in “project” folders it contains) or if it means having only one web config for the IIS application.

So for my two Visual Studio WCF projects, I’ve shuffled around web.config contents in a variety of ways:

  • One IIS application, pointing at the physical directory where my Visual Studio solution file is found. The two WCF projects are in two respective subfolders
  • One IIS application, pointing at some arbitrary physical location, containing two virtual directories pointing to the two WCF project physical directories, respectively. I have three web config files here: one for the IIS app root, the other two in the virtual directories.

A variation of the second option above nearly worked. The final error message I got was:

The type ‘Sample.ServiceGroupAlpha.ServiceAlpha’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The type ‘Sample.ServiceGroupAlpha.ServiceAlpha’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

This prompted me to look at the ServiceHost directive, and (coyly) modify it:

<%@ ServiceHost Language="C#" Debug="true" Service="Sample.ServiceGroupAlpha.ServiceAlpha" CodeBehind="AlphaServices/ServiceAlpha.svc.cs" %>

…notice the CodeBehind attribute has a relative path I added (the name of the virtual directory). Well, this didn’t work, but I can’t help but think I’m close to making this work. I’d like to know if anyone has a fix, or can relay the “correct” way to accomplish this whole thing.

Ultimately the answer may be that there is no such thing as having two separate web/WCF projects within the same IIS application; I would be surprised if that was the case. Another answer may be “combine the two WCF projects into a single Visual Studio project/binary.” Please assume I don’t want that answer either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:12:13+00:00Added an answer on June 14, 2026 at 2:12 am

    Focusing on WCF, at this time I think the closest answer is to use and have multiple VS “WCF Service Library” projects all participate in a single VS “WCF Service Application.”

    If the approach I outlined in my question were to work “as is,” I suspect the aforementioned link may again have the answer. Instead of this…

    <%@ ServiceHost Language="C#" Debug="true" Service="WcfWebService.Service1" 
        CodeBehind="Service1.svc.cs" %> 
    

    I would use something like this…

    <%@ ServiceHost Language="C#" Debug="true" Service="WcfServiceLibrary.Service1" %>
    <%@ Assembly Name="WcfServiceLibrary" %>
    

    I no longer have the time or need to try this, but it seems the above adjustment would handle the last issue I brought up in my question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an ASP.NET Web Application project in Visual Studio 2010 but
I'm trying to start a new ASP.NET Web Application Project using Visual Studio 2008.
In Visual Studio 2010, I have project A (asp.net application). Project A references project
I have an Visual Studio 2010 ASP.Net project. And I want to deploy this
I am writing a project in asp.net C# using Visual Studio 2010. I want
I am using a regular Visual Studio Setup Project to deploy my ASP.NET application.
I have a visual studio solution with an ASP.NET 3.5 web application (WCF host)
I am working on a project ASP.net 4, MVC4(RC) using visual studio 11. I
I have a website project (C#/ASP.NET) opened in Visual Studio 11 (beta) which works
For some project templates (ASP.NET MVC, WPF MVVM app...), Visual Studio 2008 prompts the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.