Okay, this will affect anyone running SharePoint 2007 on Win2k8. I have made such a move to WCF, that I just don’t care about the in-built ASMX’s anymore .. until .. someone sent me some code that relies on an in-built ASMX.
The problem was, whenever I tried accessing the asmx, I got this weird error -
Application error when access /_vti_bin/<ootbservice>.asmx, Error=Failed to Execute URL. at System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) at System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Usually, the above error will manifest itself as a simple “Failed to execute URL”, or “Object moved to” error, but if you do set the error logging to verbose/information in SharePoint, you will see the full error message as shown above.
Now, in IIS 7 Manager, it clearly says on the right hand side, under Handler Mappings -
“The application is an application pool that is running in Classic mode, so you can manage ISAPI extensions and native modules that are mapped to paths. You must manage managed handers (system.web/httpHandlers) directly in the configuration file”
Well okay, that’s weird! Are you telling me that even an asmx won’t work.. unless, I re-add their httpHandlers in the web.config that sits under [12]\ISAPI. So I did, and bingo my ye olde tyme asmx’s work again. Wow, that stinks!
Now, apparently this issue doesn’t affect .svc’s. So yet another reason to make the move to WCF. I tell ya, my relationship with asmx’s is so over.