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 7420301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:12:52+00:00 2026-05-29T08:12:52+00:00

Background: I have a Visual Studio solution consisting of a website + REST web-service

  • 0

Background:

I have a Visual Studio solution consisting of a website + REST web-service that I’d like to split into a web services project and a web site project.

Currently, the web service is kicked off during application startup via App_Code\global.asax.cs, with the following code:

public class Global : System.Web.HttpApplication
{
    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup
        RouteTable.Routes.Add(new ServiceRoute("api/", new WebServiceHostFactory(), typeof(myWebInterfaceSvc)));
    }
    // more code here
}

I imagine I’ll need to split it up starting from the above …

Concern:

Now, my concern is that without the common HTTP handler and extra route above i.e. once I have them as two separate projects, they will be two separate IIS sites/applications so they will run on two different ports. I’d still like BOTH to respond to port 80 as

http(s)://www.site.com -> web site project

http(s)://www.site.com/api -> web service

Assuming I’m successful in separating the website and the web service, how would I setup IIS for the above?

  • 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-05-29T08:12:53+00:00Added an answer on May 29, 2026 at 8:12 am

    I ended up setting the main website as the root / primary site in IIS and then added the service as a virtual sub directory within that.

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

Sidebar

Related Questions

Background I have made a Web Service in Visual Studio, and I'm trying to
IDE: Microsoft Visual Studio Professional 2008 Language: C# Background: I have one form and
I used to have a nice little Visual Studio Add-In that allowed me to
I have a nant build script that specifies the compilation of various Visual Studio
I am using Visual Studio 2010 for an MVC website project. I have an
Background: We have a ClickOnce-deployed WPF app, that talks to WCF Services, which in
Background: I've created a Visual Studio 2010 solution with a separate project for a
Background I have used MS editors and applications for years including Visual Studio and
Coming from a background of Visual Studio I had no idea how good that
I have a VB.NET project in Visual Studio 2008 that I created a specialized

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.