--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-09-21 11:50:39 -07:00
8 changed files with 104 additions and 13 deletions

View File

@@ -0,0 +1,27 @@
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Security.Cryptography" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
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(); }
}
</script>
<html>
<head id="Head1" runat="server">
<title>Error</title>
</head>
<body>
<div>
An error occurred while processing your request.
</div>
</body>
</html>

View File

@@ -146,6 +146,7 @@
<Compile Include="WebRole.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Error.aspx" />
<Content Include="Global.asax" />
</ItemGroup>
<ItemGroup>

View File

@@ -88,7 +88,7 @@
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="Off"/>
<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite" defaultRedirect="~/Error.aspx"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -101,7 +101,17 @@
</namespaces>
</pages>
<httpHandlers>
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<!-- Explicitly remove not necessary handlers -->
<remove path="eurl.axd" verb="*" />
<remove path="trace.axd" verb="*" />
<remove path="WebResource.axd" verb="*" />
<remove path="*_AppService.axd" verb="*" />
<remove path="ScriptResource.axd" verb="*" />
<remove path="*.rem" verb="*" />
<remove path="*.xoml" verb="*" />
<remove path="*.xamlx" verb="*" />
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
</system.web>
<system.web.extensions/>
@@ -114,6 +124,16 @@
<modules runAllManagedModulesForAllRequests="true">
</modules>
<handlers>
<!-- Explicitly remove not necessary handlers -->
<remove path="eurl.axd" verb="*" />
<remove path="trace.axd" verb="*" />
<remove path="WebResource.axd" verb="*" />
<remove path="*_AppService.axd" verb="*" />
<remove path="ScriptResource.axd" verb="*" />
<remove path="*.rem" verb="*" />
<remove path="*.xoml" verb="*" />
<remove path="*.xamlx" verb="*" />
<remove name="MvcHttpHandler"/>
<remove name="UrlRoutingHandler"/>
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>