![](/img/trans.png)
[英]Sitefinity A potentially dangerous Request.Path value was detected from the client (?)
[英]A potentially dangerous Request.Path value was detected from the client (IIS)
我有這個請求https://192.xxx.xx/%3cscript%3e_q_q=%27%29%28%27%3c/script%3e
我該如何顯示一條更友好的消息? 注意:我的asp.net c#應用程序托管在以下位置: https://192.xxx.xx/Myapp
任何建議將不勝感激
您可以首先禁用引發此HTTPException
的內置ASP.NET中間件,然后添加自己的ASP.NET或ASP.NET Core中間件,該中間件負責檢查請求路徑中的危險字符並執行自定義操作(例如引發其他異常) ,重定向到自定義錯誤網址等)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.