but when I dump prc scope in layouts or views above variables are not defining and getting 200 status code.
When my code is like above prc scope is defining.
Can you please help whaether this is IIS issue or something else.
> when I dump prc scope in layouts or views above variables are not defining and getting 200 status code.
Are you aborting the request after you dump? If so, that would prevent ColdBox from actually using the status code you are setting. How are you checking the status code returned by your page?
Can you explain what you mean when you say “variables are not defined”? Do you mean prc.PageNotFound and prc.pageTitle? Firstly, where in your site is that code at? That should work in a handler or a view, but that code in a model would not work like you expect. Also, how and where are you checking for their existence?