aspdotnet学习笔记

来源:互联网 发布:单片机嵌入式编程 编辑:程序博客网 时间:2024/04/29 16:40

            关于基本的网络与服务器的认识——7月5日笔记

   TCP/IP,唯一的网络标识。DNS解析名称与IP的服务器地址。

   客户/服务器系统原理:

  1. 浏览器将请求信息发送给服务器The browser sends the GET request to the server. As you saw above, the first line of the request specifies the resource (/index.html) that the browser is requesting.

  2. 服务器收到请求,然后定位到根目录下找到index.html并将读入(When the Web server receives this request, it locates the root folder of the Web site on its hard drive, looks for a file called index.html, and then reads this file from the disk.

  3. 服务器将index.heml发送给browser(The Web server sends the contents of the file back to the browser inside the HTTP response.

上面的方法在不经常移动网页的地址是是有效的,然而当经常要移动储存的地址是就要用另外的模式:

  1. 第一步还是发送GET请求The first part of the cycle works the same as with a static Web site – the browser specifies the resource name inside an HTTP GET request.

  2. 服务器在处理请求的时候会有一些变化,服务器认为文件不仅仅是HTML类型还有可能是其他类型After this, however, things work slightly differently. The Web server recognizes that the file extension is something different than .html – for example, the file extension might be .aspx, which is an ASP.NET file – and it calls the appropriate Web application to process the request.

  3. 服务器读取请求文件The Web application reads the requested file from the file system.

  4. 江都取得文文件按可找到的指令说明运行它Instead of returning the file directly, the Web application processes the file and runs any instructions that it finds within (see below).

  5. 按指令说明动态生成网页These instructions may load data from a database or perform some other processing. The Web application dynamically generates some HTML according to the instructions in the file, and then returns the generated HTML to the Web server.

  6. 服务器将生成的网页发送给browser(The Web server forwards this HTML content to the browser. The browser itself is unaware that any of this HTML generation has taken place – it just treats the HTML in the same way as if it were a static file.