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
Test URLs for Http errors
Todd Gardner
I want to write an integration tests under various error scenarios: Bad Request, Forbidden, and Unauthorized. Are there any urls inside Thomson that I can point these tests at?
Find more posts tagged with
http
refinitiv-internal
Accepted answers
Justin Vander Ziel
I can give you an URL to test Forbidden and a couple of URLS for not found and server error:
- 404:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/sp404.aspx
- 403:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/AccessDenied.aspx
- 500:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/Error.aspx
And you can always find a way to create a 404 error.
I used [netcat][1] as a server in college to return arbitrary HTTP headers and messages - you could try that for a quick solution. Or you could create one yourself - just use an ASP.NET page and override the Render to provide the response you need:
///
/// Sends server control content to the specified object, which writes the content to be rendered on the client.
///
/// The object that receives the rendered content.
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
Response.TrySkipIisCustomErrors = true;
Response.Status = "404 Not Found";
Response.StatusCode = 404;
}
[1]:
http://joncraton.org/blog/46
All comments
Justin Vander Ziel
I can give you an URL to test Forbidden and a couple of URLS for not found and server error:
- 404:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/sp404.aspx
- 403:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/AccessDenied.aspx
- 500:
https://disclosureexchange.qa.accelus.com/_layouts/TLR.CDP.CustomSPError/Error.aspx
And you can always find a way to create a 404 error.
I used [netcat][1] as a server in college to return arbitrary HTTP headers and messages - you could try that for a quick solution. Or you could create one yourself - just use an ASP.NET page and override the Render to provide the response you need:
///
/// Sends server control content to the specified object, which writes the content to be rendered on the client.
///
/// The object that receives the rendered content.
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
Response.TrySkipIisCustomErrors = true;
Response.Status = "404 Not Found";
Response.StatusCode = 404;
}
[1]:
http://joncraton.org/blog/46
Todd Gardner
Thanks Dude!
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