You can't raise a "server busy" error from the code. You can simulate the error codes as shown in the other answer but it will not allow you to determine if your custom error page will be shown correctly as the whole point to the "server busy" error is that code cannot be executed - so it is very safe assumption that IIS will do something different to raise this kind of error.
But from what I can see the 500.13 error was thrown by ASP, not ASP.NET applications. Instead for ASP.NET applications you would see 503 Service Unavailable error.
You can trigger 503 status code with the following:
- Open IIS Management Studio, go to Application Pools, open Advanced Settings for your app pool and change Queue Length to 10 (the minimum).
- In your ASP.NET application add a call to
Thread.Sleep(50000)
. - Now start pounding the web server - pretty soon you will get 503 Service Unavailable error back.