Hosting REST template on IIS7 - compatibility issues.


  • Following every post here that had the same issue, I am still unable to resolve the:

    "ASP.NET routing integration feature requires ASP.NET compatibility. Please see '' on how to do this."


    Following the instructions on the link doesn't change anything either. I have no clue what to do, as my web.config looks like any other example/fix out there. Here it is for reference:

    <?xml version="1.0"?>
        <compilation debug="true" targetFramework="4.0" />
        <add key="ServiceVersion" value="0.1.0a" />
        <modules runAllManagedModulesForAllRequests="true">
          <add name="UrlRoutingModule"
            type="System.Web.Routing.UrlRoutingModule, System.Web, Version=, 
                  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
          <remove name="svc-Integrated-4.0" />
          <add name="svc-Integrated-4.0" path="*" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
                Configure the WCF REST service base address via the global.asax.cs file and the default endpoint 
                via the attributes on the <standardEndpoint> element below
            <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" defaultOutgoingResponseFormat="Json"/>
            <behavior name="WebHttpBehaviour">
              <webHttp automaticFormatSelectionEnabled="true" defaultBodyStyle="Wrapped" defaultOutgoingResponseFormat="Json" helpEnabled="true" />
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    Here is the top of my service class

        [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
        [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, IncludeExceptionDetailInFaults = true)]
        // NOTE: If the service is renamed, remember to update the global.asax.cs file
        public partial class Service

    I am using the REST template 40 (CS) project template so I don't have a .svc file.

    I have enabled 32 bit applications in my app pool for Oracle (don't know if thats important, but there you go). I have also made sure my app pool is set to .NET 4 and my routing mode is integrated. IIS and are installed using the msdn guides. I am using Web Deploy to publish the service and the server is running 2008 R2.

    If you need anymore information to help me diagnose this, i will edit this.

    Monday, October 01, 2012 4:06 PM


  • Resolved: Was publishing from 2012, it was a 2010 project, so I must be missing something about the new environment. It worked fine when I published it from 2010.
    • Marked as answer by autechr3 Tuesday, October 02, 2012 3:37 PM
    Tuesday, October 02, 2012 3:37 PM