Seems I am having issues with the fix.
To my custom error cs page I have added (in the correct places)
C#/VB.NET Code:
using System.Security.Cryptography;
using System.Threading;
void Page_Load()
{
byte[] delay = new byte[1];
RandomNumberGenerator prng = new RNGCryptoServiceProvider();
prng.GetBytes(delay);
Thread.Sleep((int)delay[0]);
IDisposable disposable = prng as IDisposable;
if (disposable != null) { disposable.Dispose(); }
}
and the web.config
C#/VB.NET Code:
<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/customerrorpage.aspx" />
However when I go to a page that does not exist I see an ugly standard Server Error in '/' Application and not my nice custom error page. What have I done wrong?
Our old web.config had
C#/VB.NET Code:
<customErrors mode="On" defaultRedirect="~/customerrorpage.aspx">
<error statusCode="404" redirect="~/customerrorpage.aspx" />
</customErrors>
Please help.
Many thanks.