Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Triggering 404 response in Cobalt Website
Ryan Morlok
Is it possible to trigger a 404 response in Cobalt Website by just throwing a certain exception? E.g. something like
throw new Http404Exception();
that would get picked up in Global.asax and have the response code set appropriately. Or do I need to manually manage this response?
Find more posts tagged with
refinitiv-internal
Accepted answers
mark.maruska
I've seen people use this...
throw new HttpException(404, errorMessage, exception);
I haven't verified if it "has the response code set appropriately", but it may be what you're looking for.
All comments
mark.maruska
I've seen people use this...
throw new HttpException(404, errorMessage, exception);
I haven't verified if it "has the response code set appropriately", but it may be what you're looking for.
Ryan Morlok
Thanks. That seems to work but I don't seem to get a friendly 404 page back. Not sure if that's caused by GTLR Maxwell Website not being configured correctly for 404s or this method of triggering them bypassing our normal flow.
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act