Claude, This should be just a setting that needs to be adjusting in IIS:
IIS Manager >[Site] >Error Pages > 404 - Uncheck Insert content from static file in to the error response and/or reconfigure as fits your need. HTH, Jon On Jul 30, 2014, at 2:49 PM, Claude Schnéegans <schneeg...@internetique.com> wrote: > > Hi, > > I'm havin someting weird hapening on mt CF 9 / Windows Web Server 2008 / IIS > 7.5 > > My site is returning an error 404 status when some requested page does'nt > exists. > For instance http://myDomain.com/index.cfm?p=page&id=21 return normaly page > 21 which exists, > but http://myDomain.com/index.cfm?p=page&id=999 returns an error 404 since > there is no page 999 in the database. > This is achieved by the following code: > > <CFIF GetPage.recordCount EQ 0> > <CFINCLUDE TEMPLATE="/commun/notFound.cfm"><CFABORT> > > and notFound.cfm contains this: > <cfheader statuscode="404" statustext="Page not found"> > <h3>Page not found</h3> > <BR><CFOUTPUT>Sorry, the requested page does not exists on this site <A > HREF="http://#cgi.server_name#">#cgi.server_name#</A>.</CFOUTPUT> > > Now the PROBLEM is that the generated code is displayed AFTER the text > generated by the IIS server in case of any 404 error. > If I remove the line with statuscode="404", the page is displayed normally. > > It seems that when CF is returning a 404 response, IIS fells compelled to put > it's oar too ;-) > > The problem does not happen on my development setup, with the same version of > CF and IIS. > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359039 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm