0
votes

Is there possibly another way to run my WCF 3.5 Rest API in an IIS integrated app pool?

Here's the message in the event viewer:

A request mapped to aspnet_isapi.dll was made within an application pool running in Integrated .NET mode. Aspnet_isapi.dll can only be used when running in Classic .NET mode. Please either specify preCondition="ISAPImode" on the handler mapping to make it run only in application pools running in Classic .NET mode, or move the application to another application pool running in Classic .NET mode in order to use this handler mapping.

And here's the handler entry in my web.config under system.webServer > handlers:

<add name="svc-ISAPI-2.0_64" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="" />
1

1 Answers

1
votes

You could try to change the handler registration to one of these:

<add name="svc-Integrated" path="*.svc" verb="*"
 type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 preCondition="integratedMode,runtimeVersionv2.0" />

<add name="svc-Integrated-4.0" path="*.svc" verb="*"
 type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
 preCondition="integratedMode,runtimeVersionv4.0" />

Which ono to use depends on the .Net Framework version that is set on the Application Pool. Based on your existing handler registration, the first one should be correct.