Error executing child request with Server.Transfer

In our Global.asax file we have:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>protected void Application_Error()
{
Errors.Functions.HandleException(HttpContext.Current);
}
</code>
<code>protected void Application_Error() { Errors.Functions.HandleException(HttpContext.Current); } </code>
protected void Application_Error()
{
    Errors.Functions.HandleException(HttpContext.Current);
}

On a 404 error, the following code is executed:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>context.Server.Transfer("~/pages/errors/404.aspx");
context.ClearError();
context.ApplicationInstance.CompleteRequest();
</code>
<code>context.Server.Transfer("~/pages/errors/404.aspx"); context.ClearError(); context.ApplicationInstance.CompleteRequest(); </code>
context.Server.Transfer("~/pages/errors/404.aspx");
context.ClearError();
context.ApplicationInstance.CompleteRequest();

This works absolutely fine for every 404 exception. However, we’re seeing odd requests in our logs to paths that don’t exist such as:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>https://www.example.com/en/meta.json
</code>
<code>https://www.example.com/en/meta.json </code>
https://www.example.com/en/meta.json

Visiting this page serves a normal 404 response page as above, and doesn’t throw any exceptions.

However, these requests (I’m guessing from some vulnerability scanner or crawler) throw this exception on a daily basis:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>TYPE: HttpException
BASE TYPE: ExternalException
MESSAGE: Error executing child request for /pages/errors/404.aspx.
SOURCE:
System.Web
STACK TRACE:
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at C3.Code.Controls.Application.Errors.Functions.HandleException(HttpContext context) in ...HandleHTTPException.cs:line 81
</code>
<code>TYPE: HttpException BASE TYPE: ExternalException MESSAGE: Error executing child request for /pages/errors/404.aspx. SOURCE: System.Web STACK TRACE: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) at System.Web.HttpServerUtility.Transfer(String path) at C3.Code.Controls.Application.Errors.Functions.HandleException(HttpContext context) in ...HandleHTTPException.cs:line 81 </code>
TYPE: HttpException
BASE TYPE: ExternalException
MESSAGE: Error executing child request for /pages/errors/404.aspx.

SOURCE:
System.Web

STACK TRACE:
   at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
   at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)
   at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
   at System.Web.HttpServerUtility.Transfer(String path)
   at C3.Code.Controls.Application.Errors.Functions.HandleException(HttpContext context) in ...HandleHTTPException.cs:line 81

Line 81 is the context.Server.Transfer(.. line.

The inner exception is:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>TYPE: NullReferenceException
BASE TYPE: SystemException
MESSAGE:
Object reference not set to an instance of an object.
SOURCE:
C3Alpha2
STACK TRACE:
at C3.Pages.Errors._404.Page_Load(Object sender, EventArgs e) in ...PagesErrors404.aspx.cs:line 12
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</code>
<code>TYPE: NullReferenceException BASE TYPE: SystemException MESSAGE: Object reference not set to an instance of an object. SOURCE: C3Alpha2 STACK TRACE: at C3.Pages.Errors._404.Page_Load(Object sender, EventArgs e) in ...PagesErrors404.aspx.cs:line 12 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) </code>
TYPE: NullReferenceException
BASE TYPE: SystemException
MESSAGE:
Object reference not set to an instance of an object.

SOURCE:
C3Alpha2

STACK TRACE:
   at C3.Pages.Errors._404.Page_Load(Object sender, EventArgs e) in ...PagesErrors404.aspx.cs:line 12
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Where line 12 is on of the Page_Load lines:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>public partial class _404 : System.Web.UI.Page
{
public Master_Pages.Main MP => (Master_Pages.Main) Master;
protected void Page_Load(object sender, EventArgs e)
{
MP.IsErrorPage = true;
MP.SEOPageHeader.Title = "File not found";
}
}
</code>
<code>public partial class _404 : System.Web.UI.Page { public Master_Pages.Main MP => (Master_Pages.Main) Master; protected void Page_Load(object sender, EventArgs e) { MP.IsErrorPage = true; MP.SEOPageHeader.Title = "File not found"; } } </code>
public partial class _404 : System.Web.UI.Page
{
    public Master_Pages.Main MP => (Master_Pages.Main) Master;

    protected void Page_Load(object sender, EventArgs e)
    {
        MP.IsErrorPage = true;
        MP.SEOPageHeader.Title = "File not found";
    }
}

The requests throwing the error are normal HTTP GET requests, and logging details about the headers etc doesn’t show anything that looks too unusual.

Does anyone know what could be causing this to throw these exceptions?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật