tags:

views:

86

answers:

3

Every once in a while I get about 10 - 20 identical errors on my asp.net app. It's always the same, and I'm wondering if it is someone trying to hack in (it happens about 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 trace: at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean completedSynchronously)

why on earth would someone be trying to access "/~/Default.aspx" ?

A: 

Maybe it is because of the robot or the crawler.

sza
+1  A: 

On any well trafficked web site you'll get numerous 404 errors from badly written crawlers, badly written caching servers anti-virus software and browser toolbar add-ons as they each try to second guess what URLs lead off a page. Often they will misinterpret embedded Javascript trying to figure out what pages it might be linking to.

BUT I've never seen one with a ~ character in it. That implies you had a ~ on a page which implies that you have a literal ~/Default.aspx occurring somewhere on a page. Can you find the page in question and do view source on it to see if there's a ~ somewhere on it?

If you vary the page contents according to user agent, can you replay the same request and look at the source?

Have you run a link checker against you site?

Hightechrider
+1  A: 

This sometimes happens if you are trying to set the NavigateUrl on a HyperLink control too late in the page lifecycle. Make sure that you are not creating HyperLinks in your code behind after the relative Urls are generated.

Daniel Dyson
Looks like the "NavigateURL" on my RadMenu is being set wrong...I'm going to try and find a way to fix it. Basically the HTML is correct, so navigating the site to the average user is fine, but the Javascript is messed up, and any bot trying to crawl based on the JS gets sent to the wrong page.
rockinthesixstring