客户端可以看到服务器端源代码吗?asp.net [英] can clients see server side source code ? asp.net

查看:43
本文介绍了客户端可以看到服务器端源代码吗?asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否任何使用任何浏览器的客户端都可以看到我的服务器端代码?如果是这样,我该如何防止这种情况发生,实际上客户在访问我的网站时能够看到什么?

I would like to know if somehow any client using any browser can see my server side code? if it is so how could I prevent this and actually what is the client able to see when he is visiting my web site?

(asp.net)

推荐答案

我以前从未使用过 asp.net,但我认为它与 PHP 或 Perl 相同.客户端只能看到服务器发送给他的内容(就像任何其他网络应用程序一样).

I've never used asp.net before, but i assume it's the same like PHP or Perl. The client only sees what the server is sending to him (like any other network application).

事物的正常执行顺序应该是 ->
客户端向特定资源发送请求.您的服务器会解释此请求并打开所需的文件进行处理.然后解析器遍历您的源文件并执行您的代码.

The normal order of execution of things should be ->
A client sends a request to a specific resource. Your server interprets this request and opens the required files for processing. Then a parser goes through your source files and executes your code.

将源代码发送给客户端的唯一方法是输入错误,您会错过字符串末尾的 ".

The only way of source code being send to the client is a typo where you miss the " at the end of your strings.

这篇关于客户端可以看到服务器端源代码吗?asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆