开发者

Strange error in ASP.NET

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.IHttpHand开发者_Go百科lerFactory2.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" ?


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.


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?


Maybe it is because of the robot or the crawler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜