我如何在.NET Core应用程序的URL中允许受限字符?

发布于 2025-01-28 11:44:55 字数 321 浏览 5 评论 0 原文

以前,为了允许作为.NET Framework服务中URL的一部分传递编码的特殊字符,我已将其添加到 system.web node中的Web.config文件中:

&lt; httpruntime requestPathinvalidcharacters =“” sleakedurltofilesystemmapping =“ true” /&gt; < /code>

.net core应用程序的等效物是什么?

我需要允许的测试数据的一个示例是“搜索术语%26”,这是“搜索术语”的编码输出。

Previously, to allow for encoded special characters to be passed as part of a URL in a .net framework service, I've added this to the web.config file within the system.web node:

<httpRuntime requestPathInvalidCharacters="" relaxedUrlToFileSystemMapping="true" />

What is the equivalent for a .net core application?

An example of the test data I need to allow would be 'searchterm%26' which is the encoded output of 'searchterm&'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文