gpt4 book ai didi

asp.net - ASP.NET 中的奇怪错误

转载 作者:行者123 更新时间:2023-12-01 04:18:48 25 4
gpt4 key购买 nike

每隔一段时间,我的 asp.net 应用程序就会出现大约 10 - 20 个相同的错误。它总是一样的,我想知道是否有人试图入侵(大约每月发生一次)。

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)



为什么会有人试图访问 "/~/Default.aspx"?

最佳答案

如果您在页面生命周期中太晚尝试在 HyperLink 控件上设置 NavigateUrl,有时会发生这种情况。确保在生成相关 Url 后,您没有在代码中创建超链接。

关于asp.net - ASP.NET 中的奇怪错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2619855/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com