Server Error when running a coldfusion page in an ASP.NET application folder

asp.netcoldfusioniis-7.5

I'm getting an error of:

"
The service is unavailable.
Server Error
Either the Macromedia application server(s) are unreachable or none of them has a mapping to process this request.
"

I already had a folder such as /mobile/qr-image/ with a ColdFusion Mobile application, and then I created a mobile template in ASP.NET and converted /mobile to an IIS Application.

So at /mobile/ you'd receive the site's ASP.NET mobile template, but at /mobile/qr-image/ you'd receive the site's ColdFusion mobile template.

Only.. /mobile/ works fantastic, but I get the error when I try to view /mobile/gr-image/.

I guess if you think about running a ColdFusion application inside of an ASP.NET application folder, it doesn't make sense and would logically not work, but is there a way in IIS that I could get it to work?

I'm using IIS7.5 and I'm on Windows Server 2008R2

Oh and it's not exactly a possible solution to strip out the ColdFusion application and throw it in another folder.

Any ideas? Is it possible?

Thanks in advance

Edit – Added the contents of my Web.config:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
        </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
        <handlers>
            <remove name="AboMapperCustom-20623"/>
            <remove name="AboMapperCustom-25687"/>
            <remove name="AboMapperCustom-24453"/>
        </handlers>
    </system.webServer>
</configuration>

Best Answer

Short answer: Yes, you can make this work, but a critical configuration piece is to make sure you use a "classic mode" application pool and not an "integrated mode" one.

Long answer: First, make sure you are using ColdFusion 9.0.1, which supports IIS7 integrated mode application pools if you must run those. However, you will not be able to use ASP.NET validators anywhere in your ASP.NET pages if you want to run both ColdFusion and ASP.NET together within the same application pool if running in integrated mode. For this to work, you must run in classic mode, which does not use IIS's module/handler pipeline. There is currently a bug in the .NET framework (still not fixed in .NET 4.0 as I just tested this earlier this week and had a bug submitted to Microsoft about it) with how WebResource.axd is tested for its configuration in Web.config or applicationHost.config. What ends up happening is that the invalid check for WebResource.axd ends up hitting the catch-all handler for ColdFusion and the test fails, throwing a yellow screen of death stating that WebResource.axd is not configured properly. This is bunk as it is configured correctly by default and the code they give you in the error message to fix it is completely wrong.

See the IIS7.net post about this issue for more info on this bug.