Link to home
Start Free TrialLog in
Avatar of istomtom
istomtom

asked on

Displaying CFM errors in IIS instead of IIS generic errors

I just had coldfusion installed on my new colocated machine. What I am trying to accomplish is having IIS display the coldfusion error code I'm used to seeing instead of the generic "Internal Server Error" code that IIS wants to display.

Thanks
Avatar of anandkp
anandkp
Flag of India image

hi,
u have certain pages for the error numbers set as default errror handlers in IIS

u cld go to the IIS & change these - if required to suit ur need / use CFerror to handle the errors as well / set up global error file in CFADMIN.

is that what u want ?

K'Rgds
Anand
Avatar of istomtom
istomtom

ASKER

Well, on my old shared hosting platform, everytime I had a CF error it just displayed it in the browser. I don't need any specific error handling, I just need the errors to be displayed in the browser window instead of the default IIS error.
yes that happens sometimes but it's very rare, if you constantly get 500 code error, there might be something wrong either in IIS or coldfusion, just check te logs to be sure ...

you can also create a template where that problem will occur and then try to use the cferror tag in the Application.cfm, then check if that happens again

you might want to check your browser settings, sometimes when you get an error, the browser could "hide" it if you have the "show friendly error messages" - or whatever - setting on

regards,
idss
You can set IIS to use any page you want by starting the Internet Service Manager, then find the default website or whatever site you are using. Then right click on that site and choose properties.  There is a tab called "custom errors", go to that tab and look for the 500 error in the list.  Then modify it to display any cfm page you want.
ASKER CERTIFIED SOLUTION
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, I finally found what I've been looking for. Stupid Stupid Stupid!. It's hard to believe that Macromedia hasn't made this information more readily available. They stuck it away in a documentation update they've posted online here: http://www.macromedia.com/v1/documents/cf50/cf5_update.htm

After trying many things I finally found this and it worked. Apparently coldfusion sends a 500 (internal server error) status code in the http header by default. IIS interprets this and spits out it's default 500 error page and there's now way around this other than to change something in the registry. To turn this sending of the 500 status code off in coldfusion you need to add a registry key and string value. See text below.

"If ColdFusion encounters an error while processing a page request, by default it returns a 500 (Internal Server error) status code in the http header. This allows automated monitoring services using HTTP probes to detect ColdFusion-generated errors. To change this default behavior, add the registry entry key named HKEY_LOCAL_MACHINE/SOFTWARE/Allaire/ColdFusion/CurrentVersion/HTTP, and give it a string value of EnableHTTPStatus. Set its value to 0 to prevent ColdFusion from returning an http status code. "
Well, no one really answered this question so i'm just going to give the points to anand so this becomes a PAQ.