Strange bug in ASP.NET

From time to time I get about 10 - 20 identical errors in my asp.net application. This is always the same thing, and I wonder if someone is trying to hack (this happens once a month).

Source: System.Web

Message: The file '/~/Default.aspx' does not exist.

User IP: 89.122.29.80

User Browser: Unknown 0.0

User OS: Unknown

Stack tracing: in System.Web.UI.Util.CheckVirtualFileExists (VirtualPath virtualPath) in System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (VirtualPath virtualPath, Boolean noBuild, Booleanulelebildpuildpuildbuildpuildbuildprefile (HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) with System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory (VirtualPath virtualPath, HttpContextCentPlementPulementpoolementpoolept VirtualPath virtualPath, Type requiredBaseType, HttpContext, Boolean allowCrossApp, Boolean noAssert) in System.Web.UI.PageHandlerFactory.GetHandlerHelper (HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath.U.HPage.Page.Up. Factory.System.Web.IHttpHandlerFactory2.GetHandler (HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) with System.Web.HttpApplication.MapHttpHandler (HttpContext context, String requestType, VirtualPath path, String BooPerblated) .HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () at System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean completed synchronously)

why is someone trying to access "/~/Default.aspx"?

+4
source share
3 answers

This sometimes happens if you try to set NavigateUrl on a HyperLink control too late in the page life cycle. Make sure you do not create HyperLinks in your code after relative urls appear.

+1
source

On any well-organized website, you will get many 404 errors from poorly written scanners, poorly written anti-virus software cache servers and browser bar add-ons, as each of them tries to guess which URLs lead from the page. Often they misinterpret embedded Javascript, trying to figure out which pages it may link to.

BUT I have never seen a single character in it. This means that you have ~ on the page, which means that you have the literal ~ / Default.aspx found somewhere on the page. Can you find the page in question and look at the source on it to see if there is anywhere on it?

If you change the page content according to the user agent, can you reproduce the same request and look at the source?

Have you launched a link to your site?

+1
source

Perhaps this is because of the robot or the finder.

0
source

Source: https://habr.com/ru/post/1306650/


All Articles