Closed GoogleCodeExporter closed 9 years ago
Original comment by azizatif
on 18 Dec 2011 at 5:11
This issue was closed by revision r909.
Original comment by azizatif
on 18 Dec 2011 at 5:33
[deleted comment]
[deleted comment]
This fix requires adding the publicly reachable URL to the context item under
the key ELMAH_REQUEST_URL. For AppHarbor, the following code will do the trick
(assuming for example that ELMAH handler is registered for "errorlog") by
adding it to Global.asax:
protected void Application_BeginRequest(object sender, EventArgs e)
{
var context = Context;
var request = context.Request;
var path = request.Url.AbsolutePath;
if (path.IndexOf("/errorlog", StringComparison.OrdinalIgnoreCase) >= 0)
{
var portlessUrl = new UriBuilder(request.Url) { Port = -1 }.Uri;
context.Items["ELMAH_REQUEST_URL"] = portlessUrl;
}
}
Original comment by azizatif
on 18 Dec 2011 at 5:43
Original issue reported on code.google.com by
azizatif
on 18 Dec 2011 at 5:11