I have a big problem. There are devices in live that send the URL "/updates ". It's a typo of the developer for those devices. In the server logs, it looks like "/updates+".
I have a ManageURL rewriting module that handles all requests without extension. But this request causes an HttpException:
System.Web.HttpException:
System.Web.HttpException
at System.Web.Util.FileUtil.CheckSuspiciousPhysicalPath(String physicalPath)
at System.Web.HttpContext.ValidatePath()
at System.Web.HttpApplication.ValidatePathExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
As I see in the logs, the URL rewriting module does not even get this URL, so I cannot fix it there.
Is there a way to handle those URLs with ASP.NET?
Answer: This icon that looks like a diamond with a question mark in it indicates a space in the URL. Since spaces are not supported in a redirect URL, this icon displays to indicate why it will not work.
A URL in your data feed is badly formed or contains invalid characters. There are several common reasons why you might receive this error: Your URLs contain spaces or symbols. Our system won't be able to process URLs containing spaces or certain symbols.
There are two ways to access the URL Inspection tool:Type the URL to inspect in the inspection search bar at the top of any Search Console screen. Click an Inspect link next to a URL in most reports. Sometimes you might need to hover over a URL to see this option.
Ok, this is an old thread, but I like to add a workable solution that works for all ASP.NET versions. Have a look at this answer in a related thread. It basically comes down to registering to the event PreSendRequestHeaders
in global.asax.cs
.
Alternatively, when on ASP.NET 4.0 or higher, use <httpRuntime relaxedUrlToFileSystemMapping="true" />
in web.config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With