Skip to content

Instantly share code, notes, and snippets.

<system.web>
<httpRuntime relaxedUrlToFileSystemMapping="true"/>
...
@stevejay
stevejay / regex-question
Last active August 29, 2015 14:00
Regex question
var regex = new Regex("(ew?e)+");
var match = regex.Match("eweee");
var value = match.Groups[1].Value; // What is this value?
wrapper.java.additional.20=-XX:+UseConcMarkSweepGC
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=1024
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
<system.web>
...
<httpRuntime relaxedUrlToFileSystemMapping="true"/>
</system.web>
<system.webServer>
...
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="403"/>
<error statusCode="403" responseMode="ExecuteURL"
path="/path/to/Error/Forbidden"/>
<remove statusCode="404"/>
<error statusCode="404" responseMode="ExecuteURL"
path="/path/to/Error/NotFound"/>
<remove statusCode="500"/>
Response.ClearHeaders();
Response.ClearContent();
Response.StatusCode = (int)HttpStatusCode.InternalServerError;
<system.web>
...
<customErrors mode="On"/>
</system.web>
<system.webServer>
...
<httpErrors errorMode="Custom" existingResponse="Auto">
<remove statusCode="403" subStatusCode="14"/>
<error statusCode="403" subStatusCode="14"
responseMode="ExecuteURL" path="/path/to/Error/Forbidden"/>
<remove statusCode="404"/>
<error statusCode="404" responseMode="ExecuteURL"
path="/path/to/Error/NotFound"/>
</httpErrors>
Response.ClearHeaders();
Response.ClearContent();
Response.StatusCode = (int)HttpStatusCode.InternalServerError;
Response.TrySkipIisCustomErrors = true;