简体   繁体   English

无效的URI:无法确定URI的格式异常

[英]Invalid URI: The format of the URI could not be determined Exception

In my asp.net c# web application, I m unable to find where exactly in the code, this exception (Invalid URI: The format of the URI could not be determined.)is raised. 在我的asp.net c#Web应用程序中,无法找到代码中的确切位置,引发了此异常(无效的URI:无法确定URI的格式。)。 The URL where the exception is coming is of format as below 出现异常的URL的格式如下

http://somedomain.com/sepsisvte/sepsis.aspx?4040431page=2 http://somedomain.com/sepsisvte/sepsis.aspx?4040431page=2

If the problem is related to the structure of the URL then there are URL like below where I m not getting any exception at all 如果问题与URL的结构有关,则存在如下所示的URL,我根本不会遇到任何异常

http://somedomain.com/sepsisvte/sepsis.aspx?4020894page=2 http://somedomain.com/sepsisvte/sepsis.aspx?4020894page=3 http://somedomain.com/sepsisvte/sepsis.aspx?4020894page=2 http://somedomain.com/sepsisvte/sepsis.aspx?4020894page=3

Its a quite large application and Its really difficult to find the origin of error. 这是一个相当大的应用程序,而且真的很难找到错误的根源。 Any ideas? 有任何想法吗?

The stacktrace is as below stacktrace如下

[UriFormatException: Invalid URI: The format of the URI could not be determined.] System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +5462488 System.Uri..ctor(String uriString) +20 [UriFormatException:无效的URI:无法确定URI的格式。] System.Uri.CreateThis(字符串uri,布尔值dontEscape,UriKind uriKind)+5462488 System.Uri..ctor(字符串uriString)+20
umbraco.presentation.requestModule.rewrite404Url(String url, String querystring, Boolean returnQuery) +265 umbraco.presentation.requestModule.rewrite404Url(字符串url,字符串查询字符串,布尔值returnQuery)+265
umbraco.presentation.requestModule.Application_BeginRequest(Object sender, EventArgs e) +237 umbraco.presentation.requestModule.Application_BeginRequest(对象发送者,EventArgs e)+237
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+68 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值,已完成,同步)+75

That's because your url contains this "?404". 这是因为您的网址包含此“?404”。 Umbraco searches each url for this text, and if it exists, it rewrite the url. Umbraco会在每个URL中搜索该文本,如果存在,则会重写该URL。 Check the source code here: https://searchcode.com/codesearch/view/28576630/ , search for this method: rewrite404Url. 在此处检查源代码: https ://searchcode.com/codesearch/view/28576630/,搜索此方法:rewrite404Url。

One of the solutions is to try to prefix your query string key with underscore. 解决方案之一是尝试为您的查询字符串键添加下划线前缀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XamlParseException无效的URI:无法确定uri的格式 - XamlParseException Invalid URI: The format of the uri could not be determined 无效的 URI:无法确定 URI 的格式 - Invalid URI: The format of the URI could not be determined 无效的URI:无法确定URI的格式 - Invalid URI: The format of the URI could not be determined 无法确定URI的格式 - The format of the URI could not be determined CloudBoost查询无效的URI无法确定URI的格式 - CloudBoost query Invalid URI The format of the URI could not be determined 无效的URI:无法确定URI的格式 - C# - Invalid URI: The format of the URI could not be determined - C# S3 putobject throwing无效的URI:无法确定URI的格式 - S3 putobject throwing Invalid URI: The format of the URI could not be determined “使用WebRequest无法确定URI的格式” - “The format of the URI could not be determined” with WebRequest Microsoft.OpenApi.Models.OpenApiDocument.SerializeAsV2 URI 无效:无法确定 URI 的格式 - Microsoft.OpenApi.Models.OpenApiDocument.SerializeAsV2 Invalid URI: The format of the URI could not be determined 如何修复 Invalid URI:在 asp.net core 问题中无法确定 URI 的格式 - How to fix Invalid URI: The format of the URI could not be determined in asp.net core problem
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM