Setting up CF2021 on IIS 10. Can someone gently p...
# cfml-general
t
Setting up CF2021 on IIS 10. Can someone gently point in the direction of how to setup IIS to handoff 400 an 500 error pages to a custom error handler written in CF?
t
No dice. that didn’t help
e
you have to edit the web.config and then restart the app , it goes something like this, edit to your hearts content. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <remove value="index.cfm" /> <add value="index.cfm" /> </files> </defaultDocument> <httpErrors errorMode="Custom"> <clear /> <remove statusCode="403" subStatusCode="-1"></remove> <remove statusCode="404" subStatusCode="-1"></remove> <remove statusCode="405" subStatusCode="-1"></remove> <remove statusCode="408" subStatusCode="-1"></remove> <remove statusCode="500" subStatusCode="-1"></remove> <remove statusCode="502" subStatusCode="-1"></remove> <remove statusCode="504" subStatusCode="-1"></remove> <error statusCode="403" path="/error.cfc" responseMode="ExecuteURL"></error> <error statusCode="404" path="/error.cfm" responseMode="ExecuteURL"></error> <error statusCode="405" path="/405.omg-wtf.cfc" responseMode="ExecuteURL"></error> <error statusCode="408" path="/408.cfm" responseMode="ExecuteURL"></error> <error statusCode="500" path="/500.cfm" responseMode="ExecuteURL"></error> <error statusCode="502" path="/502.cfm" responseMode="ExecuteURL"></error> <error statusCode="504" path="/502.cfm" responseMode="ExecuteURL"></error> </httpErrors errorMode="Custom"> </system.webServer> <system.web> <customErrors mode="On"> <error statusCode="403" redirect="error.cfm?status=403"></error> <error statusCode="404" redirect="/error.cfm?status=404"></error> <error statusCode="405" redirect="/405.omg-wtf.cfc?status=405"></error> <error statusCode="408" redirect="/error.cfm?status=408"></error> <error statusCode="500" redirect="/error.cfm?status=500"></error> <error statusCode="502" redirect="/error.cfm?status=502"></error> <error statusCode="504" redirect="/error.cfm?status=504"></error> </customErrors> </system.web> </configuration>