如何使用C#在asp.net中编码整个URL路径.

编程入门 行业动态 更新时间:2024-10-25 16:27:04
本文介绍了如何使用C#在asp中编码整个URL路径.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我想在asp 4.0,C#中编​​码整个URL路径.它不应显示人类可读的格式. www.codeproject/Questions/ask.aspx.我想为当前运行项目的所有页面都加密整个URL路径. 请帮我.我将等你的答复. 在此先谢谢您.

Hi All, I want encode whole URL path in asp 4.0, C#. It should not show human readable format.E.g. www.codeproject/Questions/ask.aspx. I want encryp whole url path for all pages present the current running project. Please help me. I will be waiting for your reply. Thanks in advance.

推荐答案

域部分无法加密".如果您确实想这样做,请购买一个奇怪的(如您所说的已加密)域名.但这对每个请求都是一样的. URL的其余部分由您控制.使用URL重写模块按需处理它们. 但正如SA所问-您为什么要这么做?如果您以大众为目标,那么出于明显的原因,您永远都不会这样做.而且该网站将在有限的人群中使用,这样做也是没有意义的. 从我的角度来看,您可能需要考虑设计并考虑将登录添加到您的网站.也不要传递您不想在URL中看到的数据. The domain part cannot be "encrypted". If you really want to do so, buy a weird (encrypted as you say) domain name. But that will be same with every request. The rest part of the URL is under your control. Use URL Rewrite module to handle them as you want. But as SA asked - why do you want to do so? If you are targeting mass, you would never do that for obvious reasons. And it the website will be used within limited group of people, doing this doesn''t make sense as well. From where I see, you may need to consider your design and consider adding login to your website. Also do not pass data that you don''t want to be seen in the URL.

更多推荐

如何使用C#在asp.net中编码整个URL路径.

本文发布于:2023-11-14 04:49:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586265.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   路径   net   asp   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!