Last post Oct 23, 2017 05:31 AM by Cathy Zou
Oct 20, 2017 08:29 PM|alihusain_77|LINK
If I run the following action on the aspx.vb
Where it will be applied? Will it be applied on the server filesystem or the client filesystem?
Oct 20, 2017 08:50 PM|ryanbesko|LINK
Oct 20, 2017 09:18 PM|mgebhard|LINK
The code runs on the system where the code is located.
New developers often miss this distinction because the development machine is usually both the server and the client. However, the distinction between client and server become very apparent once the application is deployed to a web server.
Oct 23, 2017 05:31 AM|Cathy Zou|LINK
The ASP.NET code runs on the server, so it will look at the files on the server.
The server does not have access to the file system on the client side, and as such it cannot rename a file on the client side for security purpose. This would cause major security issues as web sites would be able to change files on the client OS.
You can't rename a file on the client machine, however it would be possible to rename a file on the computer that is used as client If:
the server and computer are on the same network
the server knows the name of the computer
the server knows which folder to look for in the computer
the folder is shared with the user account running the ASP.NET code on the server with enough privileges to change the name of a file
In that sense the computer is not a client to the server, but the server communicates directly with the computer via the file system, not via IIS.