IIS Error : Service cannot be activated due to an exception during compilation. What is it?

12,593

My question - what it has to do with compilation?

Every time you run a .net managed process, the first thing which has to happen is that the .net VM (called the CLR) will compile the code in your assemblies (called MSIL) into machine code.

So IIS, as the hosting container, is providing this service for you.

As to the actual error you are getting, I would guess this is caused by something in the production web.config file being different to the development equivalent. Please post the System.ServiceModel configuration section of your web config and I'll have a look.

Share:
12,593
Boppity Bop
Author by

Boppity Bop

I hate networking, social networking and all sorts of reliance on other people. including asking for help on SO.

Updated on June 16, 2022

Comments

  • Boppity Bop
    Boppity Bop almost 2 years

    WebHost failed to process a request.

    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/14938877 Exception: System.ServiceModel.ServiceActivationException: The service '/xxxx.svc' cannot be activated due to an exception during compilation.

    I have an ASP.NET app running on IIS. A dev created operation contract with same name as we had already. Fine in VS. However it fails when deployed on the prod IIS.

    My question - what it has to do with compilation? Is there a conscious simple explanation whats happening in IIS with the app (in terms of post-deployment and hosting ASP.NET att)? What does it compile? What for?