简体   繁体   English

在ASP.NET应用程序中隐藏URL

[英]Hide URL in ASP.NET application

I am developing an ASP.NET application. 我正在开发一个ASP.NET应用程序。 But i would like to hide the URL so user don't know on which page he or she standing. 但是我想隐藏URL,以便用户不知道他或她站在哪一页上。 Is their any solution? 他们有什么解决方案吗?

Use Server.Transfer . 使用Server.Transfer It doesn't change the URL. 它不会更改URL。

Server.Transfer happens without the browser knowing anything, the browser request a page, but the server returns the content of another. Server.Transfer发生在浏览器不知道任何内容的情况下,浏览器请求一个页面,但是服务器返回了另一个的内容。

Server.Transfer() should be used when: 在以下情况下应使用Server.Transfer():

  • we don't need to show the real URL where we redirected the request in the users Web Browser 我们不需要在用户Web浏览器中重定向请求的地方显示真实的URL
  • we want to transfer current page request to another .aspx page on the same server 我们想要将当前页面请求传输到同一服务器上的另一个.aspx页面
  • we want to preserve server resources and avoid the unnecessary roundtrips to the server 我们想保留服务器资源,避免不必要的往返服务器
  • we want to preserve Query String and Form Variables (optionally) 我们要保留查询字符串和表单变量(可选)

There is no solution unless you can force the user to browse only from a restricted environment in which you can control what software is installed or run. 没有解决方案,除非您可以强制用户仅从可以控制安装或运行哪些软件的受限环境中浏览。 Even if you force the user to use a specific browser, they could use a tool like Fiddler to see what URLs they are going to. 即使您强迫用户使用特定的浏览器,他们也可以使用Fiddler之类的工具查看要访问的URL。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM