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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:20:14+00:00 2026-05-25T02:20:14+00:00

I have a web site and a web service under the same virtual directory

  • 0

I have a web site and a web service under the same virtual directory and some of the web pages call the web service.

When the web service is called, does IIS create a new AppDomain or does it run the web service in the same AppDomain?

Is there a setting for this? On one of my machine it appears to create a new AppDomain. Does changing application pool mode from Integrated vs Classic affect this?

  • 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-25T02:20:14+00:00Added an answer on May 25, 2026 at 2:20 am

    IIS Application Pools run a single worker process (by default). Within that worker process, an AppDomain is created for each IIS Application (website). As far as I am aware, any code executing within that IIS Application will run in the same AppDomain (unless of course you are creating your own child application domains in code yourself). You can adjust the number of worker processes per website, but realistically only do this if you are finding you are having performance issues (that cannot be resolved by segregating the application pools). If you run multiple application domains per website, code running in those separate application domains cannot share state (e.g. InProc session), and can only communicate through serialisation – not ideal.

    In regards to ASP.NET and WCF; when hosted in IIS they by default run in side-by-side mode, within the same AppDomain, this allows them to share state, but WCF requests are not processed by the ASP.NET runtime, instead calls to WCF services are intercepted and processed by the WCF runtime. (Although calls to .svc files are still routed through ASP.NET initially). In side-by-side mode, WCF calls do not obey configuration, security, impersonation etc. that you may have configured for your ASP.NET website.

    WCF on IIS can also be run in ASP.NET Compatibility mode, in which the WCF implementation is managed by a http handler, and thus are processed by the ASP.NET pipeline also. If you would consider that your services need only HTTP support, you could consider hosting the service in compatability mode to gain access to the power and flexibility of the ASP.NET pipeline.

    In regards to Integrated and Classic pipeline mode, in Intergrated mode, ASP.NET is run by the w3wp.exe as an integrated part of the IIS processing pipeline. This means that anything using custom handlers, etc, that you may have plugged into the pipeline (even when serving non-ASP.NET content, e.g. PHP), will be loaded and executed in the same AppDomain.

    In Classic mode, ASP.NET is run in its owner worker process, aspnet_wp.exe, and is connected to the IIS processing pipeline as an ISAPI filter. I believe the same mechanics around AppDomain usage applies here also.

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

Sidebar

Related Questions

I have a Web service and a Web site (both C#) in the same
I have deployed ASP.NET web site and ASP.NET web service on the same web
I have to call some code in a SharePoint site that runs under the
I have a web service site that is restful enabled, so other websites/ajax script
I have a web site and a web service and I would like to
I have a web site that is a customer to customer (C2C) service. Example,
We will develop a web site that will have some free services and we
i want use some data from a website with web service. i have a
I have an ASP.Net web site deployed in IIS 7.5 with a file Cart.svc
I have a Web application and a WCF service hosted on the same Windows

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.